1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
//! ODBC database driver building blocks for SQLx.
//!
//! This crate is being ported as an independent split driver crate. It intentionally depends on
//! published crates from crates.io only; it does not depend on a local SQLx checkout.
//!
//! ## Test Setup
//!
//! Fast tests do not require an ODBC data source:
//!
//! ```sh
//! cargo test
//! ```
//!
//! Integration smoke tests use `ODBC_DATABASE_URL` and skip cleanly when it is absent:
//!
//! ```sh
//! ODBC_DATABASE_URL='DSN=MyDataSource;UID=user;PWD=password' cargo test --test odbc
//! ```
//!
//! To run the same tests locally against a known installed driver:
//!
//! ```sh
//! scripts/test-driver.sh duckdb
//! DUCKDB_ODBC_DRIVER=/absolute/path/to/libduckdb_odbc.so scripts/test-driver.sh duckdb
//! ODBC_DATABASE_URL='DSN=MyDataSource;UID=user;PWD=password' scripts/test-driver.sh custom
//! ```
//!
//! `ODBC_DATABASE_URL` may be a standard ODBC connection string, a bare DSN name, or the legacy
//! `odbc:` form:
//!
//! ```text
//! DSN=MyDataSource
//! Driver={ODBC Driver 17 for SQL Server};Server=localhost;Database=test
//! FILEDSN=/path/to/file.dsn
//! odbc:DSN=MyDataSource
//! MyDataSource
//! ```
//!
//! Native requirements are provided by the operating system:
//!
//! - Unix-like systems need an ODBC driver manager such as `unixODBC`.
//! - A database-specific ODBC driver must be installed and visible to the driver manager.
//! - DSN names must be configured in the driver manager's usual files or registry locations.
//! - Buffered fetching can truncate long text or binary values when `max_column_size` is set.
//! - Enable the `vendored-unix-odbc` feature to statically link the unixODBC driver manager.
pub use ;
pub use OdbcColumn;
pub use OdbcConnection;
pub use Odbc;
pub use ;
pub use ;
pub use OdbcQueryResult;
pub use OdbcRow;
pub use OdbcStatement;
pub use OdbcTransactionManager;
pub use ;
pub use ;
/// An alias for [`Pool`][sqlx_core::pool::Pool], specialized for ODBC.
pub type OdbcPool = Pool;
/// An alias for [`PoolOptions`][sqlx_core::pool::PoolOptions], specialized for ODBC.
pub type OdbcPoolOptions = PoolOptions;
/// An alias for [`Transaction`][sqlx_core::transaction::Transaction], specialized for ODBC.
pub type OdbcTransaction<'c> = Transaction;
/// An alias for [`Executor<'_, Database = Odbc>`][sqlx_core::executor::Executor].