Skip to content

Commit

Permalink
Update lib_inner.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
trevyn committed Jul 23, 2024
1 parent fff2e59 commit 8f19e8d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions turbosql/src/lib_inner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ pub type Blob = Vec<u8>;

/// `#[derive(Turbosql)]` generates impls for this trait.
pub trait Turbosql {
/// Inserts this row into the database. `rowid` must be `None`. On success, returns the new `rowid`.
/// Insert this row into the database. `rowid` must be `None`. On success, the new `rowid` is returned.
fn insert(&self) -> Result<i64, Error>;
/// Inserts this row into the database, and updates the `rowid` of the struct to match the rowid newly inserted into the database. `rowid` must be `None`. On success, returns the new `rowid`.
/// Insert this row into the database, and update the `rowid` of the struct to match the new rowid in the database. `rowid` must be `None` on call. On success, the new `rowid` is returned.
fn insert_mut(&mut self) -> Result<i64, Error>;
/// Inserts all rows in the slice into the database. All `rowid`s must be `None`. On success, returns `Ok(())`.
/// Insert all rows in the slice into the database. All `rowid`s must be `None`. On success, returns `Ok(())`.
fn insert_batch<T: AsRef<Self>>(rows: &[T]) -> Result<(), Error>;
/// Updates this existing row in the database, based on `rowid`, which must be `Some`. All fields are overwritten in the database. On success, returns the number of rows updated, which should be 1.
fn update(&self) -> Result<usize, Error>;
Expand Down

0 comments on commit 8f19e8d

Please sign in to comment.