database 0.3.1

The package provides a relational database.
docs.rs failed to build database-0.3.1
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.
Visit the last successful build: database-0.5.0

Database Version Status

The package provides a relational database.

Documentation

Example

use database::prelude::*;

let database: Database<SQLite> = Database::open(":memory:").unwrap();

let statement = create_table().name("foo")
                              .column(column().name("bar").kind(Type::Float))
                              .column(column().name("baz").kind(Type::Integer));
database.execute(statement).unwrap();

let statement = insert_into().table("foo").column("bar").column("baz");
let mut statement = database.prepare(statement).unwrap();
statement.execute(&[Value::Float(42.0), Value::Integer(69)]).unwrap();

let statement = select().table("foo");
let mut statement = database.prepare(statement).unwrap();
statement.execute(&[]).unwrap();

while let Some(record) = statement.next().unwrap() {
    assert_eq!(record[0], Value::Float(42.0));
    assert_eq!(record[1], Value::Integer(69));
}

Contributing

  1. Fork the project.
  2. Implement your idea.
  3. Open a pull request.