pub struct DatabaseSource {
pub connection_string: String,
pub database_type: DatabaseType,
pub table_name: String,
pub geometry_column: String,
pub id_column: Option<String>,
pub srid: Option<i32>,
pub schema: Option<String>,
pub count_cache: Option<CountCacheConfig>,
}Expand description
Database source configuration
Fields§
§connection_string: StringConnection string
database_type: DatabaseTypeDatabase type
table_name: StringTable name
geometry_column: StringGeometry column name
id_column: Option<String>Feature ID column name (optional)
srid: Option<i32>SRID for spatial operations
schema: Option<String>Schema name (optional)
count_cache: Option<CountCacheConfig>Count cache settings
Implementations§
Source§impl DatabaseSource
impl DatabaseSource
Sourcepub fn new(
connection_string: impl Into<String>,
table_name: impl Into<String>,
) -> Self
pub fn new( connection_string: impl Into<String>, table_name: impl Into<String>, ) -> Self
Create a new database source
Sourcepub fn with_database_type(self, db_type: DatabaseType) -> Self
pub fn with_database_type(self, db_type: DatabaseType) -> Self
Set the database type
Sourcepub fn with_geometry_column(self, column: impl Into<String>) -> Self
pub fn with_geometry_column(self, column: impl Into<String>) -> Self
Set the geometry column name
Sourcepub fn with_id_column(self, column: impl Into<String>) -> Self
pub fn with_id_column(self, column: impl Into<String>) -> Self
Set the ID column name
Sourcepub fn with_schema(self, schema: impl Into<String>) -> Self
pub fn with_schema(self, schema: impl Into<String>) -> Self
Set the schema name
Sourcepub fn with_count_cache(self, cache: CountCacheConfig) -> Self
pub fn with_count_cache(self, cache: CountCacheConfig) -> Self
Set count cache configuration
Sourcepub fn without_count_cache(self) -> Self
pub fn without_count_cache(self) -> Self
Disable count caching
Sourcepub fn qualified_table_name(&self) -> String
pub fn qualified_table_name(&self) -> String
Get the fully qualified table name
Trait Implementations§
Source§impl Clone for DatabaseSource
impl Clone for DatabaseSource
Source§fn clone(&self) -> DatabaseSource
fn clone(&self) -> DatabaseSource
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 moreAuto Trait Implementations§
impl Freeze for DatabaseSource
impl RefUnwindSafe for DatabaseSource
impl Send for DatabaseSource
impl Sync for DatabaseSource
impl Unpin for DatabaseSource
impl UnsafeUnpin for DatabaseSource
impl UnwindSafe for DatabaseSource
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