pub struct PostgresConnection {
pub conn: PooledConnection<'static, PostgresConnectionManager<MakeTlsConnector>>,
/* private fields */
}Available on crate feature
postgres only.Fields§
§conn: PooledConnection<'static, PostgresConnectionManager<MakeTlsConnector>>Implementations§
Source§impl PostgresConnection
impl PostgresConnection
pub fn with_unsupported_type_action(self, action: UnsupportedTypeAction) -> Self
Trait Implementations§
Source§impl<'a> AsyncDbConnection<PooledConnection<'static, PostgresConnectionManager<MakeTlsConnector>>, &'a (dyn ToSql + Sync)> for PostgresConnection
impl<'a> AsyncDbConnection<PooledConnection<'static, PostgresConnectionManager<MakeTlsConnector>>, &'a (dyn ToSql + Sync)> for PostgresConnection
fn new( conn: PooledConnection<'static, PostgresConnectionManager<MakeTlsConnector>>, ) -> Self
fn tables<'life0, 'life1, 'async_trait>(
&'life0 self,
schema: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn schemas<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn get_schema<'life0, 'life1, 'async_trait>(
&'life0 self,
table_reference: &'life1 TableReference,
) -> Pin<Box<dyn Future<Output = Result<SchemaRef, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_schema<'life0, 'life1, 'async_trait>(
&'life0 self,
table_reference: &'life1 TableReference,
) -> Pin<Box<dyn Future<Output = Result<SchemaRef, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get the schema for a table reference. Read more
Source§fn query_arrow<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sql: &'life1 str,
params: &'life2 [&'a (dyn ToSql + Sync)],
projected_schema: Option<SchemaRef>,
) -> Pin<Box<dyn Future<Output = Result<SendableRecordBatchStream, GenericError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn query_arrow<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sql: &'life1 str,
params: &'life2 [&'a (dyn ToSql + Sync)],
projected_schema: Option<SchemaRef>,
) -> Pin<Box<dyn Future<Output = Result<SendableRecordBatchStream, GenericError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Query the database with the given SQL statement and parameters, returning a
Result of SendableRecordBatchStream. Read moreSource§fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sql: &'life1 str,
params: &'life2 [&'a (dyn ToSql + Sync)],
) -> Pin<Box<dyn Future<Output = Result<u64, GenericError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sql: &'life1 str,
params: &'life2 [&'a (dyn ToSql + Sync)],
) -> Pin<Box<dyn Future<Output = Result<u64, GenericError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Execute the given SQL statement with parameters, returning the number of affected rows. Read more
Source§impl<'a> DbConnection<PooledConnection<'static, PostgresConnectionManager<MakeTlsConnector>>, &'a (dyn ToSql + Sync)> for PostgresConnection
impl<'a> DbConnection<PooledConnection<'static, PostgresConnectionManager<MakeTlsConnector>>, &'a (dyn ToSql + Sync)> for PostgresConnection
fn as_any(&self) -> &dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
fn as_async( &self, ) -> Option<&dyn AsyncDbConnection<PooledConnection<'static, PostgresConnectionManager<MakeTlsConnector>>, &'a (dyn ToSql + Sync)>>
fn as_sync(&self) -> Option<&dyn SyncDbConnection<T, P>>
Source§impl SchemaValidator for PostgresConnection
impl SchemaValidator for PostgresConnection
Source§fn is_data_type_supported(data_type: &DataType) -> bool
fn is_data_type_supported(data_type: &DataType) -> bool
Available on crate features
sqlite or duckdb or postgres only.Source§fn unsupported_type_error(data_type: &DataType, field_name: &str) -> Self::Error
fn unsupported_type_error(data_type: &DataType, field_name: &str) -> Self::Error
Available on crate features
sqlite or duckdb or postgres only.Source§fn is_field_supported(field: &Arc<Field>) -> bool
fn is_field_supported(field: &Arc<Field>) -> bool
Available on crate features
sqlite or duckdb or postgres only.Source§fn is_schema_supported(schema: &SchemaRef) -> bool
fn is_schema_supported(schema: &SchemaRef) -> bool
Available on crate features
sqlite or duckdb or postgres only.Source§fn handle_unsupported_schema(
schema: &SchemaRef,
unsupported_type_action: UnsupportedTypeAction,
) -> Result<SchemaRef, Self::Error>
fn handle_unsupported_schema( schema: &SchemaRef, unsupported_type_action: UnsupportedTypeAction, ) -> Result<SchemaRef, Self::Error>
Available on crate features
sqlite or duckdb or postgres only.For a given input schema, rebuild it according to the
UnsupportedTypeAction.
Implemented for a specific connection type, that connection determines which types it supports.
If the UnsupportedTypeAction is Error/String, the function will return an error if the schema contains an unsupported data type.
If the UnsupportedTypeAction is Warn, the function will log a warning if the schema contains an unsupported data type and remove the column.
If the UnsupportedTypeAction is Ignore, the function will remove the column silently. Read moreAuto Trait Implementations§
impl Freeze for PostgresConnection
impl !RefUnwindSafe for PostgresConnection
impl Send for PostgresConnection
impl Sync for PostgresConnection
impl Unpin for PostgresConnection
impl !UnwindSafe for PostgresConnection
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> 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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request