Expand description
An experimental embedded SQL-like DBMS featuring:
- Core SQL:
SELECT,UPDATE,DELETE,INSERT - Graph expressions - support for graph-style joins and navigation
- ACID compliance - fully transactional storage engine
- System catalogue - introspection via internal tables
- E-graph based query optimization - advanced rewrite and cost-based planning
- Time-traveling queries - access to full historical data versions
More about these features in the readme.
Typical library usage:
let mut db = Db::open("db.matdb".into())?;
db.run("CREATE TABLE messages (id INT PRIMARY KEY, body TEXT NOT NULL);", Vec::new())?;
db.run("INSERT INTO messages (id, body) VALUES (?0, ?1);", vec![1.into(), "Hello, matdb!".to_string().into()])?;
db.finish_tx()?;
assert_eq!(
Value::String("Hello, matdb!".to_string()),
db.run("SELECT body FROM messages WHERE id = 1;", Vec::new())?.unwrap().rows[0][0]
);Structs§
- Db
- This is the main
matdbAPI through which all interaction with the database is done. - Result
Set - The result of an SQL query.
Enums§
- Value
- A
matdbscalar SQL value.