Struct sqlite3::core::PreparedStatement [] [src]

pub struct PreparedStatement { /* fields omitted */ }

A prepared statement.

Methods

impl PreparedStatement
[src]

Begin executing a statement.

An sqlite "row" only lasts until the next call to ffi::sqlite3_step(), so ResultSet has a corresponding lifetime constraint, which prevents it ResultSet from implementing the Iterator trait. See the Query trait for and Iterator over query results.

impl PreparedStatement
[src]

A compiled prepared statement that may take parameters. Note: "The leftmost SQL parameter has an index of 1."1

Opt out of copies of error message details.

Bind null to a statement parameter.

Bind an int to a statement parameter.

Bind an int64 to a statement parameter.

Bind a double to a statement parameter.

Bind a (copy of a) str to a statement parameter.

TODO: support binding without copying strings, blobs

Bind a (copy of a) byte sequence to a statement parameter.

TODO: support binding without copying strings, blobs

Clear all parameter bindings.

Return the number of SQL parameters. If parameters of the ?NNN form are used, there may be gaps in the list.

Expose the underlying sqlite3_stmt struct pointer for use with the ffi module.

Return the number of database rows that were changed or inserted or deleted by this statement if it is the most recently run on its database connection.

cf sqlite3_changes.

Trait Implementations

impl Drop for PreparedStatement
[src]

A method called when the value goes out of scope. Read more

impl StatementUpdate for PreparedStatement
[src]

Execute a statement after binding any parameters.

When the statement is done, The number of rows modified is reported.

Fail with Err(SQLITE_MISUSE) in case the statement results in any any rows (e.g. a SELECT rather than INSERT or UPDATE).

impl<F> QueryEach<F> for PreparedStatement where
    F: FnMut(&mut ResultRow) -> SqliteResult<()>, 
[src]

Process rows from a query after binding parameters.

For call each_row(row) for each resulting step, exiting on Err.

impl<F, A> QueryFold<F, A> for PreparedStatement where
    F: Fn(&mut ResultRow, A) -> SqliteResult<A>, 
[src]

Fold rows from a query after binding parameters.

impl<F, T> Query<F, T> for PreparedStatement where
    F: FnMut(&mut ResultRow) -> SqliteResult<T>, 
[src]

Iterate over query results after binding parameters. Read more