Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Rusqlite
Rusqlite is an ergonomic wrapper for using SQLite from Rust. It attempts to expose an interface similar to rust-postgres. View the full API documentation.
extern crate rusqlite;
extern crate time;
use Timespec;
use SqliteConnection;
Design of SqliteRows and SqliteRow
To retrieve the result rows from a query, SQLite requires you to call
sqlite3_step() on a prepared statement. You can only
retrieve the values of the "current" row. From the Rust point of view, this means that each row
is only valid until the next row is fetched. rust-sqlite3
solves this the correct way with lifetimes. However, this means that the result rows do not
satisfy the Iterator trait, which means
you cannot (as easily) loop over the rows, or use many of the helpful Iterator methods like map
and filter
.
Instead, Rusqlite's SqliteRows
handle does conform to Iterator
. It ensures safety by
performing checks at runtime to ensure you do not try to retrieve the values of a "stale" row, and
will panic if you do so. A specific example that will panic:
There are other, less obvious things that may result in a panic as well, such as calling
collect()
on a SqliteRows
and then trying to use the collected rows.
Author
John Gallagher, johnkgallagher@gmail.com
License
Rusqlite is available under the MIT license. See the LICENSE file for more info.