docs.rs failed to build saola-quaint-0.2.0-alpha.14
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Quaint
Quaint is an abstraction over certain SQL databases. It provides:
- An AST for building dynamic SQL queries.
- Visitors for different databases to generate SQL strings.
- Connectors to abstract over results and querying.
- Pooling with mobc
- Async/await and Futures 0.3
Feature flags
mysql: Support for MySQL databases.- On non-WebAssembly targets, choose
mysql-nativeinstead.
- On non-WebAssembly targets, choose
postgresql: Support for PostgreSQL databases.- On non-WebAssembly targets, choose
postgresql-nativeinstead.
- On non-WebAssembly targets, choose
sqlite: Support for SQLite databases.- On non-WebAssembly targets, choose
sqlite-nativeinstead.
- On non-WebAssembly targets, choose
mssql: Support for Microsoft SQL Server databases.- On non-WebAssembly targets, choose
mssql-nativeinstead.
- On non-WebAssembly targets, choose
pooled: A connection pool inpooled::Quaint.vendored-openssl: Statically links against a vendored OpenSSL library on non-Windows or non-Apple platforms.fmt-sql: Enables logging SQL queries formatted. TheFMT_SQLenv var must be present for the formatting to be enabled.
Goals:
- Query generation when the database and conditions are not known beforehand.
- Parameterized queries and SQL injection protection.
- A modular design, a separate AST and separate visitors and connectors.
Non-goals:
- Database-level type-safety in query building or being an ORM.
For type-safe database abstraction, Diesel is an excellent choice.
Building
> cargo
Testing
- See
.envrcfor connection params. Override variables if different. MySQL, PostgreSQL and SQL Server needs to be running for tests to succeed.
Then:
> cargo
Query debug
The queries can be logged by setting the LOG_QUERIES environment variable to any
value. They'll be logged at the INFO level and are visible when having a
logger in scope.
The FMT_SQL environment variable can be used to log formatted SQL queries. Beware, the fmt-sql feature must be enabled too.
Generating docs
This requires the rust nightly channel:
> cargo
Documentation index would be created at $CARGO_TARGET_DIR/doc/quaint/index.html.
Security
If you have a security issue to report, please contact us at security@prisma.io.