Tokyocabinet ruby
Retrieve records. If successful, the return value is a list object of the values of the corresponding records. Open a database file. Optimize the database file. If it is not defined or not more than 0, the default value is specified. The default value is The default value is two times of the number of pages. If it is not defined or negative, the current setting is not changed. If it is not defined or 0xff, the current setting is not changed.
This method is useful to reduce the size of the database file with data fragmentation by successive updating.
Remove a record. Remove records. If the key of duplicated records is specified, all of them are removed. Get the path of the database file. Store a record. If a record with the same key exists in the database, it is overwritten. Concatenate a value at the end of the existing record.
If there is no corresponding record, a new record is created. Store a record with allowing duplication of keys. If a record with the same key exists in the database, the new record is placed after the existing one. Store a new record. If a record with the same key exists in the database, this method has no effect.
Store records with allowing duplication of keys. If a record with the same key exists in the database, the new records are placed after the existing one. Get keys of ranged records. If it is not defined, the first record is specified. If it is not defined, false is specified. If it is not defined, the last record is specified.
Get the number of records. The return value is the number of records or 0 if the object does not connect to any database file. Set the caching parameters.
Note that the tuning parameters of the database should be set before the database is opened. Further, Tokyo Cabinet supports multiple threads or processes using the database file at a time using latching at different levels. At the highest level, processes or threads open the database file for reading or writing. There can be multiple concurrent readers.
However, concurrent readers and writers are not allowed: whenever the database file is opened for writing, other writers and readers are blocked. Data structures, including the fixed-size array and the hash table, in the storage layer are protected using fine-grained latching.
Tokyo Cabinet is not a relational database management system; It is a dedicated key-value store. Applications need to use a custom non-SQL API to invoke insert, delete, update operations on data and other management functions.
Tokyo Cabinet also implements a thin "table" abstraction which simulates columns over a key-value store. Schemas and data types are not supported, and therefore, a Tokyo Cabinet table can contain tuples with a different kind and number of columns. In the table abstraction, a key and a column index a non-negative integer together serve as a pointer to a value, unlike a standard key-value record, where only the key serves as such a pointer.
Necessary data retrieval and management functions -- get, put, delete, update, range queries -- are supported by all three data structures, albeit with specific properties.
Which data structure the database utilizes is configured through the initialization functions of the API. Tokyo Cabinet implements a thin "table" abstraction which simulates columns over a key-value store. In this table abstraction, a key and a column index a non-negative integer together serve as a pointer to a value.
Records in a table can have different schemas. The user can create indices e. Shadow Paging. Learn more. Asked 11 years, 7 months ago.
Active 9 years, 6 months ago. Viewed times. Improve this question. Mat k 39 39 gold badges silver badges bronze badges. Add a comment. Active Oldest Votes. Improve this answer. Sign up or log in Sign up using Google.
Sign up using Facebook. Sign up using Email and Password. Post as a guest Name.
0コメント