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

void qdbm::Villa::put ( byte[]  key,
byte[]  val,
int  dmode 
) throws VillaException [inline]

Store a record.

key a byte array of a key.
val a byte array of a value.
dmode behavior when the key overlaps, by the following values: `Villa.DOVER', which means the specified value overwrites the existing one, `Villa.DKEEP', which means the existing value is kept, `Villa.DDUP', which means duplication of keys is allowed.
VillaException if an error occurs or replace is cancelled.
A duplicated record is stored at the tail of the records of the same key. The cursor becomes unavailable due to updating database.

Definition at line 244 of file Villa.java.

References index.

Referenced by qdbm::VillaTester::dowrite(), put(), putobj(), qdbm::VillaTester::run(), store(), and storerec().

    if(index < 0) throw new VillaException();
      if(vlput(index, key, key.length, val, val.length, dmode) == 0)
        throw new VillaException(vlecode());

Generated by  Doxygen 1.6.0   Back to index