pub struct Database<S: Storage> {
pub storage: S,
}
Fields§
§storage: S
Implementations§
source§impl Database<KipStorage>
impl Database<KipStorage>
sourcepub async fn with_kipdb(
path: impl Into<PathBuf> + Send
) -> Result<Self, DatabaseError>
pub async fn with_kipdb( path: impl Into<PathBuf> + Send ) -> Result<Self, DatabaseError>
Create a new Database instance With KipDB.
source§impl Database<KipStorage>
impl Database<KipStorage>
pub async fn run_on_query<S: AsRef<str>>( &self, sql: S, query_execute: QueryExecute ) -> Result<Vec<Tuple>, DatabaseError>
source§impl<S: Storage> Database<S>
impl<S: Storage> Database<S>
sourcepub fn new(storage: S) -> Result<Self, DatabaseError>
pub fn new(storage: S) -> Result<Self, DatabaseError>
Create a new Database instance.
sourcepub async fn run<T: AsRef<str>>(
&self,
sql: T
) -> Result<Vec<Tuple>, DatabaseError>
pub async fn run<T: AsRef<str>>( &self, sql: T ) -> Result<Vec<Tuple>, DatabaseError>
Run SQL queries.
pub async fn new_transaction(&self) -> Result<DBTransaction<S>, DatabaseError>
pub fn build_plan<T: AsRef<str>>( sql: T, transaction: &<S as Storage>::TransactionType ) -> Result<(LogicalPlan, Statement), DatabaseError>
Auto Trait Implementations§
impl<S> RefUnwindSafe for Database<S>where
S: RefUnwindSafe,
impl<S> Send for Database<S>
impl<S> Sync for Database<S>
impl<S> Unpin for Database<S>where
S: Unpin,
impl<S> UnwindSafe for Database<S>where
S: UnwindSafe,
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