7 unstable releases (3 breaking)
0.4.1 | Jul 25, 2024 |
---|---|
0.4.0 | Jul 22, 2024 |
0.3.0 | Dec 16, 2023 |
0.2.1 | Nov 20, 2023 |
0.1.1 | Sep 15, 2023 |
#1019 in Database interfaces
27KB
496 lines
ankidb
ankidb
gives you an opinionated API to Anki's database.
use ankidb::{Database, query::{self, AnkiExt}};
let db = Database::open(&"/path/to/collection.anki2")?;
let (mut stmt, bind) = db.prepare(query::revlog().count_star())?;
let res: i64 = stmt.query_row(&*bind.as_params(), |row| row.get(0))?;
assert!(res > 100);
lib.rs
:
ankidb
gives you an opinionated API to Anki's database.
use ankidb::{Database, query::{self, AnkiExt}};
let db = Database::open(&"/path/to/collection.anki2")?;
let (mut stmt, bind) = db.prepare(query::revlog().count_star())?;
let res: i64 = stmt.query_row(&*bind.as_params(), |row| row.get(0))?;
assert!(res > 100);
Dependencies
~25MB
~482K SLoC