| Class | TokyoCabinet::BDBCUR |
| In: |
tokyocabinet.c
tokyocabinet-doc.rb |
| Parent: | Object |
Cursor is a mechanism to access each record of B+ tree database in ascending or descending order.%%
Create a cursor object.%% `bdb’ specifies the B+ tree database object.%% The return value is the new cursor object.%% Note that the cursor is available only after initialization with the `first’ or the `jump’ methods and so on. Moreover, the position of the cursor will be indefinite when the database is updated after the initialization of the cursor.%%
# File tokyocabinet-doc.rb, line 642
642: def initialize(bdb)
643: # (native code)
644: end
Move the cursor to the front of records corresponding a key.%% `key’ specifies the key.%% If successful, the return value is true, else, it is false. False is returned if there is no record corresponding the condition.%% The cursor is set to the first record corresponding the key or the next substitute if completely matching record does not exist.%%
# File tokyocabinet-doc.rb, line 659
659: def jump(key)
660: # (native code)
661: end
Remove the record where the cursor is.%% If successful, the return value is true, else, it is false. False is returned when the cursor is at invalid position.%% After deletion, the cursor is moved to the next record if possible.%%
# File tokyocabinet-doc.rb, line 683
683: def out()
684: # (native code)
685: end
Move the cursor to the previous record.%% If successful, the return value is true, else, it is false. False is returned if there is no previous record.%%
# File tokyocabinet-doc.rb, line 664
664: def prev()
665: # (native code)
666: end
Insert a record around the cursor.%% `value’ specifies the value.%% `cpmode’ specifies detail adjustment: `TokyoCabinet::BDBCUR::CPCURRENT’, which means that the value of the current record is overwritten, `TokyoCabinet::BDBCUR::CPBEFORE’, which means that the new record is inserted before the current record, `TokyoCabinet::BDBCUR::CPAFTER’, which means that the new record is inserted after the current record.%% If successful, the return value is true, else, it is false. False is returned when the cursor is at invalid position.%% After insertion, the cursor is moved to the inserted record.%%
# File tokyocabinet-doc.rb, line 677
677: def put(value, cpmode)
678: # (native code)
679: end