pub struct PostgresClient {
pub pool: Pool<Postgres>,
/* private fields */
}
Fields§
§pool: Pool<Postgres>
Implementations§
Source§impl PostgresClient
impl PostgresClient
pub fn new(pool: Pool<Postgres>) -> Result<Self, Error>
pub async fn insert_drift_record( &self, record: &DriftRecord, ) -> Result<PgQueryResult, Error>
pub async fn insert_drift_profile( &self, monitor_profile: &MonitorProfile, ) -> Result<PgQueryResult, Error>
pub async fn insert_drift_records( &self, records: &[DriftRecord], ) -> Result<PgQueryResult, Error>
pub async fn get_binned_drift_records( &self, name: &str, repository: &str, version: &str, max_data_points: &i32, time_window: &i32, ) -> Result<QueryResult, Error>
pub async fn get_drift_records( &self, name: &str, repository: &str, version: &str, limit_timestamp: &str, ) -> Result<QueryResult, Error>
pub async fn raw_query(&self, query: &str) -> Result<Vec<PgRow>, Error>
Trait Implementations§
Source§impl Clone for PostgresClient
impl Clone for PostgresClient
Source§fn clone(&self) -> PostgresClient
fn clone(&self) -> PostgresClient
Returns a copy 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 PostgresClient
impl !RefUnwindSafe for PostgresClient
impl Send for PostgresClient
impl Sync for PostgresClient
impl Unpin for PostgresClient
impl !UnwindSafe for PostgresClient
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