Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/adambcomer/database-engine
/ functions
Functions
55 in github.com/adambcomer/database-engine
⨍
Functions
55
◇
Types & classes
10
↓ 20 callers
Method
len
Gets the number of records in the MemTable.
src/mem_table.rs:106
↓ 20 callers
Method
set
Sets a Key-Value pair in the MemTable.
src/mem_table.rs:32
↓ 19 callers
Method
set
Sets a Key-Value pair and the operation is appended to the WAL.
src/wal.rs:83
↓ 10 callers
Method
delete
Deletes a Key-Value pair and the operation is appended to the WAL. This is achieved using tombstones.
src/wal.rs:97
↓ 10 callers
Method
flush
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 callers
Function
check_entry
( reader: &mut BufReader<File>, key: &[u8], value: Option<&[u8]>, timestamp: u
src/wal.rs:135
↓ 5 callers
Method
get
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 callers
Function
assert_next_entry
( reader: &mut BufReader<File>, key: &[u8], value: Option<&[u8]>, timestamp: u
src/sstable.rs:260
↓ 4 callers
Method
get
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 callers
Method
entries
Gets all of the records from the MemTable.
src/mem_table.rs:111
↓ 3 callers
Method
get_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 callers
Method
delete
Deletes a Key-Value pair in the MemTable. This is achieved using tombstones.
src/mem_table.rs:64
↓ 2 callers
Method
into_iter
Converts a WAL into a `WALIterator` to iterate over the entries.
src/wal.rs:121
↓ 1 callers
Function
files_with_ext
Gets the set of files with an extension for a given directory.
src/utils.rs:5
Method
delete
(&mut self, key: &[u8])
src/database.rs:77
Method
from_path
Creates a WAL from an existing file path.
src/wal.rs:36
Method
get
(&self, key: &[u8])
src/database.rs:46
Method
key
(&self)
src/database.rs:14
Method
key_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
Method
load_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
Method
load_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
Method
new
Creates a new empty MemTable
src/mem_table.rs:24
Method
new
Creates a new WALIterator from a path to a WAL file.
src/wal_iterator.rs:20
Method
new
Creates a new SSTableIterator from a path to a SSTable file.
src/sstable_iterator.rs:16
Method
new
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
Method
new
Creates a new WAL in a given directory.
src/wal.rs:22
Method
new
(dir: &str)
src/database.rs:34
Method
next
Gets the next entry in the WAL file.
src/wal_iterator.rs:31
Method
next
Gets the next entry in the SSTable file.
src/sstable_iterator.rs:27
Method
set
(&mut self, key: &[u8], value: &[u8])
src/database.rs:58
Method
size
Gets the total size of the records in the MemTable
src/mem_table.rs:116
Function
test_get
()
src/sstable.rs:455
Function
test_get_deleted_entry
()
src/sstable.rs:488
Function
test_get_not_found
()
src/sstable.rs:505
Function
test_key_in_range
()
src/sstable.rs:428
Function
test_load_sstable
()
src/sstable.rs:364
Function
test_load_sstable_with_deleted
()
src/sstable.rs:397
Function
test_mem_table_delete_empty
()
src/mem_table.rs:269
Function
test_mem_table_delete_exists
()
src/mem_table.rs:248
Function
test_mem_table_get_exists
()
src/mem_table.rs:223
Function
test_mem_table_get_not_exists
()
src/mem_table.rs:237
Function
test_mem_table_put_end
()
src/mem_table.rs:174
Function
test_mem_table_put_middle
()
src/mem_table.rs:150
Function
test_mem_table_put_overwrite
()
src/mem_table.rs:198
Function
test_mem_table_put_start
()
src/mem_table.rs:126
Function
test_new_sstable
()
src/sstable.rs:303
Function
test_new_sstable_with_deleted
()
src/sstable.rs:334
Function
test_read_wal_multiple
()
src/wal.rs:310
Function
test_read_wal_none
()
src/wal.rs:267
Function
test_read_wal_one
()
src/wal.rs:278
Function
test_write_delete
()
src/wal.rs:230
Function
test_write_many
()
src/wal.rs:200
Function
test_write_one
()
src/wal.rs:175
Method
timestamp
(&self)
src/database.rs:22
Method
value
(&self)
src/database.rs:18