pub struct PostgresAdapter { /* private fields */ }Expand description
PostgreSQL adapter
Implementations§
Source§impl PostgresAdapter
impl PostgresAdapter
pub fn new(config: ConnectionConfig) -> Self
pub async fn initialize(&mut self) -> Result<(), DataSourceError>
Trait Implementations§
Source§impl DataSource for PostgresAdapter
impl DataSource for PostgresAdapter
Source§fn source_type(&self) -> &str
fn source_type(&self) -> &str
Get the data source type
Source§fn connect<'life0, 'life1, 'async_trait>(
&'life0 self,
_config: &'life1 ConnectionConfig,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Connection>, DataSourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn connect<'life0, 'life1, 'async_trait>(
&'life0 self,
_config: &'life1 ConnectionConfig,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Connection>, DataSourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Connect to the data source
Source§fn test_connection<'life0, 'life1, 'async_trait>(
&'life0 self,
_config: &'life1 ConnectionConfig,
) -> Pin<Box<dyn Future<Output = Result<bool, DataSourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn test_connection<'life0, 'life1, 'async_trait>(
&'life0 self,
_config: &'life1 ConnectionConfig,
) -> Pin<Box<dyn Future<Output = Result<bool, DataSourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Test the connection
Source§fn supported_features(&self) -> Vec<String>
fn supported_features(&self) -> Vec<String>
Get supported features
Source§fn connection_limits(&self) -> ConnectionLimits
fn connection_limits(&self) -> ConnectionLimits
Get connection limits
Source§fn get_stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<DataSourceStats, DataSourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<DataSourceStats, DataSourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get data source statistics
Auto Trait Implementations§
impl Freeze for PostgresAdapter
impl !RefUnwindSafe for PostgresAdapter
impl Send for PostgresAdapter
impl Sync for PostgresAdapter
impl Unpin for PostgresAdapter
impl !UnwindSafe for PostgresAdapter
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> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> SerializableKey for T
impl<T> SerializableKey for T
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.