Expand description
Provides basic abstraction over valid (i.e. allocated ODBC handles).
Two decisions are already baked into this module:
- Treat warnings by logging them with
log
. - Use the Unicode (wide) variants of the ODBC API.
Structs
Describes the type and attributes of a column.
The connection handle references storage of all information about the connection to the data source, including status, transaction state, and error information.
An Environment
is a global context, in which to access data.
We use this as an output buffer for strings. Allows for detecting truncation.
Description of a parameter associated with a parameter marker in a prepared statement. Returned
by crate::Prepared::describe_param
.
ODBC Diagnostic Record
Handles conversion from UTF-8 string slices to ODBC SQL char encoding. Depending on the conditional compiliation due to feature flags, the UTF-8 strings are either passed without conversion to narrow method calls, or they are converted to UTF-16, before passed to the wide methods.
A buffer large enough to hold an SOLState
for diagnostics
Wraps a valid (i.e. successfully allocated) ODBC statement handle.
Use this buffer type to fetch zero terminated strings from the ODBC API. Either allocates a buffer for wide or narrow strings dependend on the features set.
Enums
Enumeration over valid SQL Data Types supported by ODBC
Indication of whether a column is nullable or not.
Traits
Provides access to the raw underlying ODBC handle.
Provides description of C type layout and pointers to it. Used to bind and buffers to ODBC statements.
A type which can be bound mutably to ODBC.
Stream which can be bound as in input parameter to a statement in order to provide the actual data at statement execution time, rather than preallocated buffers.
Can be bound to a single placeholder in an SQL statement.
An ODBC statement handle. In this crate it is implemented by self::StatementImpl
. In ODBC
Statements are used to execute statements and retrieve results. Both parameter and result
buffers are bound to the statement and dereferenced during statement execution and fetching
results.
Functions
Helper function freeing a handle and panicking on errors. Yet if the drop is triggered during another panic, the function will simply ignore errors from failed drops.
This function inspects all the diagnostics of an ODBC handle and logs their text messages. It is going to print placeholder characters, if it cannot convert the message to UTF-8.