Type Definition rucash::postgresql::PostgreSQLBook [−][src]
type PostgreSQLBook = Book<Pool<Postgres>>;
Trait Implementations
impl BookT for PostgreSQLBook
[src]
impl BookT for PostgreSQLBook
[src]fn new(uri: &str) -> Result<Self, Box<dyn Error>>
[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
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=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]
&self,
name: &str
) -> Result<Vec<Account>, Box<dyn Error>>
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]
&self,
name: &str
) -> Result<Option<Item<_Account, Self::DB>>, Box<dyn Error>>