A WT_CURSOR handle is the interface to a cursor. More...
Public Member Functions | |
synchronized void | delete () |
String | getKeyFormat () |
String | getValueFormat () |
Cursor | putKeyByte (byte value) throws WiredTigerPackingException |
Cursor | putKeyByteArray (byte[] value) throws WiredTigerPackingException |
Cursor | putKeyByteArray (byte[] value, int off, int len) throws WiredTigerPackingException |
Cursor | putKeyInt (int value) throws WiredTigerPackingException |
Cursor | putKeyLong (long value) throws WiredTigerPackingException |
Cursor | putKeyRecord (long value) throws WiredTigerPackingException |
Cursor | putKeyShort (short value) throws WiredTigerPackingException |
Cursor | putKeyString (String value) throws WiredTigerPackingException |
Cursor | putValueByte (byte value) throws WiredTigerPackingException |
Cursor | putValueByteArray (byte[] value) throws WiredTigerPackingException |
Cursor | putValueByteArray (byte[] value, int off, int len) throws WiredTigerPackingException |
Cursor | putValueInt (int value) throws WiredTigerPackingException |
Cursor | putValueLong (long value) throws WiredTigerPackingException |
Cursor | putValueRecord (long value) throws WiredTigerPackingException |
Cursor | putValueShort (short value) throws WiredTigerPackingException |
Cursor | putValueString (String value) throws WiredTigerPackingException |
byte | getKeyByte () throws WiredTigerPackingException |
void | getKeyByteArray (byte[] output) throws WiredTigerPackingException |
void | getKeyByteArray (byte[] output, int off, int len) throws WiredTigerPackingException |
byte[] | getKeyByteArray () throws WiredTigerPackingException |
int | getKeyInt () throws WiredTigerPackingException |
long | getKeyLong () throws WiredTigerPackingException |
long | getKeyRecord () throws WiredTigerPackingException |
short | getKeyShort () throws WiredTigerPackingException |
String | getKeyString () throws WiredTigerPackingException |
byte | getValueByte () throws WiredTigerPackingException |
void | getValueByteArray (byte[] output) throws WiredTigerPackingException |
void | getValueByteArray (byte[] output, int off, int len) throws WiredTigerPackingException |
byte[] | getValueByteArray () throws WiredTigerPackingException |
int | getValueInt () throws WiredTigerPackingException |
long | getValueLong () throws WiredTigerPackingException |
long | getValueRecord () throws WiredTigerPackingException |
short | getValueShort () throws WiredTigerPackingException |
String | getValueString () throws WiredTigerPackingException |
int | insert () throws WiredTigerException |
int | update () throws WiredTigerException |
int | remove () throws WiredTigerException |
int | compare (Cursor other) throws WiredTigerException |
int | equals (Cursor other) throws WiredTigerException |
int | next () throws WiredTigerException |
int | prev () throws WiredTigerException |
int | search () throws WiredTigerException |
SearchStatus | search_near () throws WiredTigerException |
Session | getSession () |
String | getUri () |
int | reset () throws com.wiredtiger.db.WiredTigerException |
Reset the cursor. More... | |
int | close () throws com.wiredtiger.db.WiredTigerException |
Close the cursor. More... | |
int | reconfigure (String config) throws com.wiredtiger.db.WiredTigerException |
Reconfigure the cursor. More... | |
int | compare_wrap (Cursor other) |
int | equals_wrap (Cursor other) |
Protected Member Functions | |
Cursor (long cPtr, boolean cMemoryOwn) | |
String | getKey_format () |
String | getValue_format () |
int | next_wrap () throws com.wiredtiger.db.WiredTigerException |
int | prev_wrap () throws com.wiredtiger.db.WiredTigerException |
byte[] | get_key_wrap () |
byte[] | get_value_wrap () |
int | insert_wrap (byte[] k, byte[] v) |
int | remove_wrap (byte[] k) |
int | search_wrap (byte[] k) |
SearchStatus | search_near_wrap (byte[] k) |
int | update_wrap (byte[] k, byte[] v) |
int | java_init (Object jcursor) |
Static Protected Member Functions | |
static long | getCPtr (Cursor obj) |
Protected Attributes | |
boolean | swigCMemOwn |
String | keyFormat |
String | valueFormat |
PackOutputStream | keyPacker |
PackOutputStream | valuePacker |
PackInputStream | keyUnpacker |
PackInputStream | valueUnpacker |
A WT_CURSOR handle is the interface to a cursor.
Cursors allow data to be searched, iterated and modified, implementing the CRUD (create, read, update and delete) operations. Cursors are opened in the context of a session. If a transaction is started, cursors operate in the context of the transaction until the transaction is resolved.
Raw data is represented by key/value pairs of WT_ITEM structures, but cursors can also provide access to fields within the key and value if the formats are described in the WT_SESSION::create method.
In the common case, a cursor is used to access records in a table. However, cursors can be used on subsets of tables (such as a single column or a projection of multiple columns), as an interface to statistics, configuration data or application-specific data sources. See WT_SESSION::open_cursor for more information.
Thread safety: A WT_CURSOR handle is not usually shared between threads, see Multithreading for more information.
int com.wiredtiger.db.Cursor.close | ( | ) | throws com.wiredtiger.db.WiredTigerException |
Close the cursor.
This releases the resources associated with the cursor handle. Cursors are closed implicitly by ending the enclosing connection or closing the session in which they were opened.
cursor | the cursor handle |
int com.wiredtiger.db.Cursor.compare | ( | Cursor | other | ) | throws WiredTigerException |
Compare this cursor's position to another Cursor.
int com.wiredtiger.db.Cursor.equals | ( | Cursor | other | ) | throws WiredTigerException |
Compare this cursor's position to another Cursor.
byte com.wiredtiger.db.Cursor.getKeyByte | ( | ) | throws WiredTigerPackingException |
Retrieve a byte from the cursor's key.
void com.wiredtiger.db.Cursor.getKeyByteArray | ( | byte[] | output | ) | throws WiredTigerPackingException |
Retrieve a byte array from the cursor's key.
output | The byte array where the returned value will be stored. The array should be large enough to store the entire data item, if not a truncated value will be returned. |
void com.wiredtiger.db.Cursor.getKeyByteArray | ( | byte[] | output, |
int | off, | ||
int | len | ||
) | throws WiredTigerPackingException |
Retrieve a byte array from the cursor's key.
output | The byte array where the returned value will be stored. |
off | Offset into the destination buffer to start copying into. |
len | The length should be large enough to store the entire data item, if not a truncated value will be returned. |
byte [] com.wiredtiger.db.Cursor.getKeyByteArray | ( | ) | throws WiredTigerPackingException |
Retrieve a byte array from the cursor's key.
String com.wiredtiger.db.Cursor.getKeyFormat | ( | ) |
Retrieve the format string for this cursor's key.
int com.wiredtiger.db.Cursor.getKeyInt | ( | ) | throws WiredTigerPackingException |
Retrieve an integer from the cursor's key.
long com.wiredtiger.db.Cursor.getKeyLong | ( | ) | throws WiredTigerPackingException |
Retrieve a long from the cursor's key.
long com.wiredtiger.db.Cursor.getKeyRecord | ( | ) | throws WiredTigerPackingException |
Retrieve a record number from the cursor's key.
short com.wiredtiger.db.Cursor.getKeyShort | ( | ) | throws WiredTigerPackingException |
Retrieve a short integer from the cursor's key.
String com.wiredtiger.db.Cursor.getKeyString | ( | ) | throws WiredTigerPackingException |
Retrieve a string from the cursor's key.
byte com.wiredtiger.db.Cursor.getValueByte | ( | ) | throws WiredTigerPackingException |
Retrieve a byte from the cursor's value.
void com.wiredtiger.db.Cursor.getValueByteArray | ( | byte[] | output | ) | throws WiredTigerPackingException |
Retrieve a byte array from the cursor's value.
output | The byte array where the returned value will be stored. The array should be large enough to store the entire data item, if not a truncated value will be returned. |
void com.wiredtiger.db.Cursor.getValueByteArray | ( | byte[] | output, |
int | off, | ||
int | len | ||
) | throws WiredTigerPackingException |
Retrieve a byte array from the cursor's value.
output | The byte array where the returned value will be stored. |
off | Offset into the destination buffer to start copying into. |
len | The length should be large enough to store the entire data item, if not a truncated value will be returned. |
byte [] com.wiredtiger.db.Cursor.getValueByteArray | ( | ) | throws WiredTigerPackingException |
Retrieve a byte array from the cursor's value.
String com.wiredtiger.db.Cursor.getValueFormat | ( | ) |
Retrieve the format string for this cursor's value.
int com.wiredtiger.db.Cursor.getValueInt | ( | ) | throws WiredTigerPackingException |
Retrieve an integer from the cursor's value.
long com.wiredtiger.db.Cursor.getValueLong | ( | ) | throws WiredTigerPackingException |
Retrieve a long from the cursor's value.
long com.wiredtiger.db.Cursor.getValueRecord | ( | ) | throws WiredTigerPackingException |
Retrieve a record number from the cursor's value.
short com.wiredtiger.db.Cursor.getValueShort | ( | ) | throws WiredTigerPackingException |
Retrieve a short integer from the cursor's value.
String com.wiredtiger.db.Cursor.getValueString | ( | ) | throws WiredTigerPackingException |
Retrieve a string from the cursor's value.
int com.wiredtiger.db.Cursor.insert | ( | ) | throws WiredTigerException |
Insert the cursor's current key/value into the table.
int com.wiredtiger.db.Cursor.next | ( | ) | throws WiredTigerException |
Retrieve the next item in the table.
int com.wiredtiger.db.Cursor.prev | ( | ) | throws WiredTigerException |
Retrieve the previous item in the table.
Cursor com.wiredtiger.db.Cursor.putKeyByte | ( | byte | value | ) | throws WiredTigerPackingException |
Append a byte to the cursor's key.
value | The value to append. |
Cursor com.wiredtiger.db.Cursor.putKeyByteArray | ( | byte[] | value | ) | throws WiredTigerPackingException |
Append a byte array to the cursor's key.
value | The value to append. |
Cursor com.wiredtiger.db.Cursor.putKeyByteArray | ( | byte[] | value, |
int | off, | ||
int | len | ||
) | throws WiredTigerPackingException |
Append a byte array to the cursor's key.
value | The value to append. |
off | The offset into value at which to start. |
len | The length of the byte array. |
Cursor com.wiredtiger.db.Cursor.putKeyInt | ( | int | value | ) | throws WiredTigerPackingException |
Append an integer to the cursor's key.
value | The value to append |
Cursor com.wiredtiger.db.Cursor.putKeyLong | ( | long | value | ) | throws WiredTigerPackingException |
Append a long to the cursor's key.
value | The value to append |
Cursor com.wiredtiger.db.Cursor.putKeyRecord | ( | long | value | ) | throws WiredTigerPackingException |
Append a record number to the cursor's key.
value | The value to append |
Cursor com.wiredtiger.db.Cursor.putKeyShort | ( | short | value | ) | throws WiredTigerPackingException |
Append a short integer to the cursor's key.
value | The value to append |
Cursor com.wiredtiger.db.Cursor.putKeyString | ( | String | value | ) | throws WiredTigerPackingException |
Append a string to the cursor's key.
value | The value to append |
Cursor com.wiredtiger.db.Cursor.putValueByte | ( | byte | value | ) | throws WiredTigerPackingException |
Append a byte to the cursor's value.
value | The value to append |
Cursor com.wiredtiger.db.Cursor.putValueByteArray | ( | byte[] | value | ) | throws WiredTigerPackingException |
Append a byte array to the cursor's value.
value | The value to append |
Cursor com.wiredtiger.db.Cursor.putValueByteArray | ( | byte[] | value, |
int | off, | ||
int | len | ||
) | throws WiredTigerPackingException |
Append a byte array to the cursor's value.
value | The value to append |
off | The offset into value at which to start. |
len | The length of the byte array. |
Cursor com.wiredtiger.db.Cursor.putValueInt | ( | int | value | ) | throws WiredTigerPackingException |
Append an integer to the cursor's value.
value | The value to append |
Cursor com.wiredtiger.db.Cursor.putValueLong | ( | long | value | ) | throws WiredTigerPackingException |
Append a long to the cursor's value.
value | The value to append |
Cursor com.wiredtiger.db.Cursor.putValueRecord | ( | long | value | ) | throws WiredTigerPackingException |
Append a record number to the cursor's value.
value | The value to append |
Cursor com.wiredtiger.db.Cursor.putValueShort | ( | short | value | ) | throws WiredTigerPackingException |
Append a short integer to the cursor's value.
value | The value to append |
Cursor com.wiredtiger.db.Cursor.putValueString | ( | String | value | ) | throws WiredTigerPackingException |
Append a string to the cursor's value.
value | The value to append |
int com.wiredtiger.db.Cursor.reconfigure | ( | String | config | ) | throws com.wiredtiger.db.WiredTigerException |
Reconfigure the cursor.
The cursor is reset.
cursor | the cursor handle | |||||||||
config | Configuration string, see Configuration Strings. Permitted values:
|
int com.wiredtiger.db.Cursor.remove | ( | ) | throws WiredTigerException |
Remove the cursor's current key/value into the table.
int com.wiredtiger.db.Cursor.reset | ( | ) | throws com.wiredtiger.db.WiredTigerException |
Reset the cursor.
Any resources held by the cursor are released, and the cursor's key and position are no longer valid. Subsequent iterations with WT_CURSOR::next will move to the first record, or with WT_CURSOR::prev will move to the last record.
In the case of a statistics cursor, resetting the cursor refreshes the statistics information returned.
cursor | the cursor handle |
int com.wiredtiger.db.Cursor.search | ( | ) | throws WiredTigerException |
Search for an item in the table.
SearchStatus com.wiredtiger.db.Cursor.search_near | ( | ) | throws WiredTigerException |
Search for an item in the table.
int com.wiredtiger.db.Cursor.update | ( | ) | throws WiredTigerException |
Update the cursor's current key/value into the table.