Type Definition rucash::postgresql::PostgreSQLBook[][src]

type PostgreSQLBook = Book<Pool<Postgres>>;

Trait Implementations

impl BookT for PostgreSQLBook[src]

fn new(uri: &str) -> Result<Self, Box<dyn Error>>[src]

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

ParameterDefaultDescription
sslmodepreferDetermines whether or with what priority a secure SSL TCP/IP connection will be negotiated
sslrootcertNoneSets the name of a file containing a list of trusted SSL Certificate Authorities.
statement-cache-capacity100The maximum number of prepared statements stored in the cache. Set to 0 to disable.
hostNonePath to the directory containing a PostgreSQL unix domain socket, which will be used instead of TCP if set.
hostaddrNoneSame as host, but only accepts IP addresses.
application-nameNoneThe name will be displayed in the pg_stat_activity view and included in CSV log entries.
userresult of whoamiPostgreSQL user name to connect as.
passwordNonePassword to be used if the server demands password authentication.
port5432Port number to connect to at the server host, or socket file name extension for Unix-domain connections.
dbnameNoneThe 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=postgres

type DB = Pool<Postgres>

fn accounts(&self) -> Result<Vec<Account>, Box<dyn Error>>[src]

fn accounts_contains_name(
    &self,
    name: &str
) -> Result<Vec<Account>, Box<dyn Error>>
[src]

fn splits(&self) -> Result<Vec<Split>, Box<dyn Error>>[src]

fn transactions(&self) -> Result<Vec<Transaction>, Box<dyn Error>>[src]

fn prices(&self) -> Result<Vec<Price>, Box<dyn Error>>[src]

fn currencies(&self) -> Result<Vec<Commodity>, Box<dyn Error>>[src]

fn commodities(&self) -> Result<Vec<Commodity>, Box<dyn Error>>[src]

fn account_by_name(
    &self,
    name: &str
) -> Result<Option<Item<_Account, Self::DB>>, Box<dyn Error>>
[src]