pub struct KvdbSqliteSharded<ValueType> { /* private fields */ }Implementations§
Source§impl<ValueType> KvdbSqliteSharded<ValueType>
impl<ValueType> KvdbSqliteSharded<ValueType>
pub fn new( shard_connections: Option<Box<[SqliteConnection]>>, statements: Arc<KvdbSqliteStatements>, ) -> Self
pub fn into_connections(self) -> Option<Box<[SqliteConnection]>>
Source§impl<ValueType> KvdbSqliteSharded<ValueType>
impl<ValueType> KvdbSqliteSharded<ValueType>
pub fn db_path<P: AsRef<Path>>(path: P, shard_id: u16) -> PathBuf
pub fn try_clone(&self) -> Result<Self>
pub fn open<P: AsRef<Path>>( num_shards: u16, dir: P, readonly: bool, statements: Arc<KvdbSqliteStatements>, ) -> Result<Self>
pub fn open_or_create<P: AsRef<Path>>( num_shards: u16, dir: P, statements: Arc<KvdbSqliteStatements>, unsafe_mode: bool, ) -> Result<(bool, Self)>
pub fn create_and_open<P: AsRef<Path>>( num_shards: u16, dir: P, statements: Arc<KvdbSqliteStatements>, create_table: bool, unsafe_mode: bool, ) -> Result<Self>
Sourcepub fn create_table(
connections: &mut Box<[SqliteConnection]>,
statements: &KvdbSqliteStatements,
) -> Result<()>
pub fn create_table( connections: &mut Box<[SqliteConnection]>, statements: &KvdbSqliteStatements, ) -> Result<()>
Call initialize databases separately. Typical usage is to create a new table from the existing db.
pub fn check_if_table_exist( connections: &mut Box<[SqliteConnection]>, statements: &KvdbSqliteStatements, ) -> Result<bool>
pub fn drop_table( connections: &mut Box<[SqliteConnection]>, statements: &KvdbSqliteStatements, ) -> Result<()>
pub fn vacumm_db( connections: &mut Box<[SqliteConnection]>, statements: &KvdbSqliteStatements, ) -> Result<()>
Trait Implementations§
Source§impl DerefMutPlusSelf for KvdbSqliteSharded<()>
impl DerefMutPlusSelf for KvdbSqliteSharded<()>
Source§impl DerefMutPlusSelf for KvdbSqliteSharded<Box<[u8]>>
impl DerefMutPlusSelf for KvdbSqliteSharded<Box<[u8]>>
Source§impl DerefPlusSelf for KvdbSqliteSharded<()>
impl DerefPlusSelf for KvdbSqliteSharded<()>
Source§impl DerefPlusSelf for KvdbSqliteSharded<Box<[u8]>>
impl DerefPlusSelf for KvdbSqliteSharded<Box<[u8]>>
Source§impl ElementSatisfy<dyn KeyValueDbIterableTrait<(Vec<u8>, ()), [u8], KvdbSqliteShardedIteratorTag>> for KvdbSqliteSharded<()>
impl ElementSatisfy<dyn KeyValueDbIterableTrait<(Vec<u8>, ()), [u8], KvdbSqliteShardedIteratorTag>> for KvdbSqliteSharded<()>
fn to_constrain_object( &self, ) -> &(dyn KeyValueDbIterableTrait<(Vec<u8>, ()), [u8], KvdbSqliteShardedIteratorTag> + 'static)
fn to_constrain_object_mut( &mut self, ) -> &mut (dyn KeyValueDbIterableTrait<(Vec<u8>, ()), [u8], KvdbSqliteShardedIteratorTag> + 'static)
Source§impl ElementSatisfy<dyn KeyValueDbIterableTrait<(Vec<u8>, Box<[u8]>), [u8], KvdbSqliteShardedIteratorTag>> for KvdbSqliteSharded<Box<[u8]>>
impl ElementSatisfy<dyn KeyValueDbIterableTrait<(Vec<u8>, Box<[u8]>), [u8], KvdbSqliteShardedIteratorTag>> for KvdbSqliteSharded<Box<[u8]>>
fn to_constrain_object( &self, ) -> &(dyn KeyValueDbIterableTrait<MptKeyValue, [u8], KvdbSqliteShardedIteratorTag> + 'static)
fn to_constrain_object_mut( &mut self, ) -> &mut (dyn KeyValueDbIterableTrait<MptKeyValue, [u8], KvdbSqliteShardedIteratorTag> + 'static)
Source§impl<ValueType: 'static + DbValueType + ValueRead + ValueReadImpl<<ValueType as ValueRead>::Kind>> KeyValueDbTraitTransactional for KvdbSqliteSharded<ValueType>
impl<ValueType: 'static + DbValueType + ValueRead + ValueReadImpl<<ValueType as ValueRead>::Kind>> KeyValueDbTraitTransactional for KvdbSqliteSharded<ValueType>
type TransactionType = KvdbSqliteShardedTransaction<ValueType>
Source§fn start_transaction(
&self,
immediate_write: bool,
) -> Result<KvdbSqliteShardedTransaction<ValueType>>
fn start_transaction( &self, immediate_write: bool, ) -> Result<KvdbSqliteShardedTransaction<ValueType>>
Immediate_write indicates whether the transaction should acquire a
write-lock immediately if any.
Source§impl<ValueType: DbValueType> KeyValueDbTypes for KvdbSqliteSharded<ValueType>
impl<ValueType: DbValueType> KeyValueDbTypes for KvdbSqliteSharded<ValueType>
Source§impl<ValueType> MallocSizeOf for KvdbSqliteSharded<ValueType>
impl<ValueType> MallocSizeOf for KvdbSqliteSharded<ValueType>
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Source§impl OwnedReadImplFamily for &KvdbSqliteSharded<Box<[u8]>>
impl OwnedReadImplFamily for &KvdbSqliteSharded<Box<[u8]>>
type FamilyRepresentative = dyn KeyValueDbTraitMultiReader<ValueType = Box<[u8]>>
Source§impl<ValueType> OwnedReadImplFamily for KvdbSqliteSharded<ValueType>
impl<ValueType> OwnedReadImplFamily for KvdbSqliteSharded<ValueType>
type FamilyRepresentative = KvdbSqliteSharded<ValueType>
Source§impl<ValueType> ReadImplFamily for KvdbSqliteSharded<ValueType>
impl<ValueType> ReadImplFamily for KvdbSqliteSharded<ValueType>
type FamilyRepresentative = KvdbSqliteSharded<ValueType>
Source§impl<ValueType> SingleWriterImplFamily for KvdbSqliteSharded<ValueType>
impl<ValueType> SingleWriterImplFamily for KvdbSqliteSharded<ValueType>
type FamilyRepresentative = KvdbSqliteSharded<ValueType>
Source§impl WrappedLifetimeFamily<'_, dyn KeyValueDbIterableTrait<(Vec<u8>, ()), [u8], KvdbSqliteShardedIteratorTag>> for KvdbSqliteSharded<()>
impl WrappedLifetimeFamily<'_, dyn KeyValueDbIterableTrait<(Vec<u8>, ()), [u8], KvdbSqliteShardedIteratorTag>> for KvdbSqliteSharded<()>
type Out = KvdbSqliteSharded<()>
Source§impl WrappedLifetimeFamily<'_, dyn KeyValueDbIterableTrait<(Vec<u8>, Box<[u8]>), [u8], KvdbSqliteShardedIteratorTag>> for KvdbSqliteSharded<Box<[u8]>>
impl WrappedLifetimeFamily<'_, dyn KeyValueDbIterableTrait<(Vec<u8>, Box<[u8]>), [u8], KvdbSqliteShardedIteratorTag>> for KvdbSqliteSharded<Box<[u8]>>
impl DeltaDbTrait for KvdbSqliteSharded<Box<[u8]>>
impl KeyValueDbTraitMultiReader for KvdbSqliteSharded<Box<[u8]>>
impl WrappedTrait<dyn KeyValueDbIterableTrait<(Vec<u8>, ()), [u8], KvdbSqliteShardedIteratorTag>> for KvdbSqliteSharded<()>
impl WrappedTrait<dyn KeyValueDbIterableTrait<(Vec<u8>, Box<[u8]>), [u8], KvdbSqliteShardedIteratorTag>> for KvdbSqliteSharded<Box<[u8]>>
Auto Trait Implementations§
impl<ValueType> Freeze for KvdbSqliteSharded<ValueType>
impl<ValueType> !RefUnwindSafe for KvdbSqliteSharded<ValueType>
impl<ValueType> Send for KvdbSqliteSharded<ValueType>where
ValueType: Send,
impl<ValueType> Sync for KvdbSqliteSharded<ValueType>where
ValueType: Sync,
impl<ValueType> Unpin for KvdbSqliteSharded<ValueType>where
ValueType: Unpin,
impl<ValueType> !UnwindSafe for KvdbSqliteSharded<ValueType>
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