pub struct HmsDb<'a> {
pub conn: &'a mut SqliteConnection,
}
Fields§
§conn: &'a mut SqliteConnection
Implementations§
Source§impl<'a> HmsDb<'a>
impl<'a> HmsDb<'a>
pub fn insert_snip( &mut self, new_snip: &NewSnip<'_>, ) -> Result<Snip, HmsDbError>
pub fn insert_snips( &mut self, new_snips: &Vec<NewSnip<'_>>, ) -> Result<(), HmsDbError>
pub fn find_snip_by_id(&mut self, snip_id: i32) -> Result<Snip, HmsDbError>
pub fn find_snips_by_alias( &mut self, snip_alias: &str, limit: i64, offset: i64, ) -> Result<Vec<Snip>, HmsDbError>
pub fn increment_snip_access_count( &mut self, snip: &Snip, ) -> Result<(), HmsDbError>
pub fn delete_snip(&mut self, snip: &Snip) -> Result<(), HmsDbError>
pub fn fetch_top_snips_by_access( &mut self, limit: i64, ) -> Result<Vec<Snip>, HmsDbError>
Auto Trait Implementations§
impl<'a> Freeze for HmsDb<'a>
impl<'a> !RefUnwindSafe for HmsDb<'a>
impl<'a> Send for HmsDb<'a>
impl<'a> !Sync for HmsDb<'a>
impl<'a> Unpin for HmsDb<'a>
impl<'a> !UnwindSafe for HmsDb<'a>
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
Source§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
Convert
self
to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
Convert
&self
to an expression for Diesel’s query builder. Read more