Storage::KeyValueStore
Inherits Reference / Object
Constants
HARD_DURABILITY = RocksDB::WriteOptions.new
Hard durability: data is written on disk always. This is the default and this is paranoic. No data will be lost, ever.
MINIMAL_DURABILITY = RocksDB::WriteOptions.new
Minimal durability: data it stored in memory only and flushed to disk at some later point. A process crash might cause data loss. A graceful server close (calling .close()) won't lose data. Note: The data might be lost, but it won't be corrupted. This is the fastest option.
PREFIX_DATABASES = 1_u8
PREFIX_INDICES = 3_u8
PREFIX_SYSTEM_INFO = 0_u8
PREFIX_TABLES = 2_u8
SOFT_DURABILITY = RocksDB::WriteOptions.new
Soft durability: data is sent to the operating system memory and will be synced to disk later. Only a kernel panic or hardware failure might cause data loss. Crashing the process won't lose any data.
Constructors
Class methods
decompose_index_entry_key(index_entry_key : Bytes)
Sourcekey_for_database(id : UUID)
Sourcekey_for_system_info
Sourcekey_for_table(id : UUID)
Sourcekey_for_table_index(table_id : UUID, index_id : UUID)
Sourcekey_for_table_index_end(table_id : UUID)
Sourcekey_for_table_index_entry_end(index_value : Bytes)
Sourcekey_for_table_index_entry_start(index_value : Bytes)
Sourcekey_for_table_index_start(table_id : UUID)
SourceInstance methods
build_index(table_id : UUID, index_id : UUID, &)
Sourceclose
Sourcecreate_batch
Sourcedatabase_path
Sourcedelete_index_entry(table_id : UUID, index_id : UUID, index_value : Bytes, counter : Int32, primary_key : Bytes)
Sourcedelete_row(table_id : UUID, primary_key : Bytes, durability : ReQL::Durability = ReQL::Durability::Soft) : Bytes | Nil
Sourcedrop_index_data(index_id : UUID)
Sourceeach_db
Sourceeach_index(table_id : UUID, &)
Sourceeach_index_entry(table_id : UUID, index_id : UUID, index_value_start : Bytes, index_value_end : Bytes, snapshot : RocksDB::BaseSnapshot | Nil = nil, &)
Sourceeach_row(table_id : UUID, &)
Sourceeach_table
Sourceestimated_table_count(table_id : UUID)
Sourceget_db(id : UUID)
Sourceget_row(table_id : UUID, primary_key : Bytes, snapshot : RocksDB::BaseSnapshot | Nil = nil, &)
Sourceget_table(id : UUID)
Sourcesave_db(db : DatabaseInfo)
Sourcesave_index(index : IndexInfo)
Sourcesave_table(table : TableInfo)
Sourceset_index_entry(table_id : UUID, index_id : UUID, index_value : Bytes, counter : Int32, primary_key : Bytes)
Sourceset_row(table_id : UUID, primary_key : Bytes, data : Bytes, durability : ReQL::Durability = ReQL::Durability::Soft)
Sourcesnapshot
Sourcesystem_info
Sourcesystem_info=(system_info : Storage::KeyValueStore::SystemInfo)
Sourcetable_data_family(table_id : UUID)
Sourcetable_index_family(index_id : UUID)
Source