pub struct PostgresConfig {
pub database_url: String,
pub pool: PoolConfig,
pub table: TableConfig,
pub performance: PerformanceConfig,
}
Expand description
PostgreSQL vector storage configuration
Fields§
§database_url: String
Database connection URL
pool: PoolConfig
Connection pool configuration
table: TableConfig
Table configuration
performance: PerformanceConfig
Performance settings
Implementations§
Source§impl PostgresConfig
impl PostgresConfig
Sourcepub fn new(database_url: impl Into<String>) -> Self
pub fn new(database_url: impl Into<String>) -> Self
Create a new PostgreSQL configuration with database URL
Sourcepub fn with_pool(self, pool: PoolConfig) -> Self
pub fn with_pool(self, pool: PoolConfig) -> Self
Set pool configuration
Sourcepub fn with_table(self, table: TableConfig) -> Self
pub fn with_table(self, table: TableConfig) -> Self
Set table configuration
Sourcepub fn with_performance(self, performance: PerformanceConfig) -> Self
pub fn with_performance(self, performance: PerformanceConfig) -> Self
Set performance configuration
Sourcepub fn table_name(&self, name: &str) -> String
pub fn table_name(&self, name: &str) -> String
Get the full table name with schema and prefix
Sourcepub fn index_name(&self, table_name: &str, index_type: &str) -> String
pub fn index_name(&self, table_name: &str, index_type: &str) -> String
Get the index name for a table
Trait Implementations§
Source§impl Clone for PostgresConfig
impl Clone for PostgresConfig
Source§fn clone(&self) -> PostgresConfig
fn clone(&self) -> PostgresConfig
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 PostgresConfig
impl Debug for PostgresConfig
Source§impl Default for PostgresConfig
impl Default for PostgresConfig
Source§impl<'de> Deserialize<'de> for PostgresConfig
impl<'de> Deserialize<'de> for PostgresConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PostgresConfig
impl RefUnwindSafe for PostgresConfig
impl Send for PostgresConfig
impl Sync for PostgresConfig
impl Unpin for PostgresConfig
impl UnwindSafe for PostgresConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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