use crate::Pointer;
#[repr(i32)]
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
pub enum EnvironmentAttribute {
OdbcVersion = 200,
ConnectionPooling = 201,
CpMatch = 202,
OutputNts = 10001,
}
#[repr(i32)]
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
pub enum AttrOdbcVersion {
Odbc3 = 3,
#[cfg(feature = "odbc_version_3_80")]
Odbc3_80 = 380,
#[cfg(feature = "odbc_version_4")]
Odbc4 = 400,
}
impl From<AttrOdbcVersion> for Pointer {
fn from(source: AttrOdbcVersion) -> Pointer {
source as i32 as Pointer
}
}
#[repr(u32)]
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
pub enum AttrConnectionPooling {
Off = 0,
OnePerDriver = 1,
OnePerHenv = 2,
DriverAware = 3,
}
impl Default for AttrConnectionPooling {
fn default() -> Self {
AttrConnectionPooling::Off
}
}
impl From<AttrConnectionPooling> for Pointer {
fn from(source: AttrConnectionPooling) -> Pointer {
source as u32 as Pointer
}
}
#[repr(u32)]
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
pub enum AttrCpMatch {
Strict = 0,
Relaxed = 1,
}
impl Default for AttrCpMatch {
fn default() -> Self {
AttrCpMatch::Strict
}
}
impl From<AttrCpMatch> for Pointer {
fn from(source: AttrCpMatch) -> Pointer {
source as u32 as Pointer
}
}
#[repr(i32)]
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
pub enum StatementAttribute {
AppRowDesc = 10010,
AppParamDesc = 10011,
ImpRowDesc = 10012,
ImpParamDesc = 10013,
CursorScrollable = -1,
CursorSensitivity = -2,
AsyncEnable = 4,
Concurrency = 7,
CursorType = 6,
EnableAutoIpd = 15,
FetchBookmarkPtr = 16,
KeysetSize = 8,
MaxLength = 3,
MaxRows = 1,
NoScan = 2,
ParamBindOffsetPtr = 17,
ParamBindType = 18,
ParamOpterationPtr = 19,
ParamStatusPtr = 20,
ParamsProcessedPtr = 21,
ParamsetSize = 22,
QueryTimeout = 0,
RetrieveData = 11,
RowBindOffsetPtr = 23,
RowBindType = 5,
RowNumber = 14,
RowOperationPtr = 24,
RowStatusPtr = 25,
RowsFetchedPtr = 26,
RowArraySize = 27,
SimulateCursor = 10,
UseBookmarks = 12,
#[cfg(feature = "odbc_version_3_80")]
AsyncStmtEvent = 29,
#[cfg(feature = "odbc_version_4")]
SampleSize = 30,
#[cfg(feature = "odbc_version_4")]
DynamicColumns = 31,
#[cfg(feature = "odbc_version_4")]
TypeExceptionBehaviour = 32,
#[cfg(feature = "odbc_version_4")]
LengthExceptionBehaviour = 33,
}