Struct renegades_sqlite::Statement
source · pub struct Statement<'l> { /* private fields */ }
Expand description
A prepared statement.
Implementations
sourceimpl<'l> Statement<'l>
impl<'l> Statement<'l>
sourcepub fn bind<T: Bindable>(&mut self, i: usize, value: T) -> Result<()>
pub fn bind<T: Bindable>(&mut self, i: usize, value: T) -> Result<()>
Bind a value to a parameter.
The leftmost parameter has the index 1.
sourcepub fn kind(&self, i: usize) -> Type
pub fn kind(&self, i: usize) -> Type
Return the type of a column.
The type is revealed after the first step has been taken.
sourcepub fn next(&mut self) -> Result<State>
pub fn next(&mut self) -> Result<State>
Advance to the next state.
The function should be called multiple times until State::Done
is
reached in order to evaluate the statement entirely.
sourcepub fn read<T: Readable>(&self, i: usize) -> Result<T>
pub fn read<T: Readable>(&self, i: usize) -> Result<T>
Read a value from a column.
The leftmost column has the index 0.
sourcepub fn as_raw(&self) -> *mut sqlite3_stmt
pub fn as_raw(&self) -> *mut sqlite3_stmt
Return the raw pointer.
Trait Implementations
Auto Trait Implementations
impl<'l> RefUnwindSafe for Statement<'l>
impl<'l> !Send for Statement<'l>
impl<'l> !Sync for Statement<'l>
impl<'l> Unpin for Statement<'l>
impl<'l> UnwindSafe for Statement<'l>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more