19 releases
0.7.6 | Dec 11, 2023 |
---|---|
0.7.5 | Sep 16, 2023 |
0.7.2 | Jun 1, 2023 |
0.5.1 | Feb 4, 2023 |
0.1.6 | Nov 9, 2022 |
#1797 in Database interfaces
618 downloads per month
Used in ac-qu-ai-nt-core
6MB
151K
SLoC
Cozo-core
This crate contains the implementation proper of CozoDB.
lib.rs
:
This crate provides the core functionalities of CozoDB. It may be used to embed CozoDB in your application.
This doc describes the Rust API. To learn how to use CozoDB to query (CozoScript), see:
Rust API usage:
use cozo::*;
let db = DbInstance::new("mem", "", Default::default()).unwrap();
let script = "?[a] := a in [1, 2, 3]";
let result = db.run_script(script, Default::default(), ScriptMutability::Immutable).unwrap();
println!("{:?}", result);
We created an in-memory database above. There are other persistent options: see DbInstance::new. It is perfectly fine to run multiple storage engines in the same process.
Dependencies
~26–45MB
~677K SLoC