Struct sqlite3::core::DatabaseConnection [] [src]

pub struct DatabaseConnection { /* fields omitted */ }

A connection to a sqlite3 database.

Methods

impl DatabaseConnection
[src]

Given explicit access to a database, attempt to connect to it.

Note SqliteError code is accompanied by (copy) of sqlite3_errmsg().

Opt out of copies of error message details.

Create connection to an in-memory database.

  • TODO: integrate sqlite3_errmsg()

Prepare/compile an SQL statement.

Prepare/compile an SQL statement and give offset to remaining text.

TODO: give caller a safe way to use the offset. Perhaps return a &'x str?

Return a copy of the latest error message.

Return "" in case of ill-formed utf-8 or null.

TODO: represent error state in types: "If a prior API call failed but the most recent API call succeeded, the return value from sqlite3_errcode() is undefined."

cf ffi::sqlite3_errmsg.

One-Step Query Execution Interface

cf sqlite3_exec

  • TODO: callback support?
  • TODO: errmsg support

Return the number of database rows that were changed or inserted or deleted by the most recently completed SQL statement.

cf sqlite3_changes.

Set a busy timeout and clear any previously set handler. If duration is zero or negative, turns off busy handler.

Return the rowid of the most recent successful INSERT into a rowid table or virtual table.

cf sqlite3_last_insert_rowid

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