pub enum WalRecord {
Set {
key: Vec<u8>,
value: Vec<u8>,
ttl_ms: Option<u64>,
},
Del {
key: Vec<u8>,
},
Expire {
key: Vec<u8>,
ttl_ms: u64,
},
LPush {
key: Vec<u8>,
values: Vec<Vec<u8>>,
},
RPush {
key: Vec<u8>,
values: Vec<Vec<u8>>,
},
HSet {
key: Vec<u8>,
fields: Vec<(Vec<u8>, Vec<u8>)>,
},
SAdd {
key: Vec<u8>,
members: Vec<Vec<u8>>,
},
FlushDb,
DocSet {
collection: Vec<u8>,
doc_id: Vec<u8>,
json: Vec<u8>,
},
DocDel {
collection: Vec<u8>,
doc_id: Vec<u8>,
},
VecSet {
key: Vec<u8>,
dimensions: usize,
vector: Vec<u8>,
},
VecDel {
key: Vec<u8>,
},
}Expand description
A mutation record that can be logged to a WAL.
This is a core-level type that mirrors the storage layer’s WalEntry
without depending on the storage crate.
Variants§
Set
SET key value [ttl_ms]
Fields
Del
DEL key
Expire
EXPIRE key ttl_ms
LPush
LPUSH key values…
RPush
RPUSH key values…
HSet
HSET key field value
SAdd
SADD key members…
FlushDb
FLUSHDB — clear all keys.
DocSet
DOC.SET collection doc_id json
Fields
DocDel
DOC.DEL collection doc_id
VecSet
VECSET key dimensions vector_bytes
Fields
VecDel
VECDEL key
Trait Implementations§
impl StructuralPartialEq for WalRecord
Auto Trait Implementations§
impl Freeze for WalRecord
impl RefUnwindSafe for WalRecord
impl Send for WalRecord
impl Sync for WalRecord
impl Unpin for WalRecord
impl UnsafeUnpin for WalRecord
impl UnwindSafe for WalRecord
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more