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 catalog;
8mod columnar_bulk_inserter;
9mod connection;
10mod conversion;
11mod cursor;
12mod driver_complete_option;
13mod environment;
14mod error;
15mod execute;
16mod fixed_sized;
17mod into_parameter;
18mod narrow;
19mod nullable;
20mod parameter_collection;
21mod preallocated;
22mod preallocated_polling;
23mod prepared;
24mod result_set_metadata;
25mod shared_connection;
26mod sleep;
27
28pub mod buffers;
29pub mod guide;
30pub mod handles;
31pub mod parameter;
32
33pub use self::{
34    catalog::{ColumnsRow, ForeignKeysRow, PrimaryKeysRow, TablesRow},
35    columnar_bulk_inserter::{
36        BoundInputSlice, ColumnarBulkInserter, InOrder, InputParameterMapping,
37    },
38    connection::{
39        Connection, ConnectionOptions, ConnectionTransitions, IdentifierQuoteChar,
40        escape_attribute_value,
41    },
42    conversion::{decimal_text_to_i32, decimal_text_to_i64, decimal_text_to_i128},
43    cursor::{
44        BlockCursor, BlockCursorIterator, BlockCursorPolling, ConcurrentBlockCursor, Cursor,
45        CursorImpl, CursorPolling, CursorRow, OwnedCursor, RowSetBuffer, TruncationInfo,
46    },
47    driver_complete_option::DriverCompleteOption,
48    environment::{DataSourceInfo, DriverInfo, Environment, environment},
49    error::{Error, TooLargeBufferSize},
50    fixed_sized::{Bit, Pod},
51    handles::{ColumnDescription, DataType, Nullability},
52    into_parameter::IntoParameter,
53    narrow::Narrow,
54    nullable::Nullable,
55    parameter::{InOut, Out, OutputParameter},
56    parameter_collection::{ParameterCollection, ParameterCollectionRef, ParameterTupleElement},
57    preallocated::Preallocated,
58    preallocated_polling::PreallocatedPolling,
59    prepared::{BindParamDesc, Prepared},
60    result_set_metadata::ResultSetMetadata,
61    shared_connection::SharedConnection,
62    sleep::Sleep,
63};
64
65/// Reexports `odbc-sys` as sys to enable applications to always use the same version as this
66/// crate.
67pub use odbc_sys as sys;
68pub use widestring::{Utf16Str, Utf16String};
69
70// Reexport fetch if derive feature is enabled
71#[cfg(feature = "derive")]
72pub use odbc_api_derive::Fetch;