A WT_CURSOR handle is the interface to a cursor. More...
Public Member Functions | |
synchronized void | delete () |
String | getKeyFormat () |
Retrieve the format string for this cursor's key. | |
String | getValueFormat () |
Retrieve the format string for this cursor's value. | |
Cursor | putKeyByte (byte value) throws WiredTigerPackingException |
Append a byte to the cursor's key. More... | |
Cursor | putKeyByteArray (byte[] value) throws WiredTigerPackingException |
Append a byte array to the cursor's key. More... | |
Cursor | putKeyByteArray (byte[] value, int off, int len) throws WiredTigerPackingException |
Append a byte array to the cursor's key. More... | |
Cursor | putKeyInt (int value) throws WiredTigerPackingException |
Append an integer to the cursor's key. More... | |
Cursor | putKeyLong (long value) throws WiredTigerPackingException |
Append a long to the cursor's key. More... | |
Cursor | putKeyShort (short value) throws WiredTigerPackingException |
Append a short integer to the cursor's key. More... | |
Cursor | putKeyString (String value) throws WiredTigerPackingException |
Append a string to the cursor's key. More... | |
Cursor | putValueByte (byte value) throws WiredTigerPackingException |
Append a byte to the cursor's value. More... | |
Cursor | putValueByteArray (byte[] value) throws WiredTigerPackingException |
Append a byte array to the cursor's value. More... | |
Cursor | putValueByteArray (byte[] value, int off, int len) throws WiredTigerPackingException |
Append a byte array to the cursor's value. More... | |
Cursor | putValueInt (int value) throws WiredTigerPackingException |
Append an integer to the cursor's value. More... | |
Cursor | putValueLong (long value) throws WiredTigerPackingException |
Append a long to the cursor's value. More... | |
Cursor | putValueShort (short value) throws WiredTigerPackingException |
Append a short integer to the cursor's value. More... | |
Cursor | putValueString (String value) throws WiredTigerPackingException |
Append a string to the cursor's value. More... | |
byte | getKeyByte () throws WiredTigerPackingException |
Retrieve a byte from the cursor's key. More... | |
void | getKeyByteArray (byte[] output) throws WiredTigerPackingException |
Retrieve a byte array from the cursor's key. More... | |
void | getKeyByteArray (byte[] output, int off, int len) throws WiredTigerPackingException |
Retrieve a byte array from the cursor's key. More... | |
byte[] | getKeyByteArray () throws WiredTigerPackingException |
Retrieve a byte array from the cursor's key. More... | |
int | getKeyInt () throws WiredTigerPackingException |
Retrieve an integer from the cursor's key. More... | |
long | getKeyLong () throws WiredTigerPackingException |
Retrieve a long from the cursor's key. More... | |
short | getKeyShort () throws WiredTigerPackingException |
Retrieve a short integer from the cursor's key. More... | |
String | getKeyString () throws WiredTigerPackingException |
Retrieve a string from the cursor's key. More... | |
byte | getValueByte () throws WiredTigerPackingException |
Retrieve a byte from the cursor's value. More... | |
void | getValueByteArray (byte[] output) throws WiredTigerPackingException |
Retrieve a byte array from the cursor's value. More... | |
void | getValueByteArray (byte[] output, int off, int len) throws WiredTigerPackingException |
Retrieve a byte array from the cursor's value. More... | |
byte[] | getValueByteArray () throws WiredTigerPackingException |
Retrieve a byte array from the cursor's value. More... | |
int | getValueInt () throws WiredTigerPackingException |
Retrieve an integer from the cursor's value. More... | |
long | getValueLong () throws WiredTigerPackingException |
Retrieve a long from the cursor's value. More... | |
short | getValueShort () throws WiredTigerPackingException |
Retrieve a short integer from the cursor's value. More... | |
String | getValueString () throws WiredTigerPackingException |
Retrieve a string from the cursor's value. More... | |
int | insert () |
Insert the cursor's current key/value into the table. More... | |
int | update () |
Update the cursor's current key/value into the table. More... | |
int | remove () |
Remove the cursor's current key/value into the table. More... | |
int | compare (Cursor other) |
Compare this cursor's position to another Cursor. More... | |
int | next () |
Retrieve the next item in the table. More... | |
int | prev () |
Retrieve the previous item in the table. More... | |
int | search () |
Search for an item in the table. More... | |
SearchStatus | search_near () |
Search for an item in the table. More... | |
Session | getSession () |
String | getUri () |
int | reset () |
Reset the position of the cursor. More... | |
int | close () |
Close the cursor. More... | |
int | compare_wrap (Cursor other) |
Protected Member Functions | |
Cursor (long cPtr, boolean cMemoryOwn) | |
String | getKey_format () |
String | getValue_format () |
int | next_wrap () |
int | prev_wrap () |
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 | ( | ) |
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 | ) |
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.
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.
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.
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.
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 | ( | ) |
Insert the cursor's current key/value into the table.
int com.wiredtiger.db.Cursor.next | ( | ) |
Retrieve the next item in the table.
int com.wiredtiger.db.Cursor.prev | ( | ) |
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.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.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.remove | ( | ) |
Remove the cursor's current key/value into the table.
int com.wiredtiger.db.Cursor.reset | ( | ) |
Reset the position of the cursor.
Any resources held by the cursor are released, and the cursor's key and position are no longer valid. A subsequent iteration with WT_CURSOR::next will move to the first record, or with WT_CURSOR::prev will move to the last record.
cursor | the cursor handle |
int com.wiredtiger.db.Cursor.search | ( | ) |
Search for an item in the table.
SearchStatus com.wiredtiger.db.Cursor.search_near | ( | ) |
Search for an item in the table.
int com.wiredtiger.db.Cursor.update | ( | ) |
Update the cursor's current key/value into the table.