Struct sqlite::Cursor [−][src]
An iterator over rows.
Implementations
impl<'l> Cursor<'l>
[src]
pub fn bind(&mut self, values: &[Value]) -> Result<()>
[src]
Bind values to parameters by index.
The index of each value is assumed to be the value’s position in the array.
pub fn bind_by_name<S, V>(&mut self, values: V) -> Result<()> where
S: AsRef<str>,
V: IntoIterator<Item = (S, Value)>,
[src]
S: AsRef<str>,
V: IntoIterator<Item = (S, Value)>,
Bind values to parameters by name.
Parameters that are not part of the statement will be ignored.
Examples
let statement = connection.prepare("INSERT INTO users VALUES (:id, :name)")?; let mut cursor = statement.into_cursor(); cursor.bind_by_name(vec![ (":name", Value::String("Bob".to_owned())), (":id", Value::Integer(42)), ])?; cursor.next()?;
pub fn column_count(&self) -> usize
[src]
Return the number of columns.
pub fn next(&mut self) -> Result<Option<&[Value]>>
[src]
Advance to the next row and read all columns.
pub fn as_raw(&self) -> *mut sqlite3_stmt
[src]
Return the raw pointer.
pub fn count(&self) -> usize
[src]
👎 Deprecated since 0.26.0:
Please use column_count
instead.
Auto Trait Implementations
impl<'l> RefUnwindSafe for Cursor<'l>
impl<'l> !Send for Cursor<'l>
impl<'l> !Sync for Cursor<'l>
impl<'l> Unpin for Cursor<'l>
impl<'l> UnwindSafe for Cursor<'l>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,