Crates.io | ankidb |
lib.rs | ankidb |
version | 0.4.1 |
source | src |
created_at | 2023-09-15 16:50:34.676444 |
updated_at | 2024-07-25 21:12:08.335412 |
description | Opinionated library for interacting with Anki's database |
homepage | |
repository | https://github.com/sartak/ankidb |
max_upload_size | |
id | 973809 |
size | 28,247 |
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);