pub struct PostgreSQLQuery { /* private fields */ }Implementations§
Source§impl PostgreSQLQuery
impl PostgreSQLQuery
Sourcepub async fn new(uri: &str) -> Result<Self, Error>
pub async fn new(uri: &str) -> Result<Self, Error>
Options and flags which can be used to configure a PostgreSQL connection.
Described by libpq.
The general form for a connection URI is:
postgresql://[user[:password]@][host][:port][/dbname][?param1=value1&...]§Parameters
| Parameter | Default | Description |
|---|---|---|
sslmode | prefer | Determines whether or with what priority a secure SSL TCP/IP connection will be negotiated |
sslrootcert | None | Sets the name of a file containing a list of trusted SSL Certificate Authorities. |
statement-cache-capacity | 100 | The maximum number of prepared statements stored in the cache. Set to 0 to disable. |
host | None | Path to the directory containing a PostgreSQL unix domain socket, which will be used instead of TCP if set. |
hostaddr | None | Same as host, but only accepts IP addresses. |
application-name | None | The name will be displayed in the pg_stat_activity view and included in CSV log entries. |
user | result of whoami | PostgreSQL user name to connect as. |
password | None | Password to be used if the server demands password authentication. |
port | 5432 | Port number to connect to at the server host, or socket file name extension for Unix-domain connections. |
dbname | None | The database name. |
The URI scheme designator can be either postgresql:// or postgres://.
Each of the URI parts is optional.
postgresql://
postgresql://localhost
postgresql://localhost:5433
postgresql://localhost/mydb
postgresql://user@localhost
postgresql://user:secret@localhost
postgresql://localhost?dbname=mydb&user=postgres&password=postgresTrait Implementations§
Source§impl Clone for PostgreSQLQuery
impl Clone for PostgreSQLQuery
Source§fn clone(&self) -> PostgreSQLQuery
fn clone(&self) -> PostgreSQLQuery
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 PostgreSQLQuery
impl Debug for PostgreSQLQuery
Source§impl Query for PostgreSQLQuery
impl Query for PostgreSQLQuery
fn accounts(&self) -> impl Future<Output = Result<Vec<Self::A>, Error>> + Send
fn accounts_contains_name_ignore_case( &self, name: &str, ) -> impl Future<Output = Result<Vec<Self::A>, Error>> + Send
fn splits(&self) -> impl Future<Output = Result<Vec<Self::S>, Error>> + Send
fn transactions( &self, ) -> impl Future<Output = Result<Vec<Self::T>, Error>> + Send
fn prices(&self) -> impl Future<Output = Result<Vec<Self::P>, Error>> + Send
fn currencies(&self) -> impl Future<Output = Result<Vec<Self::C>, Error>> + Send
fn commodities( &self, ) -> impl Future<Output = Result<Vec<Self::C>, Error>> + Send
Auto Trait Implementations§
impl Freeze for PostgreSQLQuery
impl !RefUnwindSafe for PostgreSQLQuery
impl Send for PostgreSQLQuery
impl Sync for PostgreSQLQuery
impl Unpin for PostgreSQLQuery
impl !UnwindSafe for PostgreSQLQuery
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