Crates.io | finql-postgres |
lib.rs | finql-postgres |
version | 0.3.0 |
source | src |
created_at | 2021-02-01 21:51:42.632356 |
updated_at | 2021-07-06 13:50:56.82007 |
description | Internal crate used by finql implementing the postgres adaptor |
homepage | |
repository | https://github.com/xemwebe/finql |
max_upload_size | |
id | 349417 |
size | 68,595 |
finql-postgres is an implementation of the finql-data data handler trait used by the finql crate. The implementation an adaptor to the postgreSQL database. It is only useful in connection with finql.
The implementation is based on sqlx, which uses macros to enable query checking at compile time. In order to achieve this, a valid database must be specified, otherwise the build will fail.
Therefore, pleas follow the following steps to build the library:
finqltester
data/finqlpg.sql
to a database of your choice, e.g. bypsql <databasename> < data/finqlpg.sql
as some user with write to create new databases, PostgreSQL's default user
postgres
.
export DATABASE_URL="postgresql://127.0.0.1/<databasename>?user=finqltester&password=<password>&ssl=false"
for a http connection or
export DATABASE_URL="postgresql:///<databasename>?user=finqltester&password=<password>&ssl=false"
for a connection via UNIX socket, depending on your setup.
cargo build
Please note that this database is only used once for building the library and performing all the compile time checks. Once the build is complete, the database handler is able to set up a new empty database.