pub struct Sqlite { /* private fields */ }Implementations§
Source§impl Sqlite
impl Sqlite
Sourcepub fn new(path: PathBuf, embedder: Option<Arc<dyn Embedder>>) -> Sqlite
pub fn new(path: PathBuf, embedder: Option<Arc<dyn Embedder>>) -> Sqlite
The provider over the database at path (a file, made on first
use). With embedder, memories also get vectors and recall also
looks for memories near the query in meaning.
Sourcepub fn importing(self, files: Arc<Files>) -> Sqlite
pub fn importing(self, files: Arc<Files>) -> Sqlite
Copy in what files holds, once for each scope owner a call
reaches (see the module documentation). The files are only read.
pub fn path(&self) -> &Path
Sourcepub fn add_row(&self, row: &CollectorRow) -> Result<(), Error>
pub fn add_row(&self, row: &CollectorRow) -> Result<(), Error>
Keep a collector’s row, with its pane, session, and project.
Sourcepub fn rows(
&self,
collector: &str,
since_unix_ms: u64,
limit: usize,
) -> Result<Vec<CollectorRow>, Error>
pub fn rows( &self, collector: &str, since_unix_ms: u64, limit: usize, ) -> Result<Vec<CollectorRow>, Error>
A collector’s rows at or after since_unix_ms, oldest first, at
most limit.
Sourcepub fn set_summary(&self, session: &str, text: &str) -> Result<Summary, Error>
pub fn set_summary(&self, session: &str, text: &str) -> Result<Summary, Error>
Keep text as the summary of session, replacing the one there.
pub fn summary(&self, session: &str) -> Result<Option<Summary>, Error>
Trait Implementations§
Source§impl Provider for Sqlite
impl Provider for Sqlite
fn remember(&self, cx: &Context, new: New) -> Result<Memory, Error>
Source§fn list(
&self,
cx: &Context,
scope: Option<Scope>,
kind: Option<Kind>,
) -> Result<Found, Error>
fn list( &self, cx: &Context, scope: Option<Scope>, kind: Option<Kind>, ) -> Result<Found, Error>
Newest first.
fn get(&self, cx: &Context, id: &str) -> Result<Memory, Error>
fn update( &self, cx: &Context, id: &str, change: Change, ) -> Result<Memory, Error>
Source§fn forget(&self, cx: &Context, id: &str) -> Result<Memory, Error>
fn forget(&self, cx: &Context, id: &str) -> Result<Memory, Error>
Remove a memory; returns what was removed.
Auto Trait Implementations§
impl !Freeze for Sqlite
impl !RefUnwindSafe for Sqlite
impl !UnwindSafe for Sqlite
impl Forget for Sqlite
impl Move for Sqlite
impl Send for Sqlite
impl Sync for Sqlite
impl Unpin for Sqlite
impl UnsafeUnpin for Sqlitewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<dyn Embedder> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Embedder>>: UnsafeUnpin,
Align4<u32>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
*mut sqlite3: UnsafeUnpin,
*const ArcInner<Mutex<*mut sqlite3>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<*mut sqlite3>>>: UnsafeUnpin,
PhantomData<NonNull<Node<Arc<str>, RawStatement>>>: UnsafeUnpin,
*const Node<Arc<str>, RawStatement> is !null: UnsafeUnpin,
*const ArcInner<Files> is !null: UnsafeUnpin,
PhantomData<ArcInner<Files>>: UnsafeUnpin,
PhantomData<Problem>: UnsafeUnpin,
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