pub struct PostgresBackend { /* private fields */ }Implementations§
Trait Implementations§
Source§impl BackendConn for PostgresBackend
impl BackendConn for PostgresBackend
type Db = Postgres
Source§fn connect(&self) -> impl Future<Output = Result<()>> + Send
fn connect(&self) -> impl Future<Output = Result<()>> + Send
Force-initialize the connection pool. Idempotent — second call is a no-op.
The DSN is sourced from the backend struct’s configuration (set when the
backend is constructed), not from arguments to this method.
fn acquire_create_lock( &self, tx: &mut Transaction<'_, Postgres>, key: &str, ) -> impl Future<Output = Result<()>> + Send
fn table_exists( &self, tx: &mut Transaction<'_, Postgres>, db: &str, table: &str, ) -> impl Future<Output = Result<bool>> + Send
fn embedding_dim( &self, tx: &mut Transaction<'_, Postgres>, db: &str, table: &str, ) -> impl Future<Output = Result<Option<usize>>> + Send
Source§impl BackendDialect for PostgresBackend
impl BackendDialect for PostgresBackend
const NAME: &'static str = "postgres"
const SUPPORTS_UPSERT: bool = true
fn quote_ident(&self, name: &str) -> String
fn fq_table(&self, db: &str, table: &str) -> String
fn vector_type_ddl(&self, dim: usize) -> String
fn json_type_ddl(&self) -> String
fn text_pk_type_ddl(&self) -> String
fn timestamp_now_default_ddl(&self) -> String
fn vector_literal(&self, arr: &[f32]) -> String
fn json_literal(&self, obj: &Value) -> String
fn json_path_sql(&self, col_expr: &str, dotted_path: &str) -> String
fn upsert_clause(&self, key_cols: &[&str], update_cols: &[&str]) -> String
fn create_database_sql(&self, name: &str) -> String
fn add_column_if_not_exists_sql( &self, fq: &str, col: &str, type_ddl: &str, ) -> String
fn drop_table_sql(&self, fq: &str) -> String
fn emit_chunks_table_ddl( &self, fq: &str, cols: &[ColSpec], hnsw: bool, _dim: usize, _engine: Option<&str>, vector_metric: Option<&str>, ) -> Vec<String>
Auto Trait Implementations§
impl !Freeze for PostgresBackend
impl !RefUnwindSafe for PostgresBackend
impl !UnwindSafe for PostgresBackend
impl Send for PostgresBackend
impl Sync for PostgresBackend
impl Unpin for PostgresBackend
impl UnsafeUnpin for PostgresBackend
Blanket Implementations§
impl<T> Backend for Twhere
T: BackendDialect + BackendConn,
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
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