Skip to main content

odbc_api/
lib.rs

1//! # About
2//!
3//! `odbc-api` enables you to write applications which utilize ODBC (Open Database Connectivity)
4//! standard to access databases. See the [`guide`] for more information and code
5//! examples.
6
7mod columnar_bulk_inserter;
8mod connection;
9mod conversion;
10mod cursor;
11mod driver_complete_option;
12mod environment;
13mod error;
14mod execute;
15mod fixed_sized;
16mod into_parameter;
17mod narrow;
18mod nullable;
19mod parameter_collection;
20mod preallocated;
21mod preallocated_polling;
22mod prepared;
23mod result_set_metadata;
24mod shared_connection;
25mod sleep;
26
27pub mod buffers;
28pub mod guide;
29pub mod handles;
30pub mod parameter;
31
32pub use self::{
33    columnar_bulk_inserter::{
34        BoundInputSlice, ColumnarBulkInserter, InOrder, InputParameterMapping,
35    },
36    connection::{Connection, ConnectionOptions, ConnectionTransitions, escape_attribute_value},
37    conversion::{decimal_text_to_i32, decimal_text_to_i64, decimal_text_to_i128},
38    cursor::{
39        BlockCursor, BlockCursorIterator, BlockCursorPolling, ConcurrentBlockCursor, Cursor,
40        CursorImpl, CursorPolling, CursorRow, RowSetBuffer, TruncationInfo,
41    },
42    driver_complete_option::DriverCompleteOption,
43    environment::{DataSourceInfo, DriverInfo, Environment, environment},
44    error::{Error, TooLargeBufferSize},
45    fixed_sized::Bit,
46    handles::{ColumnDescription, DataType, Nullability},
47    into_parameter::IntoParameter,
48    narrow::Narrow,
49    nullable::Nullable,
50    parameter::{InOut, Out, OutputParameter},
51    parameter_collection::{ParameterCollection, ParameterCollectionRef, ParameterTupleElement},
52    preallocated::{Preallocated, PrimaryKeysRow},
53    preallocated_polling::PreallocatedPolling,
54    prepared::Prepared,
55    result_set_metadata::ResultSetMetadata,
56    shared_connection::SharedConnection,
57    sleep::Sleep,
58};
59
60/// Reexports `odbc-sys` as sys to enable applications to always use the same version as this
61/// crate.
62pub use odbc_sys as sys;
63pub use widestring::{U16Str, U16String};
64
65// Reexport fetch if derive feature is enabled
66#[cfg(feature = "derive")]
67pub use odbc_api_derive::Fetch;