...
This commit is contained in:
@@ -8,13 +8,11 @@ use libcrypto::CryptoFactory; // Correct import
|
||||
use redb::{Database, TableDefinition};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
pub use crate::error::DBError; // Re-export for users of this crate
|
||||
pub mod error; // Declare the error module
|
||||
pub use error::DBError; // Re-export for users of this crate
|
||||
|
||||
// Declare modules
|
||||
pub mod storage_basic;
|
||||
pub mod storage_hset;
|
||||
pub mod storage_lists;
|
||||
pub mod storage_extra;
|
||||
// Declare storage module
|
||||
pub mod storage;
|
||||
|
||||
// Table definitions for different Redis data types
|
||||
const TYPES_TABLE: TableDefinition<&str, &str> = TableDefinition::new("types");
|
||||
|
4
crates/libdbstorage/src/storage/mod.rs
Normal file
4
crates/libdbstorage/src/storage/mod.rs
Normal file
@@ -0,0 +1,4 @@
|
||||
pub mod storage_basic;
|
||||
pub mod storage_hset;
|
||||
pub mod storage_lists;
|
||||
pub mod storage_extra;
|
@@ -1,6 +1,6 @@
|
||||
use redb::{ReadableTable};
|
||||
use crate::error::DBError;
|
||||
use super::*;
|
||||
use crate::{Storage, TYPES_TABLE, STRINGS_TABLE, HASHES_TABLE, LISTS_TABLE, STREAMS_META_TABLE, STREAMS_DATA_TABLE, EXPIRATION_TABLE, now_in_millis};
|
||||
|
||||
impl Storage {
|
||||
pub fn flushdb(&self) -> Result<(), DBError> {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
use redb::{ReadableTable};
|
||||
use crate::error::DBError;
|
||||
use super::*;
|
||||
use crate::{Storage, TYPES_TABLE, STRINGS_TABLE, EXPIRATION_TABLE, now_in_millis};
|
||||
|
||||
impl Storage {
|
||||
// ✅ ENCRYPTION APPLIED: Values are decrypted after retrieval
|
||||
|
@@ -1,6 +1,6 @@
|
||||
use redb::{ReadableTable};
|
||||
use crate::error::DBError;
|
||||
use super::*;
|
||||
use crate::{Storage, TYPES_TABLE, HASHES_TABLE};
|
||||
|
||||
impl Storage {
|
||||
// ✅ ENCRYPTION APPLIED: Values are encrypted before storage
|
||||
|
@@ -1,6 +1,6 @@
|
||||
use redb::{ReadableTable};
|
||||
use crate::error::DBError;
|
||||
use super::*;
|
||||
use crate::{Storage, TYPES_TABLE, LISTS_TABLE};
|
||||
|
||||
impl Storage {
|
||||
// ✅ ENCRYPTION APPLIED: Elements are encrypted before storage
|
||||
|
Reference in New Issue
Block a user