pub struct Database { /* private fields */ }Expand description
Conexión gestionada a la base de datos SQLite.
Implementations§
Source§impl Database
impl Database
Sourcepub fn open(path: &Path) -> Result<Self>
pub fn open(path: &Path) -> Result<Self>
Abre o crea la base de datos en la ruta indicada y aplica migraciones.
Sourcepub fn with_crypto(self, crypto: Arc<Mutex<CryptoEngine>>) -> Self
pub fn with_crypto(self, crypto: Arc<Mutex<CryptoEngine>>) -> Self
Asigna el motor de encriptación.
Sourcepub fn memories(&self) -> MemoryStore
pub fn memories(&self) -> MemoryStore
Retorna un store de memorias.
Sourcepub fn sessions(&self) -> SessionStore
pub fn sessions(&self) -> SessionStore
Retorna un store de sesiones.
Sourcepub fn embeddings(&self) -> EmbeddingStore
pub fn embeddings(&self) -> EmbeddingStore
Retorna un store de embeddings.
Sourcepub fn entities(&self) -> EntityStore
pub fn entities(&self) -> EntityStore
Retorna un store de entidades extraídas.
Sourcepub fn get_conn(&self) -> Arc<Mutex<Connection>>
pub fn get_conn(&self) -> Arc<Mutex<Connection>>
Retorna una copia del Arc de conexion.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Database
impl RefUnwindSafe for Database
impl Send for Database
impl Sync for Database
impl Unpin for Database
impl UnsafeUnpin for Database
impl UnwindSafe for Database
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more