Expand description
ODBC support for the r2d2
connection pool Via odbc-api.
Modules§
- buffers
- This module contains buffers intended to be bound to ODBC statement handles.
- force_
send_ sync - Please do not use this crate. The Rust compiler tries to protect you for a reason. Do under no
circumstances use this to silence some compiler error you do not understand. Only use this if
you do understand why your type is
Send
and orSync
, and also understand why the compiler disagrees with you. - guide
- Introduction to
odbc-api
(documentation only) - handles
- Provides basic abstraction over valid (i.e. allocated ODBC handles).
- parameter
- Passing parameters to statement
- sys
- ODBC types those representation is compatible with the ODBC C API.
Structs§
- Bit
- New type wrapping u8 and binding as SQL_BIT.
- Column
Description - Describes the type and attributes of a column.
- Columnar
Bulk Inserter - Can be used to execute a statement with bulk array paramters. Contrary to its name any statement
with parameters can be executed, not only
INSERT
however inserting large amounts of data in batches is the primary intended usecase. - Connection
- The connection handle references storage of all information about the connection to the data source, including status, transaction state, and error information.
- Cursor
Impl - Cursors are used to process and iterate the result sets returned by executing queries. Created
by either a prepared query or direct execution. Usually utilized through the
crate::Cursor
trait. - Cursor
Polling - The asynchronous sibiling of
CursorImpl
. Use this to fetch results in asynchronous code. - Cursor
Row - An individual row of an result set. See
crate::Cursor::next_row
. - Data
Source Info - Holds name and description of a datasource
- Driver
Info - Struct holding information available on a driver. Can be obtained via
Environment::drivers
. - Environment
- An ODBC 3.8 environment.
- InOut
- Wraps a mutable reference. Use this wrapper in order to indicate that a mutable reference should be bound as an input / output parameter.
- Nullable
- Wraps a type T together with an additional indicator. This way the type gains a Null representation, those memory layout is compatible with ODBC.
- ODBC
Connection Manager - Out
- Wraps a mutable reference. Use this wrapper in order to indicate that a mutable reference should be bound as an output parameter only.
- Preallocated
- A preallocated SQL statement handle intended for sequential execution of different queries. See
crate::Connection::preallocate
. - Preallocated
Polling - Asynchronous sibling of
Preallocated
using polling mode for execution. Can be obtained usingPreallocated::into_polling
. - Prepared
- A prepared query. Prepared queries are useful if the similar queries should executed more than
once. See
crate::Connection::prepare
. - RowSet
Cursor - Iterates in blocks (called row sets) over a result set, filling a buffers with a lot of rows at once, instead of iterating the result set row by row. This is usually much faster.
- RowSet
Cursor Polling - Asynchronously iterates in blocks (called row sets) over a result set, filling a buffers with
a lot of rows at once, instead of iterating the result set row by row. This is usually much
faster. Asynchronous sibiling of
self::RowSetCursor
. - Statement
Connection - Statement handle which also takes ownership of Connection
- TooLarge
Buffer Size - Error indicating a failed allocation for a column buffer
- U16Str
- 16-bit wide string slice with undefined encoding.
- U16String
- An owned, mutable 16-bit wide string with undefined encoding.
Enums§
- Data
Type - The relational type of the column. Think of it as the type used in the
CREATE TABLE
statement then creating the database. - Driver
Complete Option - Specifies how the driver and driver manager complete the incoming connection string. See
crate::Environment::driver_connect
. - Error
- Error type used to indicate a low level ODBC call returned with SQL_ERROR.
- Nullability
- Indication of whether a column is nullable or not.
Traits§
- Bound
Input Slice - You can obtain a mutable slice of a column buffer which allows you to change its contents.
- Cursor
- Cursors are used to process and iterate the result sets returned by executing queries.
- Into
Parameter - An instance can be consumed and to create a parameter which can be bound to a statement during execution.
- Output
Parameter - Safety
- Parameter
Collection - Implementers of this trait can be bound to a statement through a
self::ParameterCollectionRef
. - Parameter
Collection Ref - SQL Parameters used to execute a query.
- Parameter
Tuple Element - Implementers of this trait can be used as individual parameters of in a tuple of parameter references. This includes input parameters, output or in/out parameters.
- Result
SetMetadata - Provides Metadata of the resulting the result set. Implemented by
Cursor
types and prepared queries. Fetching metadata from a prepared query might be expensive (driver dependent), so your application should fetch the Metadata it requires from theCursor
if possible. - RowSet
Buffer - A Row set buffer binds row, or column wise buffers to a cursor in order to fill them with row sets with each call to fetch.
- Sleep
- Governs the behaviour of of polling in async functions.
Functions§
- escape_
attribute_ value - You can use this method to escape a password so it is suitable to be appended to an ODBC
connection string as the value for the
PWD
attribute. This method is only of interest for application in need to create their own connection strings.