diff --git a/CMakeLists.txt b/CMakeLists.txt index ecbcfeec..fdbe089b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -200,12 +200,6 @@ set(LIBCURL_PATH_SRC ${CMAKE_SOURCE_DIR}/libs/curl CACHE PATH set(LIBCURL_BUILD_TYPE debug CACHE STRING "Lib curl build type: debug (default) or release") -# zlib paths -set(ZLIB_PATH_SRC ${CMAKE_SOURCE_DIR}/libs/zlib CACHE PATH - "Lib zlib source path") -set(ZLIB_PATH_INST ${CMAKE_BINARY_DIR}/zlib CACHE PATH - "Lib zlib install path") - if (${LIBCURL_BUILD_TYPE} MATCHES [Dd][Ee][Bb][Uu][Gg]) set(LIBCURL_DEBUG_ENABLED yes) set(LIBCURL_BUILD_TYPE debug) @@ -232,6 +226,12 @@ set(LIBCURL_LD_PATH set(LIBCURL_INC_PATH ${LIBCURL_PATH_SRC}/include CACHE PATH "Lib curl include path") +# zlib paths +set(ZLIB_PATH_SRC ${CMAKE_SOURCE_DIR}/libs/zlib CACHE PATH + "Lib zlib source path") +set(ZLIB_PATH_INST ${LIBCURL_PATH_SRC}/builds/zlib-${TARCH} CACHE PATH + "Lib zlib install path") + # Build zlib, then libcurl. # Note: this happens at config time as a pre-requisite, for now. This might # be changed to a build target later (possibly as a CMake subproject: re-link @@ -256,7 +256,7 @@ if (NOT IS_DIRECTORY ${LIBCURL_LD_PATH}) endif (${CMD_RETURN}) # libcurl expects a /lib and a /include folder under the location provided # as the path to zlib. zlib/win32's makefile has no install target, so - # we'll just cmake-install them under the building dir. + # we'll just cmake-install them (under libcurl's build folder). file(INSTALL ${ZLIB_PATH_SRC}/zlib.lib DESTINATION ${ZLIB_PATH_INST}/lib) file(GLOB ZLIB_H_FILES LIST_DIRECTORIES false ${ZLIB_PATH_SRC} ${ZLIB_PATH_SRC}/*.h) diff --git a/driver/connect.c b/driver/connect.c index 7201c123..4b3f1680 100644 --- a/driver/connect.c +++ b/driver/connect.c @@ -69,6 +69,9 @@ #define TYPE_UNSUPPORTED "UNSUPPORTED" /* 12 */ #define TYPE_SCALED_FLOAT "SCALED_FLOAT" +/* 16 */ +#define TYPE_CONSTANT_KEYWORD "CONSTANT_KEYWORD" + /* * intervals */ @@ -2233,6 +2236,15 @@ static BOOL elastic_name2types(wstr_st *type_name, return TRUE; } break; + + /* 16: CONSTANT_KEYWORD */ + case sizeof(TYPE_CONSTANT_KEYWORD) - 1: + if (! wmemncasecmp(type_name->str, + MK_WPTR(TYPE_CONSTANT_KEYWORD), type_name->cnt)) { + *c_sql = ES_CKEYWORD_TO_CSQL; + *sql = ES_CKEYWORD_TO_SQL; + return TRUE; + } } return elastic_intervals_name2types(type_name, c_sql, sql); diff --git a/driver/connect.h b/driver/connect.h index 82ec3db7..15957631 100644 --- a/driver/connect.h +++ b/driver/connect.h @@ -45,13 +45,16 @@ #define ES_BOOLEAN_TO_CSQL SQL_C_BIT #define ES_BOOLEAN_TO_SQL SQL_BIT /* 12: SQL_VARCHAR -> SQL_C_WCHAR */ -#define ES_KEYWORD_TO_CSQL SQL_C_WCHAR /* XXX: CBOR needs _CHAR */ +#define ES_KEYWORD_TO_CSQL SQL_C_WCHAR #define ES_KEYWORD_TO_SQL SQL_VARCHAR /* 12: SQL_VARCHAR -> SQL_C_WCHAR */ -#define ES_TEXT_TO_CSQL SQL_C_WCHAR /* XXX: CBOR needs _CHAR */ +#define ES_CKEYWORD_TO_CSQL SQL_C_WCHAR +#define ES_CKEYWORD_TO_SQL SQL_VARCHAR +/* 12: SQL_VARCHAR -> SQL_C_WCHAR */ +#define ES_TEXT_TO_CSQL SQL_C_WCHAR #define ES_TEXT_TO_SQL SQL_VARCHAR /* 12: SQL_VARCHAR -> SQL_C_WCHAR */ -#define ES_IP_TO_CSQL SQL_C_WCHAR /* XXX: CBOR needs _CHAR */ +#define ES_IP_TO_CSQL SQL_C_WCHAR #define ES_IP_TO_SQL SQL_VARCHAR /* 92: SQL_TYPE_TIME -> SQL_C_TYPE_TIME */ #define ES_TIME_TO_CSQL SQL_C_TYPE_TIME