pub struct SchemaManager;Implementations§
Source§impl SchemaManager
impl SchemaManager
pub fn new() -> Self
Sourcepub fn bootstrap(
&self,
conn: &Connection,
) -> Result<BootstrapReport, SchemaError>
pub fn bootstrap( &self, conn: &Connection, ) -> Result<BootstrapReport, SchemaError>
Bootstrap the database schema, applying any pending migrations.
§Errors
Returns SchemaError if any migration or metadata-table SQL fails,
or SchemaError::VersionMismatch if the database has been migrated
to a version newer than this engine supports.
pub fn current_version(&self) -> SchemaVersion
pub fn migrations(&self) -> &'static [Migration]
Sourcepub fn initialize_connection(
&self,
conn: &Connection,
) -> Result<(), SchemaError>
pub fn initialize_connection( &self, conn: &Connection, ) -> Result<(), SchemaError>
Set the recommended SQLite connection pragmas for fathomdb.
§Errors
Returns SchemaError if any PRAGMA fails to execute.
Sourcepub fn initialize_reader_connection(
&self,
conn: &Connection,
) -> Result<(), SchemaError>
pub fn initialize_reader_connection( &self, conn: &Connection, ) -> Result<(), SchemaError>
Initialize a read-only connection with PRAGMAs that are safe for readers.
Skips journal_mode (requires write; the writer already set WAL),
synchronous (irrelevant for readers), and journal_size_limit
(requires write).
§Errors
Returns SchemaError if any PRAGMA fails to execute.
Sourcepub fn ensure_vector_profile(
&self,
_conn: &Connection,
_profile: &str,
_table_name: &str,
_dimension: usize,
) -> Result<(), SchemaError>
pub fn ensure_vector_profile( &self, _conn: &Connection, _profile: &str, _table_name: &str, _dimension: usize, ) -> Result<(), SchemaError>
§Errors
Always returns SchemaError::MissingCapability when the sqlite-vec
feature is not compiled in.
Trait Implementations§
Source§impl Clone for SchemaManager
impl Clone for SchemaManager
Source§fn clone(&self) -> SchemaManager
fn clone(&self) -> SchemaManager
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SchemaManager
impl Debug for SchemaManager
Source§impl Default for SchemaManager
impl Default for SchemaManager
Source§fn default() -> SchemaManager
fn default() -> SchemaManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SchemaManager
impl RefUnwindSafe for SchemaManager
impl Send for SchemaManager
impl Sync for SchemaManager
impl Unpin for SchemaManager
impl UnsafeUnpin for SchemaManager
impl UnwindSafe for SchemaManager
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