Struct sqlite::Cursor[][src]

pub struct Cursor<'l> { /* fields omitted */ }

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]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.