pub struct Db {
pub conn: Connection,
}Fields§
§conn: ConnectionImplementations§
Source§impl Db
impl Db
Sourcepub fn in_memory() -> Result<Self>
pub fn in_memory() -> Result<Self>
Open an in-memory database with the beck schema applied. Used by the Phase 0 eval harness and unit tests.
Sourcepub fn open(path: &Path) -> Result<Self>
pub fn open(path: &Path) -> Result<Self>
Open or create a persistent SQLite file at path with the beck schema.
The parent directory must already exist.
Sourcepub fn description_bytes(&self) -> Result<i64>
pub fn description_bytes(&self) -> Result<i64>
Total bytes of description text across all skills.
Used by beck bench for the tokens-saved calculation.
Sourcepub fn body_bytes(&self) -> Result<i64>
pub fn body_bytes(&self) -> Result<i64>
Total bytes of body text across all skills.
Auto Trait Implementations§
impl !Freeze for Db
impl !RefUnwindSafe for Db
impl Send for Db
impl !Sync for Db
impl Unpin for Db
impl UnsafeUnpin for Db
impl !UnwindSafe for Db
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more