MCPcopy Create free account

hub / github.com/adambcomer/database-engine / functions

Functions55 in github.com/adambcomer/database-engine

↓ 20 callersMethodlen
Gets the number of records in the MemTable.
src/mem_table.rs:106
↓ 20 callersMethodset
Sets a Key-Value pair in the MemTable.
src/mem_table.rs:32
↓ 19 callersMethodset
Sets a Key-Value pair and the operation is appended to the WAL.
src/wal.rs:83
↓ 10 callersMethoddelete
Deletes a Key-Value pair and the operation is appended to the WAL. This is achieved using tombstones.
src/wal.rs:97
↓ 10 callersMethodflush
Flushes the WAL to disk. This is useful for applying bulk operations and flushing the final result to disk. Waiting to flush after the bulk operation
src/wal.rs:111
↓ 7 callersFunctioncheck_entry
( reader: &mut BufReader<File>, key: &[u8], value: Option<&[u8]>, timestamp: u
src/wal.rs:135
↓ 5 callersMethodget
Searches for `key` using binary search over the offset index. Returns: - `Ok(Some(entry))` if the key is found. For deleted keys, `entry.value` is `N
src/sstable.rs:186
↓ 4 callersFunctionassert_next_entry
( reader: &mut BufReader<File>, key: &[u8], value: Option<&[u8]>, timestamp: u
src/sstable.rs:260
↓ 4 callersMethodget
Gets a Key-Value pair from the MemTable.alloc If no record with the same key exists in the MemTable, return None.
src/mem_table.rs:89
↓ 3 callersMethodentries
Gets all of the records from the MemTable.
src/mem_table.rs:111
↓ 3 callersMethodget_index
Performs Binary Search to find a record in the MemTable. If the record is found `[Result::Ok]` is returned, with the index of record. If the record i
src/mem_table.rs:100
↓ 2 callersMethoddelete
Deletes a Key-Value pair in the MemTable. This is achieved using tombstones.
src/mem_table.rs:64
↓ 2 callersMethodinto_iter
Converts a WAL into a `WALIterator` to iterate over the entries.
src/wal.rs:121
↓ 1 callersFunctionfiles_with_ext
Gets the set of files with an extension for a given directory.
src/utils.rs:5
Methoddelete
(&mut self, key: &[u8])
src/database.rs:77
Methodfrom_path
Creates a WAL from an existing file path.
src/wal.rs:36
Methodget
(&self, key: &[u8])
src/database.rs:46
Methodkey
(&self)
src/database.rs:14
Methodkey_in_range
Returns `true` if `key` falls within `[low_key, high_key]` (inclusive). Use this as a cheap pre-filter before calling [`get`](SSTable::get).
src/sstable.rs:176
Methodload_from_dir
Loads the WAL(s) within a directory, returning a new WAL and the recovered MemTable. If multiple WALs exist in a directory, they are merged by file d
src/wal.rs:49
Methodload_from_path
Reconstructs an `SSTable` from an existing file on disk. Scans the file once to rebuild the offset index and read the low/high keys, then seeks back
src/sstable.rs:105
Methodnew
Creates a new empty MemTable
src/mem_table.rs:24
Methodnew
Creates a new WALIterator from a path to a WAL file.
src/wal_iterator.rs:20
Methodnew
Creates a new SSTableIterator from a path to a SSTable file.
src/sstable_iterator.rs:16
Methodnew
Flushes `memtable` to a new SSTable file under `dir/<level>/<timestamp>.sstable`. Entries are written in the sorted order of the MemTable. The offset
src/sstable.rs:45
Methodnew
Creates a new WAL in a given directory.
src/wal.rs:22
Methodnew
(dir: &str)
src/database.rs:34
Methodnext
Gets the next entry in the WAL file.
src/wal_iterator.rs:31
Methodnext
Gets the next entry in the SSTable file.
src/sstable_iterator.rs:27
Methodset
(&mut self, key: &[u8], value: &[u8])
src/database.rs:58
Methodsize
Gets the total size of the records in the MemTable
src/mem_table.rs:116
Functiontest_get
()
src/sstable.rs:455
Functiontest_get_deleted_entry
()
src/sstable.rs:488
Functiontest_get_not_found
()
src/sstable.rs:505
Functiontest_key_in_range
()
src/sstable.rs:428
Functiontest_load_sstable
()
src/sstable.rs:364
Functiontest_load_sstable_with_deleted
()
src/sstable.rs:397
Functiontest_mem_table_delete_empty
()
src/mem_table.rs:269
Functiontest_mem_table_delete_exists
()
src/mem_table.rs:248
Functiontest_mem_table_get_exists
()
src/mem_table.rs:223
Functiontest_mem_table_get_not_exists
()
src/mem_table.rs:237
Functiontest_mem_table_put_end
()
src/mem_table.rs:174
Functiontest_mem_table_put_middle
()
src/mem_table.rs:150
Functiontest_mem_table_put_overwrite
()
src/mem_table.rs:198
Functiontest_mem_table_put_start
()
src/mem_table.rs:126
Functiontest_new_sstable
()
src/sstable.rs:303
Functiontest_new_sstable_with_deleted
()
src/sstable.rs:334
Functiontest_read_wal_multiple
()
src/wal.rs:310
Functiontest_read_wal_none
()
src/wal.rs:267
Functiontest_read_wal_one
()
src/wal.rs:278
Functiontest_write_delete
()
src/wal.rs:230
Functiontest_write_many
()
src/wal.rs:200
Functiontest_write_one
()
src/wal.rs:175
Methodtimestamp
(&self)
src/database.rs:22
Methodvalue
(&self)
src/database.rs:18