pub struct Table<'db, M>where
M: D1Model,{ /* private fields */ }Implementations§
Source§impl<'db, M> Table<'db, M>where
M: D1Model,
impl<'db, M> Table<'db, M>where
M: D1Model,
pub fn new(db: &'db D1Database) -> Table<'db, M>
pub async fn insert(&self, model: &M) -> Result<M, OrmError>
pub async fn insert_batch(&self, models: &[M]) -> Result<Vec<M>, OrmError>
pub async fn find_one(&self, query: Query) -> Result<Option<M>, OrmError>
pub async fn find_all(&self, query: Query) -> Result<Vec<M>, OrmError>
pub async fn update( &self, set: Set, query: Query, ) -> Result<Option<M>, OrmError>
pub async fn delete(&self, query: Query) -> Result<(), OrmError>
pub async fn count(&self, query: Query) -> Result<u64, OrmError>
Auto Trait Implementations§
impl<'db, M> Freeze for Table<'db, M>
impl<'db, M> RefUnwindSafe for Table<'db, M>where
M: RefUnwindSafe,
impl<'db, M> Send for Table<'db, M>where
M: Send,
impl<'db, M> Sync for Table<'db, M>where
M: Sync,
impl<'db, M> Unpin for Table<'db, M>where
M: Unpin,
impl<'db, M> UnsafeUnpin for Table<'db, M>
impl<'db, M> UnwindSafe for Table<'db, M>where
M: 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