| Crates.io | sqlx-exasol |
| lib.rs | sqlx-exasol |
| version | 0.9.2 |
| created_at | 2023-09-04 01:44:25.421515+00 |
| updated_at | 2026-01-23 13:22:08.836072+00 |
| description | Exasol driver for the SQLx framework. |
| homepage | |
| repository | https://github.com/bobozaur/sqlx-exasol |
| max_upload_size | |
| id | 962551 |
| size | 199,308 |
A database driver for Exasol to be used with the Rust sqlx framework, based on the Exasol Websocket API. Inspired by Py-Exasol and based on the (now archived) rust-exasol sync driver.
Based on sqlx version 0.9.0-alpha.1.
The driver re-exports all sqlx public API and implements the exposed traits. As a result,
it can do all the drivers shipped with sqlx do, with some caveats:
Limitations
Additions
The driver now supports compile-time query validation and can be used alongside
sqlx within the same crate. Note however that derive proc-macros from sqlx are
database agnostic and thus sqlx-exasol just re-exports them as-is.
The driver uses its own CLI utility (built on the same sqlx-cli library):
cargo install sqlx-exasol-cli
# Usage is exactly the same as sqlx-cli
sqlx-exasol database create
sqlx-exasol database drop
sqlx-exasol migrate add <name>
sqlx-exasol migrate run
cargo sqlx-exasol prepare
The connection string is expected to be an URL with the exa:// scheme, e.g:
exa://sys:exasol@localhost:8563.
See the crate level documentation for a list of supported connection string parameters.
use std::env;
use sqlx_exasol::{error::*, *};
let pool = ExaPool::connect(&env::var("DATABASE_URL").unwrap()).await?;
let mut con = pool.acquire().await?;
sqlx_exasol::query("CREATE SCHEMA RUST_DOC_TEST")
.execute(&mut *con)
.await?;
See the crate documentation for more details and advanced examples.
Licensed under either of
at your option.
Contributions to this repository, unless explicitly stated otherwise, will be considered dual-licensed under MIT and Apache 2.0. Bugs/issues encountered can be opened here
1: Exasol has no advisory or database locks and simple, unnested, transactions are unfortunately not enough to define a mechanism so that concurrent migrations do not collide. This does not pose a problem when migrations are run sequentially or do not act on the same database objects.
2: Exasol does not provide the information of whether a column is nullable or not, so the driver cannot implicitly decide whether a NULL value can go into a certain database column or not until it actually tries.