✓ Uses Rust 2018 edition
|new 0.1.10||Jan 23, 2020|
|0.1.9||Jan 22, 2020|
|0.1.4||Dec 30, 2019|
#61 in Database interfaces
1,451 downloads per month
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
full: All connectors and a pooled
full-postgresql: Pooled support for PostgreSQL
full-mysql: Pooled support for MySQL
full-sqlite: Pooled support for SQLite
single: All connectors, but no pooling
single-postgresql: Single connection support for PostgreSQL
single-mysql: Single connection support for MySQL
single-sqlite: Single connection support for SQLite
- 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.
- Database-level type-safety in query building or being an ORM.
For type-safe database abstraction, Diesel is an excellent choice.
.envrcfor connection params. Override variables if different. MySQL and PostgreSQL needs to be running for tests to succeed.
> cargo test
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. If using Tracing,
compiling Quaint with the
tracing-log feature flag will parameterize the
logged queries into a more suitable format for Tracing.