module SQL.ODBC where

import Foreign.C.Types

-- env attribute
sql_attr_odbc_version :: Num a => a
sql_attr_odbc_version = 200

sql_attr_connection_pooling :: Num a => a
sql_attr_connection_pooling = 201

sql_attr_cp_match :: Num a => a
sql_attr_cp_match = 202

-- unixODBC additions
sql_attr_unixodbc_syspath :: Num a => a
sql_attr_unixodbc_syspath = 65001

sql_attr_unixodbc_version :: Num a => a
sql_attr_unixodbc_version = 65002

sql_attr_unixodbc_envattr :: Num a => a
sql_attr_unixodbc_envattr = 65003


-- values for SQL_ATTR_CONNECTION_POOLING
sql_cp_off :: CULong
sql_cp_off = 0

sql_cp_one_per_driver :: CULong
sql_cp_one_per_driver = 1

sql_cp_one_per_henv :: CULong
sql_cp_one_per_henv = 2

sql_cp_default :: CULong
sql_cp_default = sql_cp_off

-- values for SQL_ATTR_CP_MATCH
sql_cp_strict_match :: CULong
sql_cp_strict_match = 0

sql_cp_relaxed_match :: CULong
sql_cp_relaxed_match = 1

sql_cp_match_default :: CULong
sql_cp_match_default = sql_cp_strict_match

-- values for SQL_ATTR_ODBC_VERSION
sql_ov_odbc2 :: CULong
sql_ov_odbc2 = 2

sql_ov_odbc3 :: CULong
sql_ov_odbc3 = 3

-- From ODBC 3.8 onwards, we should use <major version> * 100 + <minor version>
sql_ov_odbc3_80 :: CULong
sql_ov_odbc3_80 = 380