Permalink
Browse files

added additional constants for SQL_CONVERT_X values

  • Loading branch information...
Jordan Bolton authored and mkleehammer committed May 11, 2018
1 parent 6cbccb1 commit 3d14d462b7e1fa43dff03636203b78c800a8e696
Showing with 59 additions and 5 deletions.
  1. +29 −2 src/connection.cpp
  2. +30 −3 src/pyodbcmodule.cpp
View
@@ -504,6 +504,35 @@ struct GetInfoType
};
static const GetInfoType aInfoTypes[] = {
+
+ // SQL_CONVERT_X
+ { SQL_CONVERT_FUNCTIONS, GI_UINTEGER },
+ { SQL_CONVERT_BIGINT, GI_UINTEGER },
+ { SQL_CONVERT_BINARY, GI_UINTEGER },
+ { SQL_CONVERT_BIT, GI_UINTEGER },
+ { SQL_CONVERT_CHAR, GI_UINTEGER },
+ { SQL_CONVERT_DATE, GI_UINTEGER },
+ { SQL_CONVERT_DECIMAL, GI_UINTEGER },
+ { SQL_CONVERT_DOUBLE, GI_UINTEGER },
+ { SQL_CONVERT_FLOAT, GI_UINTEGER },
+ { SQL_CONVERT_INTEGER, GI_UINTEGER },
+ { SQL_CONVERT_LONGVARCHAR, GI_UINTEGER },
+ { SQL_CONVERT_NUMERIC, GI_UINTEGER },
+ { SQL_CONVERT_REAL, GI_UINTEGER },
+ { SQL_CONVERT_SMALLINT, GI_UINTEGER },
+ { SQL_CONVERT_TIME, GI_UINTEGER },
+ { SQL_CONVERT_TIMESTAMP, GI_UINTEGER },
+ { SQL_CONVERT_TINYINT, GI_UINTEGER },
+ { SQL_CONVERT_VARBINARY, GI_UINTEGER },
+ { SQL_CONVERT_VARCHAR, GI_UINTEGER },
+ { SQL_CONVERT_LONGVARBINARY, GI_UINTEGER },
+ { SQL_CONVERT_WCHAR, GI_UINTEGER },
+ { SQL_CONVERT_INTERVAL_DAY_TIME, GI_UINTEGER },
+ { SQL_CONVERT_INTERVAL_YEAR_MONTH, GI_UINTEGER },
+ { SQL_CONVERT_WLONGVARCHAR, GI_UINTEGER },
+ { SQL_CONVERT_WVARCHAR, GI_UINTEGER },
+ { SQL_CONVERT_GUID, GI_UINTEGER },
+
{ SQL_ACCESSIBLE_PROCEDURES, GI_YESNO },
{ SQL_ACCESSIBLE_TABLES, GI_YESNO },
{ SQL_ACTIVE_ENVIRONMENTS, GI_USMALLINT },
@@ -522,8 +551,6 @@ static const GetInfoType aInfoTypes[] = {
{ SQL_COLLATION_SEQ, GI_STRING },
{ SQL_COLUMN_ALIAS, GI_YESNO },
{ SQL_CONCAT_NULL_BEHAVIOR, GI_USMALLINT },
- { SQL_CONVERT_FUNCTIONS, GI_UINTEGER },
- { SQL_CONVERT_VARCHAR, GI_UINTEGER },
{ SQL_CORRELATION_NAME, GI_USMALLINT },
{ SQL_CREATE_ASSERTION, GI_UINTEGER },
{ SQL_CREATE_CHARACTER_SET, GI_UINTEGER },
View
@@ -904,7 +904,6 @@ static const ConstantDef aConstants[] = {
MAKECONST(SQL_COLLATION_SEQ),
MAKECONST(SQL_COLUMN_ALIAS),
MAKECONST(SQL_CONCAT_NULL_BEHAVIOR),
- MAKECONST(SQL_CONVERT_FUNCTIONS),
MAKECONST(SQL_CONVERT_VARCHAR),
MAKECONST(SQL_CORRELATION_NAME),
MAKECONST(SQL_CREATE_ASSERTION),
@@ -1039,14 +1038,42 @@ static const ConstantDef aConstants[] = {
MAKECONST(SQL_UNION),
MAKECONST(SQL_USER_NAME),
MAKECONST(SQL_XOPEN_CLI_YEAR),
-
+
+ // SQL_CONVERT_X
+ MAKECONST(SQL_CONVERT_FUNCTIONS),
+ MAKECONST(SQL_CONVERT_BIGINT),
+ MAKECONST(SQL_CONVERT_BINARY),
+ MAKECONST(SQL_CONVERT_BIT),
+ MAKECONST(SQL_CONVERT_CHAR),
+ MAKECONST(SQL_CONVERT_DATE),
+ MAKECONST(SQL_CONVERT_DECIMAL),
+ MAKECONST(SQL_CONVERT_DOUBLE),
+ MAKECONST(SQL_CONVERT_FLOAT),
+ MAKECONST(SQL_CONVERT_GUID),
+ MAKECONST(SQL_CONVERT_INTEGER),
+ MAKECONST(SQL_CONVERT_INTERVAL_DAY_TIME),
+ MAKECONST(SQL_CONVERT_INTERVAL_YEAR_MONTH),
+ MAKECONST(SQL_CONVERT_LONGVARBINARY),
+ MAKECONST(SQL_CONVERT_LONGVARCHAR),
+ MAKECONST(SQL_CONVERT_NUMERIC),
+ MAKECONST(SQL_CONVERT_REAL),
+ MAKECONST(SQL_CONVERT_SMALLINT),
+ MAKECONST(SQL_CONVERT_TIME),
+ MAKECONST(SQL_CONVERT_TIMESTAMP),
+ MAKECONST(SQL_CONVERT_TINYINT),
+ MAKECONST(SQL_CONVERT_VARBINARY),
+ MAKECONST(SQL_CONVERT_VARCHAR),
+ MAKECONST(SQL_CONVERT_WCHAR),
+ MAKECONST(SQL_CONVERT_WLONGVARCHAR),
+ MAKECONST(SQL_CONVERT_WVARCHAR),
+
// SQLSetConnectAttr transaction isolation
MAKECONST(SQL_ATTR_TXN_ISOLATION),
MAKECONST(SQL_TXN_READ_UNCOMMITTED),
MAKECONST(SQL_TXN_READ_COMMITTED),
MAKECONST(SQL_TXN_REPEATABLE_READ),
MAKECONST(SQL_TXN_SERIALIZABLE),
-
+
// Outer Join Capabilities
MAKECONST(SQL_OJ_LEFT),
MAKECONST(SQL_OJ_RIGHT),

0 comments on commit 3d14d46

Please sign in to comment.