Revert "tdf#132499: first stab to remove old stuff from ODBC ver < 3"
This reverts commit 55133fc5fc
.
Reason for revert: this kind of change should be done upstream.
Change-Id: I4051d13fe290bc750dbab820e1af68827eb9bfff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124692
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
This commit is contained in:
parent
88982b04ae
commit
a114255791
2 changed files with 78 additions and 0 deletions
4
external/unixODBC/inc/odbc/sql.h
vendored
4
external/unixODBC/inc/odbc/sql.h
vendored
|
@ -467,8 +467,10 @@ extern "C" {
|
|||
#endif /* ODBCVER >= 0x0300 */
|
||||
|
||||
/* SQL_ALTER_TABLE bitmasks */
|
||||
#if (ODBCVER >= 0x0200)
|
||||
#define SQL_AT_ADD_COLUMN 0x00000001L
|
||||
#define SQL_AT_DROP_COLUMN 0x00000002L
|
||||
#endif /* ODBCVER >= 0x0200 */
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_AT_ADD_CONSTRAINT 0x00000008L
|
||||
|
@ -527,6 +529,7 @@ extern "C" {
|
|||
/* NB: this means 'outer join', not what you may be thinking */
|
||||
|
||||
|
||||
#if (ODBCVER >= 0x0201)
|
||||
#define SQL_OJ_LEFT 0x00000001L
|
||||
#define SQL_OJ_RIGHT 0x00000002L
|
||||
#define SQL_OJ_FULL 0x00000004L
|
||||
|
@ -534,6 +537,7 @@ extern "C" {
|
|||
#define SQL_OJ_NOT_ORDERED 0x00000010L
|
||||
#define SQL_OJ_INNER 0x00000020L
|
||||
#define SQL_OJ_ALL_COMPARISON_OPS 0x00000040L
|
||||
#endif
|
||||
|
||||
/* SQL_SCROLL_CONCURRENCY bitmasks */
|
||||
#define SQL_SCCO_READ_ONLY 0x00000001L
|
||||
|
|
74
external/unixODBC/inc/odbc/sqlext.h
vendored
74
external/unixODBC/inc/odbc/sqlext.h
vendored
|
@ -58,7 +58,11 @@ extern "C" { /* Assume C declarations for C++ */
|
|||
#define SQL_MAX_OPTION_STRING_LENGTH 256
|
||||
|
||||
/* return code SQL_NO_DATA_FOUND is the same as SQL_NO_DATA */
|
||||
#if (ODBCVER < 0x0300)
|
||||
#define SQL_NO_DATA_FOUND 100
|
||||
#else
|
||||
#define SQL_NO_DATA_FOUND SQL_NO_DATA
|
||||
#endif
|
||||
|
||||
/* an end handle type */
|
||||
#if (ODBCVER >= 0x0300)
|
||||
|
@ -148,6 +152,16 @@ extern "C" { /* Assume C declarations for C++ */
|
|||
#define SQL_ATTR_ANSI_APP 115
|
||||
#endif
|
||||
|
||||
/* SQL_CONNECT_OPT_DRVR_START is not meaningful for 3.0 driver */
|
||||
#if (ODBCVER < 0x0300)
|
||||
#define SQL_CONNECT_OPT_DRVR_START 1000
|
||||
#endif /* ODBCVER < 0x0300 */
|
||||
|
||||
#if (ODBCVER < 0x0300)
|
||||
#define SQL_CONN_OPT_MAX SQL_PACKET_SIZE
|
||||
#define SQL_CONN_OPT_MIN SQL_ACCESS_MODE
|
||||
#endif /* ODBCVER < 0x0300 */
|
||||
|
||||
/* SQL_ACCESS_MODE options */
|
||||
#define SQL_MODE_READ_WRITE 0UL
|
||||
#define SQL_MODE_READ_ONLY 1UL
|
||||
|
@ -241,6 +255,11 @@ extern "C" { /* Assume C declarations for C++ */
|
|||
|
||||
#endif /* ODBCVER >= 0x0300 */
|
||||
|
||||
#if (ODBCVER < 0x0300)
|
||||
#define SQL_STMT_OPT_MAX SQL_ROW_NUMBER
|
||||
#define SQL_STMT_OPT_MIN SQL_QUERY_TIMEOUT
|
||||
#endif /* ODBCVER < 0x0300 */
|
||||
|
||||
/* New defines for SEARCHABLE column in SQLGetTypeInfo */
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
|
@ -437,10 +456,24 @@ extern "C" { /* Assume C declarations for C++ */
|
|||
#endif /* ODBCVER >= 0x0300 */
|
||||
|
||||
|
||||
#if (ODBCVER <= 0x0300)
|
||||
#define SQL_UNICODE (-95)
|
||||
#define SQL_UNICODE_VARCHAR (-96)
|
||||
#define SQL_UNICODE_LONGVARCHAR (-97)
|
||||
#define SQL_UNICODE_CHAR SQL_UNICODE
|
||||
#else
|
||||
/* The previous definitions for SQL_UNICODE_ are historical and obsolete */
|
||||
|
||||
#define SQL_UNICODE SQL_WCHAR
|
||||
#define SQL_UNICODE_VARCHAR SQL_WVARCHAR
|
||||
#define SQL_UNICODE_LONGVARCHAR SQL_WLONGVARCHAR
|
||||
#define SQL_UNICODE_CHAR SQL_WCHAR
|
||||
#endif
|
||||
|
||||
#if (ODBCVER < 0x0300)
|
||||
#define SQL_TYPE_DRIVER_START SQL_INTERVAL_YEAR
|
||||
#define SQL_TYPE_DRIVER_END SQL_UNICODE_LONGVARCHAR
|
||||
#endif /* ODBCVER < 0x0300 */
|
||||
|
||||
/* C datatype to SQL datatype mapping SQL types
|
||||
------------------- */
|
||||
|
@ -504,6 +537,10 @@ extern "C" { /* Assume C declarations for C++ */
|
|||
#endif /* ODBCVER >= 0x0350 */
|
||||
|
||||
#define SQL_TYPE_NULL 0
|
||||
#if (ODBCVER < 0x0300)
|
||||
#define SQL_TYPE_MIN SQL_BIT
|
||||
#define SQL_TYPE_MAX SQL_VARCHAR
|
||||
#endif
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_C_VARBOOKMARK SQL_C_BINARY
|
||||
|
@ -556,6 +593,9 @@ extern "C" { /* Assume C declarations for C++ */
|
|||
#define SQL_COLUMN_QUALIFIER_NAME 17
|
||||
#define SQL_COLUMN_LABEL 18
|
||||
#define SQL_COLATT_OPT_MAX SQL_COLUMN_LABEL
|
||||
#if (ODBCVER < 0x0300)
|
||||
#define SQL_COLUMN_DRIVER_START 1000
|
||||
#endif /* ODBCVER < 0x0300 */
|
||||
|
||||
#define SQL_COLATT_OPT_MIN SQL_COLUMN_COUNT
|
||||
|
||||
|
@ -606,6 +646,19 @@ extern "C" { /* Assume C declarations for C++ */
|
|||
#define SQL_API_SQLSETSCROLLOPTIONS 69
|
||||
#define SQL_API_SQLTABLEPRIVILEGES 70
|
||||
|
||||
/*-------------------------------------------*/
|
||||
/* SQL_EXT_API_LAST is not useful with ODBC */
|
||||
/* version 3.0 because some of the values */
|
||||
/* from X/Open are in the 10000 range. */
|
||||
/*-------------------------------------------*/
|
||||
|
||||
#if (ODBCVER < 0x0300)
|
||||
#define SQL_EXT_API_LAST SQL_API_SQLBINDPARAMETER
|
||||
#define SQL_NUM_FUNCTIONS 23
|
||||
#define SQL_EXT_API_START 40
|
||||
#define SQL_NUM_EXTENSIONS (SQL_EXT_API_LAST-SQL_EXT_API_START+1)
|
||||
#endif
|
||||
|
||||
/*--------------------------------------------*/
|
||||
/* SQL_API_ALL_FUNCTIONS returns an array */
|
||||
/* of 'booleans' representing whether a */
|
||||
|
@ -741,6 +794,25 @@ extern "C" { /* Assume C declarations for C++ */
|
|||
#define SQL_LIKE_ESCAPE_CLAUSE 113
|
||||
#define SQL_QUALIFIER_LOCATION 114
|
||||
|
||||
#if (ODBCVER >= 0x0201 && ODBCVER < 0x0300)
|
||||
#ifndef SQL_OJ_CAPABILITIES
|
||||
#define SQL_OJ_CAPABILITIES 65003 /* Temp value until ODBC 3.0 */
|
||||
#endif
|
||||
#endif /* ODBCVER >= 0x0201 && ODBCVER < 0x0300 */
|
||||
|
||||
/*----------------------------------------------*/
|
||||
/* SQL_INFO_LAST and SQL_INFO_DRIVER_START are */
|
||||
/* not useful anymore, because X/Open has */
|
||||
/* values in the 10000 range. You */
|
||||
/* must contact X/Open directly to get a range */
|
||||
/* of numbers for driver-specific values. */
|
||||
/*----------------------------------------------*/
|
||||
|
||||
#if (ODBCVER < 0x0300)
|
||||
#define SQL_INFO_LAST SQL_QUALIFIER_LOCATION
|
||||
#define SQL_INFO_DRIVER_START 1000
|
||||
#endif /* ODBCVER < 0x0300 */
|
||||
|
||||
/*-----------------------------------------------*/
|
||||
/* ODBC 3.0 SQLGetInfo values that are not part */
|
||||
/* of the X/Open standard at this time. X/Open */
|
||||
|
@ -1678,8 +1750,10 @@ SQLRETURN SQL_API SQLDriverConnect(
|
|||
#define SQL_CASCADE 0
|
||||
#define SQL_RESTRICT 1
|
||||
#define SQL_SET_NULL 2
|
||||
#if (ODBCVER >= 0x0250)
|
||||
#define SQL_NO_ACTION 3
|
||||
#define SQL_SET_DEFAULT 4
|
||||
#endif /* ODBCVER >= 0x0250 */
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
/* Note that the following are in a different column of SQLForeignKeys than */
|
||||
|
|
Loading…
Reference in a new issue