database 0.1.0

The package provides a relational database.
docs.rs failed to build database-0.1.0
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 query = CreateTable::new()
                        .name("foo")
                        .column(|column| column.name("bar").kind(Type::Float))
                        .column(|column| column.name("baz").kind(Type::Integer));
database.execute(query).unwrap();

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

let query = Select::new().table("foo");
let mut statement = database.prepare(query).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.