Logo Search packages:      
Sourcecode: qdbm version File versions  Download package

int Villa::vnum ( const char *  kbuf,
int  ksiz 
) throw (Villa_error) [virtual]

Get the number of records corresponding a key.

kbuf the pointer to the region of a key.
ksiz the size of the region of the key. If it is negative, the size is assigned with `stdstrlen(kbuf)'.
the number of corresponding records. If no record corresponds, 0 is returned.
Villa_error if an error occurs.

Definition at line 257 of file xvilla.cc.

References qdbm::mutex, villa, and vnum().

  int vnum;
  if(!villa) throw Villa_error();
  if(pthread_mutex_lock(&mutex) != 0) throw Villa_error();
  vnum = vlvnum(villa, kbuf, ksiz);
  return vnum;

Generated by  Doxygen 1.6.0   Back to index