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
90
91
92
93
94
95
96
97
98
99
100
101
102
//! ODBC database driver (via `odbc-api`).
//!
//! ## Connection Strings
//!
//! When using the `Any` connection type, SQLx accepts standard ODBC connection strings:
//!
//! ```text
//! // DSN-based connection
//! DSN=MyDataSource;UID=myuser;PWD=mypassword
//!
//! // Driver-based connection
//! Driver={ODBC Driver 17 for SQL Server};Server=localhost;Database=test
//!
//! // File DSN
//! FILEDSN=/path/to/myfile.dsn
//! ```
//!
//! The `odbc:` URL scheme prefix is optional but still supported for backward compatibility:
//!
//! ```text
//! odbc:DSN=MyDataSource
//! ```
//!
//! ## Buffer Configuration
//!
//! You can configure buffer settings for performance tuning:
//!
//! ```rust,no_run
//! use std::str::FromStr;
//! use sqlx_core_oldapi::odbc::{OdbcConnectOptions, OdbcBufferSettings};
//!
//! let mut opts = OdbcConnectOptions::from_str("DSN=MyDataSource")?;
//!
//! // Configure for high-throughput buffered mode
//! opts.buffer_settings(OdbcBufferSettings {
//! batch_size: 256, // Fetch 256 rows at once
//! max_column_size: Some(2048), // Limit text columns to 2048 chars
//! });
//!
//! // Configure for unbuffered mode (no truncation, row-by-row processing)
//! opts.buffer_settings(OdbcBufferSettings {
//! batch_size: 128, // batch_size ignored in unbuffered mode
//! max_column_size: None, // Enable unbuffered mode
//! });
//!
//! // Or configure individual settings
//! opts.batch_size(512)
//! .max_column_size(Some(1024));
//!
//! // Switch to unbuffered mode
//! opts.max_column_size(None);
//! # Ok::<(), sqlx::Error>(())
//! ```
use crateExecutor;
pub use ;
pub use OdbcColumn;
pub use OdbcConnection;
pub use Odbc;
pub use ;
pub use OdbcQueryResult;
pub use ;
pub use ;
pub use OdbcTransactionManager;
pub use ;
pub use ;
/// An alias for [`Pool`][crate::pool::Pool], specialized for ODBC.
pub type OdbcPool = cratePool;
/// An alias for [`PoolOptions`][crate::pool::PoolOptions], specialized for ODBC.
pub type OdbcPoolOptions = cratePoolOptions;
/// An alias for [`Executor<'_, Database = Odbc>`][Executor].
// NOTE: required due to the lack of lazy normalization
impl_into_arguments_for_arguments!;
impl_executor_for_pool_connection!;
impl_executor_for_transaction!;
impl_column_index_for_row!;
impl_column_index_for_statement!;
impl_acquire!;
impl_into_maybe_pool!;
// custom Option<..> handling implemented in `arguments.rs`