headers: Add new constants in sqlext.h
Required for pyodbc https://github.com/mkleehammer/pyodbc
Fixes https://github.com/mingw-w64/mingw-w64/issues/93
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
diff --git a/mingw-w64-headers/include/sqlext.h b/mingw-w64-headers/include/sqlext.h
index 419caad..53f7ad2 100644
--- a/mingw-w64-headers/include/sqlext.h
+++ b/mingw-w64-headers/include/sqlext.h
@@ -13,10 +13,12 @@
#endif
#define SQL_SPEC_MAJOR 3
-#define SQL_SPEC_MINOR 52
-#define SQL_SPEC_STRING "03.52"
+#define SQL_SPEC_MINOR 80
+#define SQL_SPEC_STRING "03.80"
#define SQL_SQLSTATE_SIZE 5
+typedef SQLTCHAR SQLSTATE[SQL_SQLSTATE_SIZE + 1];
+
#define SQL_MAX_DSN_LENGTH 32
#define SQL_MAX_OPTION_STRING_LENGTH 256
@@ -35,6 +37,7 @@
#define SQL_ATTR_ODBC_VERSION 200
#define SQL_ATTR_CONNECTION_POOLING 201
#define SQL_ATTR_CP_MATCH 202
+#define SQL_ATTR_APPLICATION_KEY 203
#endif
#if (ODBCVER >= 0x0300)
@@ -42,6 +45,7 @@
#define SQL_CP_OFF __MSABI_LONG(0U)
#define SQL_CP_ONE_PER_DRIVER __MSABI_LONG(1U)
#define SQL_CP_ONE_PER_HENV __MSABI_LONG(2U)
+#define SQL_CP_DRIVER_AWARE __MSABI_LONG(3U)
#define SQL_CP_DEFAULT SQL_CP_OFF
#define SQL_CP_STRICT_MATCH __MSABI_LONG(0U)
@@ -52,6 +56,10 @@
#define SQL_OV_ODBC3 __MSABI_LONG(3U)
#endif
+#if (ODBCVER >= 0x0380)
+#define SQL_OV_ODBC3_80 __MSABI_LONG(380U)
+#endif
+
#define SQL_ACCESS_MODE 101
#define SQL_AUTOCOMMIT 102
#define SQL_LOGIN_TIMEOUT 103
@@ -91,6 +99,15 @@
#define SQL_ATTR_ANSI_APP 115
#endif
+#if (ODBCVER >= 0x0380)
+#define SQL_ATTR_RESET_CONNECTION 116
+#define SQL_ATTR_ASYNC_DBC_FUNCTIONS_ENABLE 117
+#endif
+
+#if (ODBCVER >= 0x0380)
+#define SQL_ATTR_ASYNC_DBC_EVENT 119
+#endif
+
#if (ODBCVER < 0x0300)
#define SQL_CONNECT_OPT_DRVR_START 1000
#endif
@@ -136,6 +153,16 @@
#define SQL_AA_FALSE __MSABI_LONG(0)
#endif
+#if (ODBCVER >= 0x0380)
+#define SQL_RESET_CONNECTION_YES __MSABI_LONG(1U)
+#endif
+
+#if (ODBCVER >= 0x0380)
+#define SQL_ASYNC_DBC_ENABLE_ON __MSABI_LONG(1U)
+#define SQL_ASYNC_DBC_ENABLE_OFF __MSABI_LONG(0U)
+#define SQL_ASYNC_DBC_ENABLE_DEFAULT SQL_ASYNC_DBC_ENABLE_OFF
+#endif
+
#define SQL_QUERY_TIMEOUT 0
#define SQL_MAX_ROWS 1
#define SQL_NOSCAN 2
@@ -181,6 +208,10 @@
#define SQL_ATTR_USE_BOOKMARKS SQL_USE_BOOKMARKS
#endif
+#if (ODBCVER >= 0x0380)
+#define SQL_ATTR_ASYNC_STMT_EVENT 29
+#endif
+
#if (ODBCVER < 0x0300)
#define SQL_STMT_OPT_MAX SQL_ROW_NUMBER
#define SQL_STMT_OPT_MIN SQL_QUERY_TIMEOUT
@@ -439,6 +470,19 @@
#define SQL_TYPE_MAX SQL_VARCHAR
#endif
+#if (ODBCVER >= 0x380)
+#define SQL_DRIVER_C_TYPE_BASE 0x4000
+#endif
+
+#if (ODBCVER >= 0x380)
+#define SQL_DRIVER_SQL_TYPE_BASE 0x4000
+#define SQL_DRIVER_DESC_FIELD_BASE 0x4000
+#define SQL_DRIVER_DIAG_FIELD_BASE 0x4000
+#define SQL_DRIVER_INFO_TYPE_BASE 0x4000
+#define SQL_DRIVER_CONN_ATTR_BASE 0x00004000
+#define SQL_DRIVER_STMT_ATTR_BASE 0x00004000
+#endif
+
#if (ODBCVER >= 0x0300)
#define SQL_C_VARBOOKMARK SQL_C_BINARY
#endif
@@ -513,6 +557,7 @@
#define SQL_API_SQLDESCRIBEPARAM 58
#define SQL_API_SQLDRIVERCONNECT 41
#define SQL_API_SQLDRIVERS 71
+#define SQL_API_SQLPRIVATEDRIVERS 79
#define SQL_API_SQLEXTENDEDFETCH 59
#define SQL_API_SQLFOREIGNKEYS 60
#define SQL_API_SQLMORERESULTS 61
@@ -705,8 +750,21 @@
#define SQL_INSERT_STATEMENT 172
#define SQL_CONVERT_GUID 173
#define SQL_UNION_STATEMENT SQL_UNION
+
+#if (ODBCVER >= 0x0380)
+#define SQL_ASYNC_DBC_FUNCTIONS 10023
#endif
+#define SQL_DRIVER_AWARE_POOLING_SUPPORTED 10024
+
+#if (ODBCVER >= 0x0380)
+#define SQL_ASYNC_NOTIFICATION 10025
+#define SQL_ASYNC_NOTIFICATION_NOT_CAPABLE __MSABI_LONG(0x00000000)
+#define SQL_ASYNC_NOTIFICATION_CAPABLE __MSABI_LONG(0x00000001)
+#endif
+
+#endif /* ODBCVER >= 0x0300 */
+
#define SQL_DTC_TRANSITION_COST 1750
#if (ODBCVER >= 0x0300)
@@ -968,6 +1026,9 @@
#define SQL_GD_BLOCK __MSABI_LONG(0x00000004)
#define SQL_GD_BOUND __MSABI_LONG(0x00000008)
+#if (ODBCVER >= 0x0380)
+#define SQL_GD_OUTPUT_PARAMS __MSABI_LONG(0x00000010)
+#endif
#define SQL_PS_POSITIONED_DELETE __MSABI_LONG(0x00000001)
#define SQL_PS_POSITIONED_UPDATE __MSABI_LONG(0x00000002)
@@ -1302,11 +1363,19 @@
#define SQL_US_UNION SQL_U_UNION
#define SQL_US_UNION_ALL SQL_U_UNION_ALL
+
+#define SQL_DRIVER_AWARE_POOLING_NOT_CAPABLE __MSABI_LONG(0x00000000)
+#define SQL_DRIVER_AWARE_POOLING_CAPABLE __MSABI_LONG(0x00000001)
#endif
#define SQL_DTC_ENLIST_EXPENSIVE __MSABI_LONG(0x00000001)
#define SQL_DTC_UNENLIST_EXPENSIVE __MSABI_LONG(0x00000002)
+#if (ODBCVER >= 0x0380)
+#define SQL_ASYNC_DBC_NOT_CAPABLE __MSABI_LONG(0x00000000)
+#define SQL_ASYNC_DBC_CAPABLE __MSABI_LONG(0x00000001)
+#endif
+
#if (ODBCVER >= 0x0300)
#define SQL_FETCH_FIRST_USER 31
#define SQL_FETCH_FIRST_SYSTEM 32
@@ -1412,6 +1481,10 @@
#define SQL_RESULT_COL 3
#define SQL_PARAM_OUTPUT 4
#define SQL_RETURN_VALUE 5
+#if (ODBCVER >= 0x0380)
+#define SQL_PARAM_INPUT_OUTPUT_STREAM 8
+#define SQL_PARAM_OUTPUT_STREAM 16
+#endif
#define SQL_PT_UNKNOWN 0
#define SQL_PT_PROCEDURE 1