├── .clang-format ├── .github └── workflows │ ├── main.yml │ └── release-workflow.yml ├── .gitignore ├── BUILD_INSTRUCTIONS.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── NOTICE ├── README.md ├── THIRD-PARTY ├── aws_sdk_cpp_setup.ps1 ├── aws_sdk_cpp_setup.sh ├── build_win_debug32.ps1 ├── build_win_debug64.ps1 ├── build_win_release32.ps1 ├── build_win_release64.ps1 ├── docs ├── dev │ ├── Pagination.md │ ├── example_config_files │ │ ├── elasticsearch.yml │ │ ├── example_tdc_file.tdc │ │ └── kibana.yml │ ├── img │ │ ├── async_result_retrieval.png │ │ └── data_flow.png │ ├── sequence_diagrams │ │ ├── SQLDriverConnect.png │ │ ├── SQLDriverConnect.txt │ │ ├── SQLExecDirect.png │ │ └── SQLExecDirect.txt │ └── sign_installers.md ├── test │ ├── excel_connection.md │ ├── img │ │ ├── from_odbc_advanced_options.png │ │ ├── from_odbc_advanced_options_auth.png │ │ ├── from_odbc_advanced_options_load_data.png │ │ ├── from_odbc_auth.png │ │ ├── from_odbc_dsn.png │ │ ├── from_odbc_loaded_data.png │ │ ├── from_odbc_table_list.png │ │ ├── microsoft_query_add_tables.png │ │ ├── microsoft_query_disable_use_the_query_wizard_option.png │ │ ├── microsoft_query_import_data.png │ │ ├── microsoft_query_loaded_data.png │ │ ├── microsoft_query_select_colums.png │ │ ├── microsoft_query_select_tables.png │ │ ├── microsoft_query_table_options.png │ │ ├── odbc_data_source.png │ │ ├── query_wizard_choose_coulms.png │ │ ├── query_wizard_enable_use_the_query_wizard_option.png │ │ ├── query_wizard_error_popup.png │ │ ├── query_wizard_filter_data.png │ │ ├── query_wizard_finish.png │ │ ├── query_wizard_import_data.png │ │ ├── query_wizard_loaded_data.png │ │ ├── query_wizard_select_tables.png │ │ ├── query_wizard_sort_order.png │ │ ├── query_wizard_table_options.png │ │ └── select_microsoft_query.png │ ├── microsoft_query_connection.md │ ├── odbc_data_source_connection.md │ └── query_wizard_connection.md └── user │ ├── configuration_options.md │ ├── img │ ├── driver_default_config.png │ └── dsn_default_config.png │ └── mac_configure_dsn.md ├── libraries ├── VisualLeakDetector │ ├── COPYING.txt │ ├── bin │ │ ├── Microsoft.DTfW.DHL.manifest │ │ ├── dbghelp.dll │ │ └── vld_x86.dll │ ├── bin64 │ │ ├── Microsoft.DTfW.DHL.manifest │ │ ├── dbghelp.dll │ │ └── vld_x64.dll │ ├── include │ │ ├── vld.h │ │ └── vld_def.h │ ├── lib │ │ └── vld.lib │ └── lib64 │ │ └── vld.lib ├── rabbit │ ├── LICENSE │ ├── README │ └── include │ │ └── rabbit.hpp └── rapidjson │ ├── include │ └── rapidjson │ │ ├── allocators.h │ │ ├── document.h │ │ ├── encodedstream.h │ │ ├── encodings.h │ │ ├── error │ │ ├── en.h │ │ └── error.h │ │ ├── filereadstream.h │ │ ├── filewritestream.h │ │ ├── fwd.h │ │ ├── internal │ │ ├── biginteger.h │ │ ├── diyfp.h │ │ ├── dtoa.h │ │ ├── ieee754.h │ │ ├── itoa.h │ │ ├── meta.h │ │ ├── pow10.h │ │ ├── regex.h │ │ ├── stack.h │ │ ├── strfunc.h │ │ ├── strtod.h │ │ └── swap.h │ │ ├── istreamwrapper.h │ │ ├── memorybuffer.h │ │ ├── memorystream.h │ │ ├── msinttypes │ │ ├── inttypes.h │ │ └── stdint.h │ │ ├── ostreamwrapper.h │ │ ├── pointer.h │ │ ├── prettywriter.h │ │ ├── rapidjson.h │ │ ├── reader.h │ │ ├── schema.h │ │ ├── stream.h │ │ ├── stringbuffer.h │ │ └── writer.h │ └── license.txt ├── opendistro-elasticsearch-odbc.release-notes.md ├── release-notes ├── sql-odbc.release-notes-1.7.0.0.md ├── sql-odbc.release-notes-1.8.0.0.md └── sql-odbc.release-notes-1.9.0.0.md ├── run_cppcheck.bat ├── run_cppcheck.sh ├── run_test_runner.bat ├── run_test_runner.sh └── src ├── CMakeLists.txt ├── DSNInstaller ├── CMakeLists.txt └── dsn_installer.cpp ├── IntegrationTests ├── CMakeLists.txt ├── ITODBCAwsAuth │ ├── CMakeLists.txt │ ├── pch.cpp │ ├── pch.h │ ├── test_aws_auth_dsn.reg │ ├── test_odbc.ini │ ├── test_odbc_aws_auth.cpp │ └── test_odbcinst.ini ├── ITODBCCatalog │ ├── CMakeLists.txt │ ├── packages.config │ ├── pch.cpp │ ├── pch.h │ └── test_odbc_catalog.cpp ├── ITODBCConnection │ ├── CMakeLists.txt │ ├── packages.config │ ├── pch.cpp │ ├── pch.h │ ├── test_dsn.reg │ ├── test_odbc.ini │ ├── test_odbc_connection.cpp │ └── test_odbcinst.ini ├── ITODBCDescriptors │ ├── CMakeLists.txt │ ├── packages.config │ ├── pch.cpp │ ├── pch.h │ └── test_odbc_descriptors.cpp ├── ITODBCExecution │ ├── CMakeLists.txt │ ├── pch.cpp │ ├── pch.h │ └── test_odbc_execution.cpp ├── ITODBCHelper │ ├── CMakeLists.txt │ ├── it_odbc_helper.cpp │ └── it_odbc_helper.h ├── ITODBCInfo │ ├── CMakeLists.txt │ ├── packages.config │ ├── pch.cpp │ ├── pch.h │ └── test_odbc_info.cpp ├── ITODBCPagination │ ├── CMakeLists.txt │ ├── packages.config │ ├── pch.cpp │ ├── pch.h │ └── test_odbc_pagination.cpp ├── ITODBCResults │ ├── CMakeLists.txt │ ├── packages.config │ ├── pch.cpp │ ├── pch.h │ └── test_odbc_results.cpp └── ITODBCTableauQueries │ ├── CMakeLists.txt │ ├── packages.config │ ├── pch.cpp │ ├── pch.h │ ├── queries_all.txt │ └── test_odbc_tableau_queries.cpp ├── PerformanceTests ├── CMakeLists.txt ├── PTODBCExecution │ ├── CMakeLists.txt │ └── performance_odbc_execution.cpp ├── PTODBCInfo │ ├── CMakeLists.txt │ ├── packages.config │ ├── pch.cpp │ ├── pch.h │ └── performance_odbc_info.cpp └── PTODBCResults │ ├── CMakeLists.txt │ ├── packages.config │ ├── pch.cpp │ ├── pch.h │ └── performance_odbc_results.cpp ├── TableauConnector ├── odfe_sql_odbc │ ├── README.md │ ├── connection-dialog.tcd │ ├── connectionBuilder.js │ ├── connectionResolver.tdr │ ├── dialect.tdd │ ├── manifest.xml │ └── odfe_sql_odbc.taco └── odfe_sql_odbc_dev │ ├── README.md │ ├── connection-dialog.tcd │ ├── connectionBuilder.js │ ├── connectionResolver.tdr │ ├── dialect.tdd │ └── manifest.xml ├── TestRunner ├── mako_template.html ├── test_exclude_list.txt └── test_runner.py ├── UnitTests ├── CMakeLists.txt ├── GoogleTest.LICENSE ├── UTAwsSdkCpp │ ├── CMakeLists.txt │ ├── packages.config │ ├── pch.cpp │ ├── pch.h │ └── test_aws_sdk_cpp.cpp ├── UTConn │ ├── CMakeLists.txt │ ├── packages.config │ ├── pch.cpp │ ├── pch.h │ ├── test_conn.cpp │ └── test_query_execution.cpp ├── UTCriticalSection │ ├── CMakeLists.txt │ ├── packages.config │ ├── pch.cpp │ ├── pch.h │ └── test_critical_section.cpp ├── UTHelper │ ├── CMakeLists.txt │ ├── unit_test_helper.cpp │ └── unit_test_helper.h └── UTRabbit │ ├── CMakeLists.txt │ ├── packages.config │ ├── pch.cpp │ ├── pch.h │ └── test_rabbit.cpp ├── autoconf.h.in ├── gtest ├── googletest-download.cmake └── googletest.cmake ├── installer ├── CMakeLists.txt ├── Resources │ ├── README.txt │ ├── Welcome.txt │ ├── background.bmp │ ├── background_darkaqua.bmp │ └── odfe_sql_odbc.tdc ├── banner.bmp ├── dialog.bmp ├── icon.ico ├── patch.xml ├── postinstall └── remove-odfe-dsn.sh ├── modules └── code-coverage.cmake ├── odfeenlist ├── CMakeLists.txt ├── elasticenlist.h └── msdtc_enlist.cpp └── odfesqlodbc ├── CMakeLists.txt ├── bind.c ├── bind.h ├── catfunc.h ├── columninfo.c ├── columninfo.h ├── connection.c ├── convert.c ├── convert.h ├── descriptor.c ├── descriptor.h ├── dlg_specific.c ├── dlg_specific.h ├── dlg_wingui.c ├── drvconn.c ├── drvconn.h ├── environ.c ├── environ.h ├── es_api30.c ├── es_apifunc.h ├── es_communication.cpp ├── es_communication.h ├── es_connection.cpp ├── es_connection.h ├── es_driver_connect.cpp ├── es_driver_connect.h ├── es_helper.cpp ├── es_helper.h ├── es_info.cpp ├── es_info.h ├── es_odbc.c ├── es_odbc.h ├── es_odbc.rc ├── es_parse_result.cpp ├── es_parse_result.h ├── es_result_queue.cpp ├── es_result_queue.h ├── es_semaphore.cpp ├── es_semaphore.h ├── es_statement.cpp ├── es_statement.h ├── es_types.c ├── es_types.h ├── es_utility.cpp ├── es_utility.h ├── execute.c ├── info.c ├── loadlib.c ├── loadlib.h ├── misc.c ├── misc.h ├── multibyte.c ├── multibyte.h ├── mylog.c ├── mylog.h ├── odbcapi.c ├── odbcapi30.c ├── odbcapi30w.c ├── odbcapiw.c ├── options.c ├── parse.c ├── qresult.c ├── qresult.h ├── resource.h ├── results.c ├── setup.c ├── statement.c ├── statement.h ├── tuple.c ├── tuple.h ├── unicode_support.h ├── version.h ├── win_setup.h └── win_unicode.c /.clang-format: -------------------------------------------------------------------------------- 1 | # Common settings 2 | BasedOnStyle: Google 3 | AllowShortFunctionsOnASingleLine: None 4 | AllowShortIfStatementsOnASingleLine: 'false' 5 | AllowShortLoopsOnASingleLine: 'false' 6 | BreakBeforeBinaryOperators: NonAssignment 7 | IndentWidth: '4' 8 | SpaceBeforeParens: ControlStatements 9 | SpaceInEmptyParentheses: 'false' 10 | SpacesInAngles: 'true' 11 | SpacesInParentheses: 'false' 12 | SpacesInSquareBrackets: 'false' 13 | TabWidth: '4' 14 | UseTab: 'false' 15 | 16 | # See https://zed0.co.uk/clang-format-configurator/ for generating this file. -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.aps 2 | *.obj 3 | *.iobj 4 | *.ipdb 5 | *.pdb 6 | *.exp 7 | *.lib 8 | *.res 9 | *.idb 10 | *.res 11 | *.db 12 | *.opendb 13 | *.suo 14 | *.ipch 15 | *.cache 16 | *.log 17 | bin32/* 18 | bin64/* 19 | lib32/* 20 | lib64/* 21 | *.tlog 22 | include/* 23 | packages/* 24 | # Visual Studio 25 | .vs/* 26 | # Visual Studio Code 27 | .vscode/* 28 | src/psqlodbc/psqlodbcBuilder/x64_* 29 | src/*/x64 30 | src/*/Win32 31 | src/*/*/x64 32 | src/*/*/Win32 33 | src/IntegrationTests/ITODBCResults/test_odbc_results1.cpp 34 | src/IntegrationTests/ITODBCResults/memory_leak_report.txt 35 | src/IntegrationTests/ITODBCHelper/ITODBCHelper.vcxproj.user 36 | src/IntegrationTests/ITODBCExecution/memory_leak_report.txt 37 | src/IntegrationTests/ITODBCResults/ITODBCResults.vcxproj.user 38 | LICENSE.txt 39 | /AWSSDK/ 40 | /sdk-build/ 41 | /CMakeFiles/ 42 | /googletest/ 43 | /installer/ 44 | /IntegrationTests/ 45 | /odfeenlist/ 46 | /odfesqlodbc/ 47 | /PerformanceTests/ 48 | /UnitTests/ 49 | *.filters 50 | *.vcxproj 51 | *.sln 52 | cmake_install.cmake 53 | CMakeCache.txt 54 | CPackConfig.cmake 55 | CPackSourceConfig.cmake 56 | CTestTestfile.cmake 57 | /sdk-build64/ 58 | /cmake-build64/ 59 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Code of Conduct 2 | 3 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). 4 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact 5 | opensource-codeofconduct@amazon.com with any additional questions or comments. 6 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Open Distro for Elasticsearch ODBC 2 | Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. -------------------------------------------------------------------------------- /aws_sdk_cpp_setup.ps1: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | 16 | git clone "https://github.com/aws/aws-sdk-cpp.git" 17 | 18 | $prefix_path = (pwd).path 19 | 20 | mkdir sdk-build 21 | 22 | cd sdk-build 23 | 24 | cmake ..\\aws-sdk-cpp\\ -D CMAKE_INSTALL_PREFIX=$prefix_path\AWSSDK\ -D CMAKE_BUILD_TYPE=Release -D BUILD_ONLY="core" -D CUSTOM_MEMORY_MANAGEMENT="OFF" -D ENABLE_RTTI="OFF" -D ENABLE_TESTING="OFF" 25 | 26 | msbuild ALL_BUILD.vcxproj /p:Configuration=Release 27 | 28 | msbuild INSTALL.vcxproj /p:Configuration=Release 29 | 30 | cd .. -------------------------------------------------------------------------------- /aws_sdk_cpp_setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"). 7 | # You may not use this file except in compliance with the License. 8 | # A copy of the License is located at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # or in the "license" file accompanying this file. This file is distributed 13 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 14 | # express or implied. See the License for the specific language governing 15 | # permissions and limitations under the License. 16 | # 17 | 18 | cd src 19 | git clone -b "1.7.329" "https://github.com/aws/aws-sdk-cpp.git" 20 | cd .. -------------------------------------------------------------------------------- /build_win_debug32.ps1: -------------------------------------------------------------------------------- 1 | # Build AWS SDK 2 | $BITNESS=32 3 | 4 | # Compare Bitness for 32 5 | # $ARCH="Win32" 6 | 7 | mkdir sdk-build${BITNESS} 8 | cd sdk-build${BITNESS} 9 | 10 | git clone "https://github.com/aws/aws-sdk-cpp.git" 11 | 12 | $prefix_path = (pwd).path 13 | cmake .\aws-sdk-cpp -A Win32 -D CMAKE_INSTALL_PREFIX=${prefix_path}\AWSSDK\ -D CMAKE_BUILD_TYPE=Debug -D BUILD_ONLY="core" -D CUSTOM_MEMORY_MANAGEMENT="OFF" -D ENABLE_RTTI="OFF" -D ENABLE_TESTING="OFF" 14 | 15 | msbuild ALL_BUILD.vcxproj /p:Configuration=Debug 16 | msbuild INSTALL.vcxproj /p:Configuration=Debug 17 | 18 | cd .. 19 | 20 | # # Configure Project 21 | cmake -S src -B cmake-build${BITNESS} -A Win32 -D CMAKE_INSTALL_PREFIX=sdk-build${BITNESS}\AWSSDK\ -D BUILD_WITH_TESTS=ON 22 | 23 | # # Build Project 24 | cmake --build .\cmake-build${BITNESS} --config Debug 25 | 26 | msbuild cmake-build32\PACKAGE.vcxproj -p:Configuration=Debug -------------------------------------------------------------------------------- /build_win_debug64.ps1: -------------------------------------------------------------------------------- 1 | # Build AWS SDK 2 | $BITNESS = 64 3 | 4 | # Compare Bitness for 32 5 | # $ARCH="x64" 6 | 7 | mkdir sdk-build${BITNESS} 8 | cd sdk-build${BITNESS} 9 | 10 | git clone "https://github.com/aws/aws-sdk-cpp.git" 11 | 12 | $prefix_path = (pwd).path 13 | cmake .\aws-sdk-cpp -A x64 -D CMAKE_INSTALL_PREFIX=${prefix_path}\AWSSDK\ -D CMAKE_BUILD_TYPE=Debug -D BUILD_ONLY="core" -D CUSTOM_MEMORY_MANAGEMENT="OFF" -D ENABLE_RTTI="OFF" -D ENABLE_TESTING="OFF" 14 | 15 | msbuild ALL_BUILD.vcxproj /p:Configuration=Debug 16 | msbuild INSTALL.vcxproj /p:Configuration=Debug 17 | 18 | cd .. 19 | 20 | # # Configure Project 21 | cmake -S src -B cmake-build${BITNESS} -A x64 -D CMAKE_INSTALL_PREFIX=sdk-build${BITNESS}\AWSSDK\ -D BUILD_WITH_TESTS=ON 22 | 23 | # # Build Project 24 | cmake --build .\cmake-build${BITNESS} --config Debug 25 | 26 | cp .\sdk-build64\bin\Debug\* .\bin64\Debug -------------------------------------------------------------------------------- /build_win_release32.ps1: -------------------------------------------------------------------------------- 1 | # Build AWS SDK 2 | $BITNESS=32 3 | 4 | # Compare Bitness for 32 5 | # $ARCH="Win32" 6 | 7 | mkdir sdk-build${BITNESS} 8 | cd sdk-build${BITNESS} 9 | 10 | git clone "https://github.com/aws/aws-sdk-cpp.git" 11 | 12 | $prefix_path = (pwd).path 13 | cmake .\aws-sdk-cpp -A Win32 -D CMAKE_INSTALL_PREFIX=${prefix_path}\AWSSDK\ -D CMAKE_BUILD_TYPE=Release -D BUILD_ONLY="core" -D CUSTOM_MEMORY_MANAGEMENT="OFF" -D ENABLE_RTTI="OFF" -D ENABLE_TESTING="OFF" 14 | 15 | msbuild ALL_BUILD.vcxproj /p:Configuration=Release 16 | msbuild INSTALL.vcxproj /p:Configuration=Release 17 | 18 | cd .. 19 | 20 | # # Configure Project 21 | cmake -S src -B cmake-build${BITNESS} -A Win32 -D CMAKE_INSTALL_PREFIX=sdk-build${BITNESS}\AWSSDK\ -D BUILD_WITH_TESTS=ON 22 | 23 | # # Build Project 24 | cmake --build .\cmake-build${BITNESS} --config Release 25 | -------------------------------------------------------------------------------- /build_win_release64.ps1: -------------------------------------------------------------------------------- 1 | # Build AWS SDK 2 | $BITNESS = 64 3 | 4 | # Compare Bitness for 32 5 | # $ARCH="x64" 6 | 7 | mkdir sdk-build64 8 | cd .\sdk-build64 9 | 10 | git clone "https://github.com/aws/aws-sdk-cpp.git" 11 | 12 | $prefix_path = (pwd).path 13 | cmake .\aws-sdk-cpp -A x64 -D CMAKE_INSTALL_PREFIX=${prefix_path}\AWSSDK\ -D CMAKE_BUILD_TYPE=Release -D BUILD_ONLY="core" -D CUSTOM_MEMORY_MANAGEMENT="OFF" -D ENABLE_RTTI="OFF" -D ENABLE_TESTING="OFF" 14 | 15 | msbuild ALL_BUILD.vcxproj /p:Configuration=Release 16 | msbuild INSTALL.vcxproj /p:Configuration=Release 17 | 18 | cd .. 19 | 20 | # # Configure Project 21 | cmake -S src -B cmake-build64 -A x64 -D CMAKE_INSTALL_PREFIX=sdk-build64\AWSSDK\ -D BUILD_WITH_TESTS=ON 22 | 23 | # # Build Project 24 | cmake --build .\cmake-build64 --config Release 25 | 26 | cp .\sdk-build64\bin\Release\* .\bin64\Release -------------------------------------------------------------------------------- /docs/dev/Pagination.md: -------------------------------------------------------------------------------- 1 | # Opendistro ODBC Driver Cursor (Pagination) Support Design Documentation 2 | 3 | ## Overview 4 | Elasticsearch ODBC Driver supports forward-only cursor. This document illustrates how the cursor(pagination) is handled in the driver. 5 | 6 | For information on how the pagination is supported on Elasticsearch server, check [Opendistro SQL Cursor (Pagination) Support](https://github.com/opendistro-for-elasticsearch/sql/blob/master/docs/dev/Pagination.md). 7 | 8 | ## Data Flow 9 |

10 | 11 |

12 | 13 | * Steps 3 & 4 will repeatedly get datarows until entire result is retrieved. 14 | * Step 5 will send a request to close cursor whenever the connection is closed. 15 | * ODBC Driver will provide an option to define fetch size as a connection parameter. 16 | * If fetch size is zero, query will fallback to non-cursor behavior. 17 | * If fetch size is not given then the number of rows per request will be as per server-defined [default fetch size](https://github.com/opendistro-for-elasticsearch/sql/blob/master/docs/dev/Pagination.md#42-salient-points). 18 | * ODBC Driver will send the request to close cursor whenever the connection is closed. 19 | 20 | ## Detailed Design 21 | 22 | The ODBC Driver will use std::promise and std::future to retrieve the result asynchronusly. 23 | 24 | * Thread to send queries is designed to get the next set of results. 25 | * Thread to process data is designed to parse the datarows and add the results in the resultset. 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/dev/example_config_files/elasticsearch.yml: -------------------------------------------------------------------------------- 1 | xpack.security.http.ssl.enabled: true 2 | xpack.security.http.ssl.client_authentication: none 3 | xpack.security.http.ssl.key_passphrase: password_if_applicable 4 | xpack.security.http.ssl.certificate: certificate.pem 5 | xpack.security.http.ssl.key: key.pem -------------------------------------------------------------------------------- /docs/dev/example_config_files/example_tdc_file.tdc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /docs/dev/example_config_files/kibana.yml: -------------------------------------------------------------------------------- 1 | # The URLs of the Elasticsearch instances to use for all your queries. 2 | elasticsearch.hosts: ["https://localhost:9200"] 3 | 4 | elasticsearch.ssl.verificationMode: none 5 | 6 | server.ssl.enabled: true 7 | server.ssl.certificate: /certificate.pem 8 | server.ssl.key: /key.pem 9 | server.ssl.clientAuthentication: none 10 | -------------------------------------------------------------------------------- /docs/dev/img/async_result_retrieval.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/docs/dev/img/async_result_retrieval.png -------------------------------------------------------------------------------- /docs/dev/img/data_flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/docs/dev/img/data_flow.png -------------------------------------------------------------------------------- /docs/dev/sequence_diagrams/SQLDriverConnect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/docs/dev/sequence_diagrams/SQLDriverConnect.png -------------------------------------------------------------------------------- /docs/dev/sequence_diagrams/SQLDriverConnect.txt: -------------------------------------------------------------------------------- 1 | ODBCTest->psqlodbc Driver:SQLDriverConnect or SQLConnect 2 | psqlodbc Driver->libes (C interface):DB Parameters 3 | libes (C interface)->Connection Factory:ESConn 4 | Connection Factory->ESConn:Initialize ESConn 5 | ESConn->libes (C interface):ESConn object 6 | libes (C interface)->ESConn:DB Parameters 7 | ESConn->libes (C interface):DB Parameters Validation Result 8 | libes (C interface)->ESConn:Connect to DB 9 | database ElasticSearch 10 | ESConn->ElasticSearch:Get 11 | ElasticSearch->ESConn:data 12 | ESConn->libes (C interface):DB Connection Result 13 | libes (C interface)->psqlodbc Driver:ESConn object with DB Connection 14 | psqlodbc Driver->ODBCTest:SQL Code Result -------------------------------------------------------------------------------- /docs/dev/sequence_diagrams/SQLExecDirect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/docs/dev/sequence_diagrams/SQLExecDirect.png -------------------------------------------------------------------------------- /docs/dev/sequence_diagrams/SQLExecDirect.txt: -------------------------------------------------------------------------------- 1 | Title SQLExecDirect Sequence Diagram 2 | ODBCTest->psqlodbc Driver:SQLExecDirect 3 | psqlodbc Driver->libes (C interface):Query 4 | libes (C interface)->libes (C interface):Active Connection 5 | libes (C interface)->ESConn:Connection, Query 6 | ESConn->ESConn:Connection, Query validation 7 | database ElasticSearch 8 | ESConn->ElasticSearch:Post 9 | ElasticSearch->ESConn:Data 10 | ESConn->libes (C interface):Data 11 | libes (C interface)->psqlodbc Driver:Data 12 | psqlodbc Driver->ODBCTest:Query Execution Status -------------------------------------------------------------------------------- /docs/test/excel_connection.md: -------------------------------------------------------------------------------- 1 | # Testing Microsoft Excel Connection 2 | 3 | ## Prerequisites 4 | * [Download and install](../../README.md) Open Distro for Elasticsearch SQL ODBC Driver. 5 | * [Install and configure](https://opendistro.github.io/for-elasticsearch-docs/docs/install/) Open Distro for Elasticsearch. 6 | * Open ODBC Data Source Administrator. Click on **System DSN** > **ODFE SQL ODBC DSN** > **Configure**. 7 | * Set all connection options & Click on **Test**. Connection test should return `Connection Successful`. 8 | 9 | ## Microsoft Excel Connectivity 10 | 11 | There are multiple ways to load data from Elasticsearch in Microsoft Excel. 12 | * [ODBC as Data Source](odbc_data_source_connection.md) 13 | * [Microsoft Query](microsoft_query_connection.md) 14 | * [Query Wizard](query_wizard_connection.md) 15 | -------------------------------------------------------------------------------- /docs/test/img/from_odbc_advanced_options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/docs/test/img/from_odbc_advanced_options.png -------------------------------------------------------------------------------- /docs/test/img/from_odbc_advanced_options_auth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/docs/test/img/from_odbc_advanced_options_auth.png -------------------------------------------------------------------------------- /docs/test/img/from_odbc_advanced_options_load_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/docs/test/img/from_odbc_advanced_options_load_data.png -------------------------------------------------------------------------------- /docs/test/img/from_odbc_auth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/docs/test/img/from_odbc_auth.png -------------------------------------------------------------------------------- /docs/test/img/from_odbc_dsn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/docs/test/img/from_odbc_dsn.png -------------------------------------------------------------------------------- /docs/test/img/from_odbc_loaded_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/docs/test/img/from_odbc_loaded_data.png -------------------------------------------------------------------------------- /docs/test/img/from_odbc_table_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/docs/test/img/from_odbc_table_list.png -------------------------------------------------------------------------------- /docs/test/img/microsoft_query_add_tables.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/docs/test/img/microsoft_query_add_tables.png -------------------------------------------------------------------------------- /docs/test/img/microsoft_query_disable_use_the_query_wizard_option.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/docs/test/img/microsoft_query_disable_use_the_query_wizard_option.png -------------------------------------------------------------------------------- /docs/test/img/microsoft_query_import_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/docs/test/img/microsoft_query_import_data.png -------------------------------------------------------------------------------- /docs/test/img/microsoft_query_loaded_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/docs/test/img/microsoft_query_loaded_data.png -------------------------------------------------------------------------------- /docs/test/img/microsoft_query_select_colums.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/docs/test/img/microsoft_query_select_colums.png -------------------------------------------------------------------------------- /docs/test/img/microsoft_query_select_tables.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/docs/test/img/microsoft_query_select_tables.png -------------------------------------------------------------------------------- /docs/test/img/microsoft_query_table_options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/docs/test/img/microsoft_query_table_options.png -------------------------------------------------------------------------------- /docs/test/img/odbc_data_source.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/docs/test/img/odbc_data_source.png -------------------------------------------------------------------------------- /docs/test/img/query_wizard_choose_coulms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/docs/test/img/query_wizard_choose_coulms.png -------------------------------------------------------------------------------- /docs/test/img/query_wizard_enable_use_the_query_wizard_option.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/docs/test/img/query_wizard_enable_use_the_query_wizard_option.png -------------------------------------------------------------------------------- /docs/test/img/query_wizard_error_popup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/docs/test/img/query_wizard_error_popup.png -------------------------------------------------------------------------------- /docs/test/img/query_wizard_filter_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/docs/test/img/query_wizard_filter_data.png -------------------------------------------------------------------------------- /docs/test/img/query_wizard_finish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/docs/test/img/query_wizard_finish.png -------------------------------------------------------------------------------- /docs/test/img/query_wizard_import_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/docs/test/img/query_wizard_import_data.png -------------------------------------------------------------------------------- /docs/test/img/query_wizard_loaded_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/docs/test/img/query_wizard_loaded_data.png -------------------------------------------------------------------------------- /docs/test/img/query_wizard_select_tables.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/docs/test/img/query_wizard_select_tables.png -------------------------------------------------------------------------------- /docs/test/img/query_wizard_sort_order.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/docs/test/img/query_wizard_sort_order.png -------------------------------------------------------------------------------- /docs/test/img/query_wizard_table_options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/docs/test/img/query_wizard_table_options.png -------------------------------------------------------------------------------- /docs/test/img/select_microsoft_query.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/docs/test/img/select_microsoft_query.png -------------------------------------------------------------------------------- /docs/test/microsoft_query_connection.md: -------------------------------------------------------------------------------- 1 | ## Microsoft Query Connection 2 | 3 | * Open blank workbook in Microsoft Excel. 4 | * Click on **Data** > **Get Data** > **From Other Sources** > **From Microsoft Query** 5 | 6 | 7 | 8 | * Select **Databases** > **ODFE SQL ODBC DSN**. 9 | * Clear the **Use the Query Wizard to create/edit queries** check box, and then click on **OK**. 10 | 11 | 12 | 13 | * Click on **Options** in Add Table window. 14 | 15 | 16 | 17 | * Click **Refresh**. Select checkbox **Tables**. Clear all other checkboxes. Click on **OK**. 18 | 19 | 20 | 21 | * Select tables and click on **Add**. After all required tables are added, click on **Close**. 22 | 23 | 24 | 25 | * Double click on required columns. You can double-click the asterisk (*) to select all the columns from a table. 26 | 27 | 28 | 29 | * You can select different options to define query here. Ensure the query is supported by the [OpenDistro for Elasticsearch SQL plugin](https://github.com/opendistro-for-elasticsearch/sql). After defining query, click on **Return Data** to retrieve the result set. 30 | * Select worksheet and click on **OK**. 31 | 32 | 33 | 34 | * Data will be loaded in the spreadsheet 35 | 36 | 37 | -------------------------------------------------------------------------------- /docs/test/odbc_data_source_connection.md: -------------------------------------------------------------------------------- 1 | ## ODBC as Data Source Connection 2 | 3 | * Open blank workbook in Microsoft Excel. 4 | * Click on **Data** > **Get Data** > **From Other Sources** > **From ODBC** 5 | 6 | 7 | 8 | * Select **ODFE SQL ODBC DSN**. Click **OK**. 9 | 10 | 11 | 12 | * Select **Default or Custom** in connection credentials windows and click on **Connect**. 13 | 14 | 15 | 16 | * Select a table from list to load data preview. Click on **Load**. 17 | 18 | 19 | 20 | #### Test Advanced options 21 | 22 | * Click on **Advanced options** after selecting DSN. 23 | * Add some connection options in **Connection string**. 24 | * Enter any supported **SQL statement**. 25 | 26 | 27 | 28 | * Click on **OK**. 29 | * Select Default option for authentication and Click on **Connect**. 30 | 31 | 32 | 33 | * Data preview should be available. **Load** data in spreadsheet. 34 | 35 | 36 | 37 | * Data will be loaded in the spreadsheet 38 | 39 | 40 | 41 | NOTE: Check driver logs for verify modified connection string options. 42 | -------------------------------------------------------------------------------- /docs/test/query_wizard_connection.md: -------------------------------------------------------------------------------- 1 | ## Query Wizard Connection 2 | 3 | * Open blank workbook in Microsoft Excel. 4 | * Click on **Data** > **Get Data** > **From Other Sources** > **From Microsoft Query** 5 | 6 | 7 | 8 | * Select **Databases** > **ODFE SQL ODBC DSN**. 9 | * Ensure the **Use the Query Wizard to create/edit queries** check box is selected, and then click **OK**. 10 | 11 | 12 | 13 | * You might get an popup with a message `This data source contains no visible tables`. Click on **OK**. 14 | 15 | 16 | 17 | * Click on **Options** in Query Wizard window. 18 | 19 | 20 | 21 | * Select checkbox **Tables**. Clear all other checkboxes. Click on **OK**. 22 | 23 | 24 | 25 | * You will see list of available tables & columns. Select required tables/columns and click on **>**. 26 | * After selecting all required columns, Click on **Next**. 27 | 28 | 29 | 30 | * Specify conditions to apply filter if needed. Ensure selected operations are supported by Elasticsearch. Click on **Next**. 31 | 32 | 33 | 34 | * Specify sorting options if required. Ensure selected operations are supported by the [OpenDistro for Elasticsearch SQL plugin](https://github.com/opendistro-for-elasticsearch/sql). Click on **Next**. 35 | 36 | 37 | 38 | * Select **Return Data to Microsoft Excel** and click on **Finish**. 39 | 40 | 41 | 42 | * Select worksheet and click on **OK**. 43 | 44 | 45 | 46 | * Data will be loaded in the spreadsheet 47 | 48 | 49 | -------------------------------------------------------------------------------- /docs/user/configuration_options.md: -------------------------------------------------------------------------------- 1 | # Configuration Options 2 | 3 | >**NOTE:** All option names are *case-insensitive*. 4 | 5 | #### Basic Options 6 | 7 | | Option | Description | Type | Default | 8 | |--------|-------------|------|---------------| 9 | | `DSN` | **D**ata **S**ource **N**ame used for configuring the connection. | string | | 10 | | `Host` / `Server` | Hostname or IP address for the target cluster. | string | | 11 | | `Port` | Port number on which the cluster's REST interface is listening. | string | | 12 | 13 | #### Authentication Options 14 | 15 | | Option | Description | Type | Default | 16 | |--------|-------------|------|---------------| 17 | | `Auth` | Authentication mechanism to use. | one of `BASIC` (basic HTTP), `AWS_SIGV4` (AWS auth), `NONE` | `NONE` 18 | | `User` / `UID` | [`Auth=BASIC`] Username for the connection. | string | | 19 | | `Password` / `PWD` | [`Auth=BASIC`] Password for the connection. | string | | 20 | | `Region` | [`Auth=AWS_SIGV4`] Region used for signing requests | AWS region (eg. `us-west-1`) | | 21 | 22 | #### Advanced Options 23 | 24 | | Option | Description | Type | Default | 25 | |--------|-------------|------|---------------| 26 | | `UseSSL` | Whether to establish the connection over SSL/TLS | boolean (`0` or `1`) | false (`0`) | 27 | | `HostnameVerification` | Indicate whether certificate hostname verification should be performed for an SSL/TLS connection. | boolean (`0` or `1`) | true (`1`) | 28 | | `ResponseTimeout` | The maximum time to wait for responses from the `Host`, in seconds. | integer | `10` | 29 | 30 | #### Logging Options 31 | 32 | | Option | Description | Type | Default | 33 | |--------|-------------|------|---------------| 34 | | `LogLevel` | Severity level for driver logs. | one of `ES_OFF`, `ES_FATAL`, `ES_ERROR`, `ES_INFO`, `ES_DEBUG`, `ES_TRACE`, `ES_ALL` | `ES_WARNING` | 35 | | `LogOutput` | Location for storing driver logs. | string | WIN: `C:\`, MAC: `/tmp` | 36 | 37 | **NOTE:** Administrative privileges are required to change the value of logging options on Windows. -------------------------------------------------------------------------------- /docs/user/img/driver_default_config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/docs/user/img/driver_default_config.png -------------------------------------------------------------------------------- /docs/user/img/dsn_default_config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/docs/user/img/dsn_default_config.png -------------------------------------------------------------------------------- /docs/user/mac_configure_dsn.md: -------------------------------------------------------------------------------- 1 | # Configuring a DSN on Mac 2 | 3 | > NOTE: iODBC Administrator is included with the [iODBC Driver Manager](http://www.iodbc.org/dataspace/doc/iodbc/wiki/iodbcWiki/Downloads), which must be installed in order to use the driver on Mac. 4 | 5 | 1. Open **iODBC Administrator** using the following command (this gives the application permissions to save the Driver & DSN configurations): 6 | 1. `sudo /Applications/iODBC/iODBC\ Administrator64.app/Contents/MacOS/iODBC\ Administrator64` 7 | 8 | ## Adding a Driver Entry 9 | 10 | Note: In order to use the Open Distro for Elasticsearch SQL ODBC driver with the [Tableau Connector](), the **Description of the Driver** field *must* start with `ODFE SQL ODBC`. 11 | 12 | 1. Go to the **ODBC Drivers** tab. 13 | 2. Click **Add a Driver**. 14 | * **Description of the Driver**: The driver name used for ODBC connections (ex. `ODFE SQL ODBC Driver`) 15 | * **Driver File Name**: The path to the driver file (default installed path: `/usr/local/lib/odfesqlodbc/bin/libodfesqlodbc.dylib`) 16 | * **Setup File Name**: The path to the driver file (default installed path: `/usr/local/lib/odfesqlodbc/bin/libodfesqlodbc.dylib`) 17 | * Set as a **User** driver 18 | * Below is a screenshot of how the final screen should look. 19 | 3. Click **OK** to save the options. 20 | 21 |

22 | 23 |

24 | 25 | ## Adding a DSN Entry 26 | 27 | This is not required if you are using the Tableau Connector, but will help with connecting to your data source through other applications. 28 | 29 | 1. Go to the **User DSN** tab 30 | 2. Select **Add** on the right side of the window. 31 | * Choose the Driver you added above. 32 | * **Data Source Name (DSN)**: The name of the DSN used to store connection options (ex. `ODFE SQL ODBC DSN`) 33 | * **Comment**: Not required 34 | * Add key-value pairs by using the **'+'** button. Below is a picture of the recommended set of options for a default local Open Distro for Elasticsearch installation. 35 | 3. Click **OK** to save the DSN configuration. 36 | 37 |

38 | 39 |

-------------------------------------------------------------------------------- /libraries/VisualLeakDetector/bin/Microsoft.DTfW.DHL.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /libraries/VisualLeakDetector/bin/dbghelp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/libraries/VisualLeakDetector/bin/dbghelp.dll -------------------------------------------------------------------------------- /libraries/VisualLeakDetector/bin/vld_x86.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/libraries/VisualLeakDetector/bin/vld_x86.dll -------------------------------------------------------------------------------- /libraries/VisualLeakDetector/bin64/Microsoft.DTfW.DHL.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /libraries/VisualLeakDetector/bin64/dbghelp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/libraries/VisualLeakDetector/bin64/dbghelp.dll -------------------------------------------------------------------------------- /libraries/VisualLeakDetector/bin64/vld_x64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/libraries/VisualLeakDetector/bin64/vld_x64.dll -------------------------------------------------------------------------------- /libraries/VisualLeakDetector/include/vld_def.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Visual Leak Detector - Import Library Header 4 | // Copyright (c) 2005-2014 VLD Team 5 | // 6 | // This library is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 2.1 of the License, or (at your option) any later version. 10 | // 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | // Lesser General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU Lesser General Public 17 | // License along with this library; if not, write to the Free Software 18 | // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | // 20 | // See COPYING.txt for the full terms of the GNU Lesser General Public License. 21 | // 22 | //////////////////////////////////////////////////////////////////////////////// 23 | 24 | #pragma once 25 | 26 | #ifndef _WCHAR_T_DEFINED 27 | # include 28 | #endif 29 | 30 | #define VLD_OPT_AGGREGATE_DUPLICATES 0x0001 // If set, aggregate duplicate leaks in the leak report. 31 | #define VLD_OPT_MODULE_LIST_INCLUDE 0x0002 // If set, modules in the module list are included, all others are excluded. 32 | #define VLD_OPT_REPORT_TO_DEBUGGER 0x0004 // If set, the memory leak report is sent to the debugger. 33 | #define VLD_OPT_REPORT_TO_FILE 0x0008 // If set, the memory leak report is sent to a file. 34 | #define VLD_OPT_SAFE_STACK_WALK 0x0010 // If set, the stack is walked using the "safe" method (StackWalk64). 35 | #define VLD_OPT_SELF_TEST 0x0020 // If set, perform a self-test to verify memory leak self-checking. 36 | #define VLD_OPT_SLOW_DEBUGGER_DUMP 0x0040 // If set, inserts a slight delay between sending output to the debugger. 37 | #define VLD_OPT_START_DISABLED 0x0080 // If set, memory leak detection will initially disabled. 38 | #define VLD_OPT_TRACE_INTERNAL_FRAMES 0x0100 // If set, include useless frames (e.g. internal to VLD) in call stacks. 39 | #define VLD_OPT_UNICODE_REPORT 0x0200 // If set, the leak report will be encoded UTF-16 instead of ASCII. 40 | #define VLD_OPT_VLDOFF 0x0400 // If set, VLD will be completely deactivated. It will not attach to any modules. 41 | #define VLD_OPT_REPORT_TO_STDOUT 0x0800 // If set, the memory leak report is sent to stdout. 42 | #define VLD_OPT_SKIP_HEAPFREE_LEAKS 0x1000 // If set, VLD skip HeapFree memory leaks. 43 | #define VLD_OPT_VALIDATE_HEAPFREE 0x2000 // If set, VLD verifies and reports heap consistency for HeapFree calls. 44 | #define VLD_OPT_SKIP_CRTSTARTUP_LEAKS 0x4000 // If set, VLD skip crt srtartup memory leaks. 45 | 46 | #define VLD_RPTHOOK_INSTALL 0 47 | #define VLD_RPTHOOK_REMOVE 1 48 | 49 | typedef int (__cdecl * VLD_REPORT_HOOK)(int reportType, wchar_t *message, int *returnValue); 50 | -------------------------------------------------------------------------------- /libraries/VisualLeakDetector/lib/vld.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/libraries/VisualLeakDetector/lib/vld.lib -------------------------------------------------------------------------------- /libraries/VisualLeakDetector/lib64/vld.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/sql-odbc/2244401281047f4eeddd7e3ae021db670be048fb/libraries/VisualLeakDetector/lib64/vld.lib -------------------------------------------------------------------------------- /libraries/rabbit/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013-2014 mashiro 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /libraries/rabbit/README: -------------------------------------------------------------------------------- 1 | Downloaded on November 18th, 2019 @ 9:40 am 2 | Master branch 3 | https://github.com/mashiro/rabbit/tree/master 4 | 5 | - lyndonb@bitquilltech.com -------------------------------------------------------------------------------- /libraries/rapidjson/include/rapidjson/internal/ieee754.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_IEEE754_ 16 | #define RAPIDJSON_IEEE754_ 17 | 18 | #include "../rapidjson.h" 19 | 20 | RAPIDJSON_NAMESPACE_BEGIN 21 | namespace internal { 22 | 23 | class Double { 24 | public: 25 | Double() {} 26 | Double(double d) : d_(d) {} 27 | Double(uint64_t u) : u_(u) {} 28 | 29 | double Value() const { return d_; } 30 | uint64_t Uint64Value() const { return u_; } 31 | 32 | double NextPositiveDouble() const { 33 | RAPIDJSON_ASSERT(!Sign()); 34 | return Double(u_ + 1).Value(); 35 | } 36 | 37 | bool Sign() const { return (u_ & kSignMask) != 0; } 38 | uint64_t Significand() const { return u_ & kSignificandMask; } 39 | int Exponent() const { return static_cast(((u_ & kExponentMask) >> kSignificandSize) - kExponentBias); } 40 | 41 | bool IsNan() const { return (u_ & kExponentMask) == kExponentMask && Significand() != 0; } 42 | bool IsInf() const { return (u_ & kExponentMask) == kExponentMask && Significand() == 0; } 43 | bool IsNanOrInf() const { return (u_ & kExponentMask) == kExponentMask; } 44 | bool IsNormal() const { return (u_ & kExponentMask) != 0 || Significand() == 0; } 45 | bool IsZero() const { return (u_ & (kExponentMask | kSignificandMask)) == 0; } 46 | 47 | uint64_t IntegerSignificand() const { return IsNormal() ? Significand() | kHiddenBit : Significand(); } 48 | int IntegerExponent() const { return (IsNormal() ? Exponent() : kDenormalExponent) - kSignificandSize; } 49 | uint64_t ToBias() const { return (u_ & kSignMask) ? ~u_ + 1 : u_ | kSignMask; } 50 | 51 | static unsigned EffectiveSignificandSize(int order) { 52 | if (order >= -1021) 53 | return 53; 54 | else if (order <= -1074) 55 | return 0; 56 | else 57 | return static_cast(order) + 1074; 58 | } 59 | 60 | private: 61 | static const int kSignificandSize = 52; 62 | static const int kExponentBias = 0x3FF; 63 | static const int kDenormalExponent = 1 - kExponentBias; 64 | static const uint64_t kSignMask = RAPIDJSON_UINT64_C2(0x80000000, 0x00000000); 65 | static const uint64_t kExponentMask = RAPIDJSON_UINT64_C2(0x7FF00000, 0x00000000); 66 | static const uint64_t kSignificandMask = RAPIDJSON_UINT64_C2(0x000FFFFF, 0xFFFFFFFF); 67 | static const uint64_t kHiddenBit = RAPIDJSON_UINT64_C2(0x00100000, 0x00000000); 68 | 69 | union { 70 | double d_; 71 | uint64_t u_; 72 | }; 73 | }; 74 | 75 | } // namespace internal 76 | RAPIDJSON_NAMESPACE_END 77 | 78 | #endif // RAPIDJSON_IEEE754_ 79 | -------------------------------------------------------------------------------- /libraries/rapidjson/include/rapidjson/internal/strfunc.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_INTERNAL_STRFUNC_H_ 16 | #define RAPIDJSON_INTERNAL_STRFUNC_H_ 17 | 18 | #include "../stream.h" 19 | 20 | RAPIDJSON_NAMESPACE_BEGIN 21 | namespace internal { 22 | 23 | //! Custom strlen() which works on different character types. 24 | /*! \tparam Ch Character type (e.g. char, wchar_t, short) 25 | \param s Null-terminated input string. 26 | \return Number of characters in the string. 27 | \note This has the same semantics as strlen(), the return value is not number of Unicode codepoints. 28 | */ 29 | template 30 | inline SizeType StrLen(const Ch* s) { 31 | const Ch* p = s; 32 | while (*p) ++p; 33 | return SizeType(p - s); 34 | } 35 | 36 | //! Returns number of code points in a encoded string. 37 | template 38 | bool CountStringCodePoint(const typename Encoding::Ch* s, SizeType length, SizeType* outCount) { 39 | GenericStringStream is(s); 40 | const typename Encoding::Ch* end = s + length; 41 | SizeType count = 0; 42 | while (is.src_ < end) { 43 | unsigned codepoint; 44 | if (!Encoding::Decode(is, &codepoint)) 45 | return false; 46 | count++; 47 | } 48 | *outCount = count; 49 | return true; 50 | } 51 | 52 | } // namespace internal 53 | RAPIDJSON_NAMESPACE_END 54 | 55 | #endif // RAPIDJSON_INTERNAL_STRFUNC_H_ 56 | -------------------------------------------------------------------------------- /libraries/rapidjson/include/rapidjson/internal/swap.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_INTERNAL_SWAP_H_ 16 | #define RAPIDJSON_INTERNAL_SWAP_H_ 17 | 18 | #include "../rapidjson.h" 19 | 20 | #if defined(__clang__) 21 | RAPIDJSON_DIAG_PUSH 22 | RAPIDJSON_DIAG_OFF(c++98-compat) 23 | #endif 24 | 25 | RAPIDJSON_NAMESPACE_BEGIN 26 | namespace internal { 27 | 28 | //! Custom swap() to avoid dependency on C++ header 29 | /*! \tparam T Type of the arguments to swap, should be instantiated with primitive C++ types only. 30 | \note This has the same semantics as std::swap(). 31 | */ 32 | template 33 | inline void Swap(T& a, T& b) RAPIDJSON_NOEXCEPT { 34 | T tmp = a; 35 | a = b; 36 | b = tmp; 37 | } 38 | 39 | } // namespace internal 40 | RAPIDJSON_NAMESPACE_END 41 | 42 | #if defined(__clang__) 43 | RAPIDJSON_DIAG_POP 44 | #endif 45 | 46 | #endif // RAPIDJSON_INTERNAL_SWAP_H_ 47 | -------------------------------------------------------------------------------- /libraries/rapidjson/include/rapidjson/memorybuffer.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_MEMORYBUFFER_H_ 16 | #define RAPIDJSON_MEMORYBUFFER_H_ 17 | 18 | #include "stream.h" 19 | #include "internal/stack.h" 20 | 21 | RAPIDJSON_NAMESPACE_BEGIN 22 | 23 | //! Represents an in-memory output byte stream. 24 | /*! 25 | This class is mainly for being wrapped by EncodedOutputStream or AutoUTFOutputStream. 26 | 27 | It is similar to FileWriteBuffer but the destination is an in-memory buffer instead of a file. 28 | 29 | Differences between MemoryBuffer and StringBuffer: 30 | 1. StringBuffer has Encoding but MemoryBuffer is only a byte buffer. 31 | 2. StringBuffer::GetString() returns a null-terminated string. MemoryBuffer::GetBuffer() returns a buffer without terminator. 32 | 33 | \tparam Allocator type for allocating memory buffer. 34 | \note implements Stream concept 35 | */ 36 | template 37 | struct GenericMemoryBuffer { 38 | typedef char Ch; // byte 39 | 40 | GenericMemoryBuffer(Allocator* allocator = 0, size_t capacity = kDefaultCapacity) : stack_(allocator, capacity) {} 41 | 42 | void Put(Ch c) { *stack_.template Push() = c; } 43 | void Flush() {} 44 | 45 | void Clear() { stack_.Clear(); } 46 | void ShrinkToFit() { stack_.ShrinkToFit(); } 47 | Ch* Push(size_t count) { return stack_.template Push(count); } 48 | void Pop(size_t count) { stack_.template Pop(count); } 49 | 50 | const Ch* GetBuffer() const { 51 | return stack_.template Bottom(); 52 | } 53 | 54 | size_t GetSize() const { return stack_.GetSize(); } 55 | 56 | static const size_t kDefaultCapacity = 256; 57 | mutable internal::Stack stack_; 58 | }; 59 | 60 | typedef GenericMemoryBuffer<> MemoryBuffer; 61 | 62 | //! Implement specialized version of PutN() with memset() for better performance. 63 | template<> 64 | inline void PutN(MemoryBuffer& memoryBuffer, char c, size_t n) { 65 | std::memset(memoryBuffer.stack_.Push(n), c, n * sizeof(c)); 66 | } 67 | 68 | RAPIDJSON_NAMESPACE_END 69 | 70 | #endif // RAPIDJSON_MEMORYBUFFER_H_ 71 | -------------------------------------------------------------------------------- /libraries/rapidjson/include/rapidjson/memorystream.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_MEMORYSTREAM_H_ 16 | #define RAPIDJSON_MEMORYSTREAM_H_ 17 | 18 | #include "stream.h" 19 | 20 | #ifdef __clang__ 21 | RAPIDJSON_DIAG_PUSH 22 | RAPIDJSON_DIAG_OFF(unreachable-code) 23 | RAPIDJSON_DIAG_OFF(missing-noreturn) 24 | #endif 25 | 26 | RAPIDJSON_NAMESPACE_BEGIN 27 | 28 | //! Represents an in-memory input byte stream. 29 | /*! 30 | This class is mainly for being wrapped by EncodedInputStream or AutoUTFInputStream. 31 | 32 | It is similar to FileReadBuffer but the source is an in-memory buffer instead of a file. 33 | 34 | Differences between MemoryStream and StringStream: 35 | 1. StringStream has encoding but MemoryStream is a byte stream. 36 | 2. MemoryStream needs size of the source buffer and the buffer don't need to be null terminated. StringStream assume null-terminated string as source. 37 | 3. MemoryStream supports Peek4() for encoding detection. StringStream is specified with an encoding so it should not have Peek4(). 38 | \note implements Stream concept 39 | */ 40 | struct MemoryStream { 41 | typedef char Ch; // byte 42 | 43 | MemoryStream(const Ch *src, size_t size) : src_(src), begin_(src), end_(src + size), size_(size) {} 44 | 45 | Ch Peek() const { return RAPIDJSON_UNLIKELY(src_ == end_) ? '\0' : *src_; } 46 | Ch Take() { return RAPIDJSON_UNLIKELY(src_ == end_) ? '\0' : *src_++; } 47 | size_t Tell() const { return static_cast(src_ - begin_); } 48 | 49 | Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; } 50 | void Put(Ch) { RAPIDJSON_ASSERT(false); } 51 | void Flush() { RAPIDJSON_ASSERT(false); } 52 | size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; } 53 | 54 | // For encoding detection only. 55 | const Ch* Peek4() const { 56 | return Tell() + 4 <= size_ ? src_ : 0; 57 | } 58 | 59 | const Ch* src_; //!< Current read position. 60 | const Ch* begin_; //!< Original head of the string. 61 | const Ch* end_; //!< End of stream. 62 | size_t size_; //!< Size of the stream. 63 | }; 64 | 65 | RAPIDJSON_NAMESPACE_END 66 | 67 | #ifdef __clang__ 68 | RAPIDJSON_DIAG_POP 69 | #endif 70 | 71 | #endif // RAPIDJSON_MEMORYBUFFER_H_ 72 | -------------------------------------------------------------------------------- /libraries/rapidjson/include/rapidjson/ostreamwrapper.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_OSTREAMWRAPPER_H_ 16 | #define RAPIDJSON_OSTREAMWRAPPER_H_ 17 | 18 | #include "stream.h" 19 | #include 20 | 21 | #ifdef __clang__ 22 | RAPIDJSON_DIAG_PUSH 23 | RAPIDJSON_DIAG_OFF(padded) 24 | #endif 25 | 26 | RAPIDJSON_NAMESPACE_BEGIN 27 | 28 | //! Wrapper of \c std::basic_ostream into RapidJSON's Stream concept. 29 | /*! 30 | The classes can be wrapped including but not limited to: 31 | 32 | - \c std::ostringstream 33 | - \c std::stringstream 34 | - \c std::wpstringstream 35 | - \c std::wstringstream 36 | - \c std::ifstream 37 | - \c std::fstream 38 | - \c std::wofstream 39 | - \c std::wfstream 40 | 41 | \tparam StreamType Class derived from \c std::basic_ostream. 42 | */ 43 | 44 | template 45 | class BasicOStreamWrapper { 46 | public: 47 | typedef typename StreamType::char_type Ch; 48 | BasicOStreamWrapper(StreamType& stream) : stream_(stream) {} 49 | 50 | void Put(Ch c) { 51 | stream_.put(c); 52 | } 53 | 54 | void Flush() { 55 | stream_.flush(); 56 | } 57 | 58 | // Not implemented 59 | char Peek() const { RAPIDJSON_ASSERT(false); return 0; } 60 | char Take() { RAPIDJSON_ASSERT(false); return 0; } 61 | size_t Tell() const { RAPIDJSON_ASSERT(false); return 0; } 62 | char* PutBegin() { RAPIDJSON_ASSERT(false); return 0; } 63 | size_t PutEnd(char*) { RAPIDJSON_ASSERT(false); return 0; } 64 | 65 | private: 66 | BasicOStreamWrapper(const BasicOStreamWrapper&); 67 | BasicOStreamWrapper& operator=(const BasicOStreamWrapper&); 68 | 69 | StreamType& stream_; 70 | }; 71 | 72 | typedef BasicOStreamWrapper OStreamWrapper; 73 | typedef BasicOStreamWrapper WOStreamWrapper; 74 | 75 | #ifdef __clang__ 76 | RAPIDJSON_DIAG_POP 77 | #endif 78 | 79 | RAPIDJSON_NAMESPACE_END 80 | 81 | #endif // RAPIDJSON_OSTREAMWRAPPER_H_ 82 | -------------------------------------------------------------------------------- /opendistro-elasticsearch-odbc.release-notes.md: -------------------------------------------------------------------------------- 1 | ## 2020-05-05, Version 1.7 2 | 3 | ### Notable Changes 4 | 5 | This is the first release of OpenDistro For ELasticsearch ODBC driver. 6 | 7 | OpenDistro ODBC provides a driver for ODBC connectivity for OpenDistro SQL plugin. The driver has been developed from scratch and offers the following features in this initial release: 8 | 9 | * ODBC API implementation as per ODBC 3.51 specifications 10 | * Support for MacOS and Windows installers 11 | * Support for HTTP BASIC and AWS SIGV4 authentication mechanisms 12 | * Full support for Elasticsearch Datatypes: BOOLEAN, BYTE, SHORT, INTEGER, LONG, HALF_FLOAT, FLOAT, DOUBLE, SCALED_FLOAT, KEYWORD, TEXT 13 | 14 | -------------------------------------------------------------------------------- /release-notes/sql-odbc.release-notes-1.7.0.0.md: -------------------------------------------------------------------------------- 1 | ## 2020-05-05, Version 1.7 2 | 3 | This is the first release of OpenDistro For ELasticsearch ODBC driver. 4 | 5 | OpenDistro ODBC provides a driver for ODBC connectivity for OpenDistro SQL plugin. The driver has been developed from scratch and offers the following features in this initial release: 6 | 7 | * ODBC API implementation as per ODBC 3.51 specifications 8 | * Support for MacOS and Windows installers 9 | * Support for HTTP BASIC and AWS SIGV4 authentication mechanisms 10 | * Full support for Elasticsearch Datatypes: BOOLEAN, BYTE, SHORT, INTEGER, LONG, HALF_FLOAT, FLOAT, DOUBLE, SCALED_FLOAT, KEYWORD, TEXT 11 | 12 | ### Features 13 | 14 | * Feature[#7](https://github.com/opendistro-for-elasticsearch/sql-odbc/pull/7): Add support for connection string abbreviations 15 | 16 | * Feature[#2](https://github.com/opendistro-for-elasticsearch/sql-odbc/pull/2): Connection string refactoring and registry updates 17 | 18 | * Feature[#27](https://github.com/opendistro-for-elasticsearch/sql-odbc/pull/27): Simple Windows Installer 19 | 20 | 21 | * Feature[#78](https://github.com/opendistro-for-elasticsearch/sql-odbc/pull/78): Add fetch_size for pagination support 22 | 23 | 24 | ### Documentation 25 | 26 | * [Pagination support design document](https://github.com/opendistro-for-elasticsearch/sql-odbc/pull/40) 27 | * [Update README for authentication & encryption configuration options](https://github.com/opendistro-for-elasticsearch/sql-odbc/pull/33) 28 | * [Instructions for signing installers](https://github.com/opendistro-for-elasticsearch/sql-odbc/pull/84) 29 | 30 | 31 | 32 | ### BugFixes 33 | 34 | * [Fix AWS authentication for Tableau on Mac](https://github.com/opendistro-for-elasticsearch/sql-odbc/pull/9) 35 | 36 | * [Mac installer fixes](https://github.com/opendistro-for-elasticsearch/sql-odbc/pull/73) 37 | 38 | 39 | * [Fix General installer components](https://github.com/opendistro-for-elasticsearch/sql-odbc/pull/69) 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /release-notes/sql-odbc.release-notes-1.8.0.0.md: -------------------------------------------------------------------------------- 1 | ## 2020-05-18, Version 1.8 2 | 3 | ### Features 4 | 5 | * Feature[#81](https://github.com/opendistro-for-elasticsearch/sql-odbc/pull/82): Add Tableau connector source files 6 | 7 | ### Documentation 8 | 9 | * [Add supported OS version in README.md](https://github.com/opendistro-for-elasticsearch/sql-odbc/pull/88) 10 | -------------------------------------------------------------------------------- /release-notes/sql-odbc.release-notes-1.9.0.0.md: -------------------------------------------------------------------------------- 1 | ## 2020-06-24, Version 1.9 2 | 3 | ### Features 4 | 5 | * Feature [#96](https:github.com/opendistro-for-elasticsearch/sql-odbc/pull/96): Updating tableau connector files 6 | * Feature [#99](https:github.com/opendistro-for-elasticsearch/sql-odbc/pull/99): Add 32bit support for driver 7 | * Feature [#101](https:github.com/opendistro-for-elasticsearch/sql-odbc/pull/101): Pagination support 8 | * Feature [#107](https:github.com/opendistro-for-elasticsearch/sql-odbc/pull/107): Add support for building with code coverage 9 | * Feature [#109](https:github.com/opendistro-for-elasticsearch/sql-odbc/pull/109): Remove support for NOW in tableau connector 10 | * Feature [#112](https:github.com/opendistro-for-elasticsearch/sql-odbc/pull/112): Updating SQLRowCount function support 11 | * Feature [#114](https:github.com/opendistro-for-elasticsearch/sql-odbc/pull/114): Remove old driver files before installing Mac driver 12 | * Feature [#119](https:github.com/opendistro-for-elasticsearch/sql-odbc/pull/119): Add CAP_SUPPRESS_GET_SERVER_TIME instead of removing support for NOW() in tableau connector 13 | * Feature [#120](https:github.com/opendistro-for-elasticsearch/sql-odbc/pull/120): Use a queue which is created with a capacity while getting result pages 14 | 15 | 16 | ### Documentation 17 | 18 | * Documentation [#93](https:github.com/opendistro-for-elasticsearch/sql-odbc/pull/93): Update build instructions 19 | * Documentation [#116](https:github.com/opendistro-for-elasticsearch/sql-odbc/pull/116): Update README 20 | 21 | ### BugFixes 22 | * BugFix [#118](https:github.com/opendistro-for-elasticsearch/sql-odbc/pull/118): Fix ODBC administrator GUI on windows 23 | -------------------------------------------------------------------------------- /run_cppcheck.bat: -------------------------------------------------------------------------------- 1 | :: 2 | :: Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | :: 4 | :: Licensed under the Apache License, Version 2.0 (the "License"). 5 | :: You may not use this file except in compliance with the License. 6 | :: A copy of the License is located at 7 | :: 8 | :: http://www.apache.org/licenses/LICENSE-2.0 9 | :: 10 | :: or in the "license" file accompanying this file. This file is distributed 11 | :: on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | :: express or implied. See the License for the specific language governing 13 | :: permissions and limitations under the License. 14 | :: 15 | 16 | :: --force: force checks all define combinations (default max is 12) 17 | :: --suppress=objectIndex: seemingly false-positive (TODO: investigate this further) 18 | :: -iaws-sdk-cpp: avoid checking AWS C++ SDK source files in our repo 19 | cppcheck.exe --force --suppress=objectIndex -iaws-sdk-cpp .\src\ 2> cppcheck-results.log -------------------------------------------------------------------------------- /run_cppcheck.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | RESULTS_FILE=cppcheck-results.log 4 | 5 | # --force: force checks all define combinations (default max is 12) 6 | # -iaws-sdk-cpp: avoid checking AWS C++ SDK source files in our repo 7 | # -UWIN32: do not check WIN32-defined codepaths; this would throw errors on Mac 8 | cppcheck --force -iaws-sdk-cpp -UWIN32 ./src 2> ${RESULTS_FILE} 9 | 10 | if [ -s ${RESULTS_FILE} ]; then 11 | echo "!! Cppcheck errors found! Check ${RESULTS_FILE} for details." 12 | exit 1 13 | else 14 | echo "No Cppcheck errors found." 15 | fi -------------------------------------------------------------------------------- /run_test_runner.bat: -------------------------------------------------------------------------------- 1 | :: 2 | :: Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | :: 4 | :: Licensed under the Apache License, Version 2.0 (the "License"). 5 | :: You may not use this file except in compliance with the License. 6 | :: A copy of the License is located at 7 | :: 8 | :: http://www.apache.org/licenses/LICENSE-2.0 9 | :: 10 | :: or in the "license" file accompanying this file. This file is distributed 11 | :: on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | :: express or implied. See the License for the specific language governing 13 | :: permissions and limitations under the License. 14 | :: 15 | 16 | set PROJECT_DIR=%CD% 17 | set TEST_RUNNER_DIR=%PROJECT_DIR%\src\TestRunner 18 | set WORKING_DIR=%PROJECT_DIR%\bin64\Release 19 | 20 | cd %WORKING_DIR% 21 | 22 | py -m pip install mako 23 | 24 | py %TEST_RUNNER_DIR%\test_runner.py -i %TEST_RUNNER_DIR%\mako_template.html -o test_output.html -e %TEST_RUNNER_DIR%\test_exclude_list.txt 25 | 26 | set ERROR_CODE=%ERRORLEVEL% 27 | 28 | cd %PROJECT_DIR% 29 | 30 | echo %ERROR_CODE% 31 | 32 | EXIT /b %ERROR_CODE% -------------------------------------------------------------------------------- /run_test_runner.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"). 7 | # You may not use this file except in compliance with the License. 8 | # A copy of the License is located at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # or in the "license" file accompanying this file. This file is distributed 13 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 14 | # express or implied. See the License for the specific language governing 15 | # permissions and limitations under the License. 16 | # 17 | 18 | 19 | PROJECT_DIR=$(pwd) 20 | TEST_RUNNER_DIR=${PROJECT_DIR}/src/TestRunner 21 | WORKING_DIR=${PROJECT_DIR}/bin64 22 | 23 | cd ${WORKING_DIR} 24 | 25 | pip3 install mako 26 | 27 | python3 ${TEST_RUNNER_DIR}/test_runner.py -i ${TEST_RUNNER_DIR}/mako_template.html -o ${PROJECT_DIR}/test_output.html -e ${TEST_RUNNER_DIR}/test_exclude_list.txt 28 | 29 | ERROR_CODE=$? 30 | 31 | cd .. 32 | 33 | exit ${ERROR_CODE} 34 | -------------------------------------------------------------------------------- /src/DSNInstaller/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | 16 | project(dsn_installer) 17 | 18 | set(SOURCE_FILES dsn_installer.cpp) 19 | 20 | add_executable(dsn_installer ${SOURCE_FILES}) 21 | 22 | target_link_libraries(dsn_installer iodbcinst) 23 | target_compile_definitions(dsn_installer PUBLIC _UNICODE UNICODE) -------------------------------------------------------------------------------- /src/IntegrationTests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | 16 | project(integration_tests) 17 | 18 | set(HELPER_ITEST "${CMAKE_CURRENT_SOURCE_DIR}/ITODBCHelper") 19 | set(CATALOG_ITEST "${CMAKE_CURRENT_SOURCE_DIR}/ITODBCCatalog") 20 | set(CONNECTION_ITEST "${CMAKE_CURRENT_SOURCE_DIR}/ITODBCConnection") 21 | set(DESCRIPTOR_ITEST "${CMAKE_CURRENT_SOURCE_DIR}/ITODBCDescriptors") 22 | set(EXECUTION_ITEST "${CMAKE_CURRENT_SOURCE_DIR}/ITODBCExecution") 23 | set(INFO_ITEST "${CMAKE_CURRENT_SOURCE_DIR}/ITODBCInfo") 24 | set(RESULTS_ITEST "${CMAKE_CURRENT_SOURCE_DIR}/ITODBCResults") 25 | set(TABLEAU_QUERIES_ITEST "${CMAKE_CURRENT_SOURCE_DIR}/ITODBCTableauQueries") 26 | set(AWS_AUTH_ITEST "${CMAKE_CURRENT_SOURCE_DIR}/ITODBCAwsAuth") 27 | set(PAGINATION_ITEST "${CMAKE_CURRENT_SOURCE_DIR}/ITODBCPagination") 28 | 29 | # Projects to build 30 | add_subdirectory(${HELPER_ITEST}) 31 | add_subdirectory(${CATALOG_ITEST}) 32 | add_subdirectory(${CONNECTION_ITEST}) 33 | add_subdirectory(${DESCRIPTOR_ITEST}) 34 | add_subdirectory(${EXECUTION_ITEST}) 35 | add_subdirectory(${INFO_ITEST}) 36 | add_subdirectory(${RESULTS_ITEST}) 37 | add_subdirectory(${TABLEAU_QUERIES_ITEST}) 38 | add_subdirectory(${AWS_AUTH_ITEST}) 39 | add_subdirectory(${PAGINATION_ITEST}) -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCAwsAuth/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | 16 | project(itodbc_aws_auth) 17 | 18 | # Source, headers, and include dirs 19 | set(SOURCE_FILES test_odbc_aws_auth.cpp) 20 | include_directories( ${UT_HELPER} 21 | ${IT_HELPER} 22 | ${ODFEODBC_SRC} 23 | ${VLD_SRC} 24 | ${AWSSDK_INCLUDE_DIR} 25 | ) 26 | 27 | # Generate executable 28 | add_executable(itodbc_aws_auth ${SOURCE_FILES}) 29 | 30 | # Library dependencies 31 | target_link_libraries(itodbc_aws_auth odfesqlodbc itodbc_helper ut_helper gtest_main aws-cpp-sdk-core) 32 | target_compile_definitions(itodbc_aws_auth PUBLIC _UNICODE UNICODE) 33 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCAwsAuth/pch.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright <2019> Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). 5 | * You may not use this file except in compliance with the License. 6 | * A copy of the License is located at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | * 15 | */ 16 | 17 | // 18 | // pch.cpp 19 | // Include the standard header and generate the precompiled header. 20 | // 21 | 22 | #include "pch.h" 23 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCAwsAuth/pch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright <2019> Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). 5 | * You may not use this file except in compliance with the License. 6 | * A copy of the License is located at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | * 15 | */ 16 | 17 | // 18 | // pch.h 19 | // Header for standard system include files. 20 | // 21 | 22 | #pragma once 23 | 24 | #include "gtest/gtest.h" 25 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCAwsAuth/test_aws_auth_dsn.reg: -------------------------------------------------------------------------------- 1 | Windows Registry Editor Version 5.00 2 | 3 | [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers] 4 | "ElasticsearchODBC"="Installed" 5 | 6 | [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ElasticsearchODBC] 7 | "Driver"="\\bin64\\Release\\odfesqlodbc.dll" 8 | "Setup"="\\bin64\\Release\\odfesqlodbc.dll" 9 | 10 | [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources] 11 | "test_aws_auth_dsn"="ElasticsearchODBC" 12 | 13 | [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\test_aws_auth_dsn] 14 | "host"="https://search-sept-cdg-david-test-domain-gouok3seqeupz64smuvfxyddui.eu-west-3.es.amazonaws.com" 15 | "auth"="AWS_SIGV4" 16 | "region"="eu-west-3" 17 | "useSSL"="0" 18 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCAwsAuth/test_odbc.ini: -------------------------------------------------------------------------------- 1 | [ODBC Data Sources] 2 | test_aws_auth_dsn = ElasticsearchODBC 3 | 4 | [test_aws_auth_dsn] 5 | host = https://search-sept-cdg-david-test-domain-gouok3seqeupz64smuvfxyddui.eu-west-3.es.amazonaws.com 6 | auth = AWS_SIGV4 7 | region = eu-west-3 8 | useSSL = 0 -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCAwsAuth/test_odbcinst.ini: -------------------------------------------------------------------------------- 1 | [ODBC Drivers] 2 | ElasticsearchODBC = Installed 3 | 4 | [ElasticsearchODBC] 5 | Driver = /lib64/libodfesqlodbc.dylib 6 | Setup = /lib64/libodfesqlodbc.dylib -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCCatalog/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | 16 | project(itodbc_catalog) 17 | 18 | # Source, headers, and include dirs 19 | set(SOURCE_FILES test_odbc_catalog.cpp) 20 | include_directories( ${UT_HELPER} 21 | ${IT_HELPER} 22 | ${ODFEODBC_SRC} 23 | ${VLD_SRC} ) 24 | 25 | # Generate executable 26 | add_executable(itodbc_catalog ${SOURCE_FILES}) 27 | 28 | # Library dependencies 29 | target_code_coverage(itodbc_catalog PUBLIC AUTO ALL) 30 | target_link_libraries(itodbc_catalog odfesqlodbc itodbc_helper ut_helper gtest_main) 31 | target_compile_definitions(itodbc_catalog PUBLIC _UNICODE UNICODE) 32 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCCatalog/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCCatalog/pch.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). 5 | * You may not use this file except in compliance with the License. 6 | * A copy of the License is located at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | // 17 | // pch.cpp 18 | // Include the standard header and generate the precompiled header. 19 | // 20 | 21 | #include "pch.h" 22 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCCatalog/pch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). 5 | * You may not use this file except in compliance with the License. 6 | * A copy of the License is located at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | // 17 | // pch.h 18 | // Header for standard system include files. 19 | // 20 | 21 | #pragma once 22 | 23 | #include "gtest/gtest.h" 24 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCConnection/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | 16 | project(itodbc_connection) 17 | 18 | # Source, headers, and include dirs 19 | set(SOURCE_FILES test_odbc_connection.cpp) 20 | include_directories( ${UT_HELPER} 21 | ${IT_HELPER} 22 | ${ODFEODBC_SRC} 23 | ${VLD_SRC} ) 24 | 25 | # Generate executable 26 | add_executable(itodbc_connection ${SOURCE_FILES}) 27 | 28 | # Library dependencies 29 | target_code_coverage(itodbc_connection PUBLIC AUTO ALL) 30 | target_link_libraries(itodbc_connection odfesqlodbc itodbc_helper ut_helper gtest_main) 31 | target_compile_definitions(itodbc_connection PUBLIC _UNICODE UNICODE) 32 | 33 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCConnection/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCConnection/pch.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). 5 | * You may not use this file except in compliance with the License. 6 | * A copy of the License is located at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | // 17 | // pch.cpp 18 | // Include the standard header and generate the precompiled header. 19 | // 20 | 21 | #include "pch.h" 22 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCConnection/pch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). 5 | * You may not use this file except in compliance with the License. 6 | * A copy of the License is located at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | // 17 | // pch.h 18 | // Header for standard system include files. 19 | // 20 | 21 | #pragma once 22 | 23 | #include "gtest/gtest.h" 24 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCConnection/test_dsn.reg: -------------------------------------------------------------------------------- 1 | Windows Registry Editor Version 5.00 2 | 3 | [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers] 4 | "ElasticsearchODBC"="Installed" 5 | 6 | [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ElasticsearchODBC] 7 | "Driver"="\\bin64\\Release\\odfesqlodbc.dll" 8 | "Setup"="\\bin64\\Release\\odfesqlodbc.dll" 9 | 10 | [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources] 11 | "test_dsn"="ElasticsearchODBC" 12 | 13 | [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\test_dsn] 14 | "host"="localhost" 15 | "port"="9200" 16 | "user"="admin" 17 | "password"="admin" 18 | "auth"="BASIC" 19 | "useSSL"="0" 20 | "responseTimeout"="10" 21 | 22 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCConnection/test_odbc.ini: -------------------------------------------------------------------------------- 1 | [ODBC Data Sources] 2 | test_dsn = ElasticsearchODBC 3 | 4 | [test_dsn] 5 | host = localhost 6 | port = 9200 7 | user = admin 8 | password = admin 9 | auth = BASIC 10 | useSSL = 0 11 | responseTimeout = 10 -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCConnection/test_odbcinst.ini: -------------------------------------------------------------------------------- 1 | [ODBC Drivers] 2 | ElasticsearchODBC = Installed 3 | 4 | [ElasticsearchODBC] 5 | Driver = /lib64/libodfesqlodbc.dylib 6 | Setup = /lib64/libodfesqlodbc.dylib -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCDescriptors/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | 16 | project(itodbc_descriptors) 17 | 18 | # Source, headers, and include dirs 19 | set(SOURCE_FILES test_odbc_descriptors.cpp) 20 | include_directories( ${UT_HELPER} 21 | ${IT_HELPER} 22 | ${ODFEODBC_SRC} 23 | ${VLD_SRC} ) 24 | 25 | # Generate executable 26 | add_executable(itodbc_descriptors ${SOURCE_FILES}) 27 | 28 | # Library dependencies 29 | target_code_coverage(itodbc_descriptors PUBLIC AUTO ALL) 30 | target_link_libraries(itodbc_descriptors odfesqlodbc itodbc_helper ut_helper gtest_main) 31 | target_compile_definitions(itodbc_descriptors PUBLIC _UNICODE UNICODE) 32 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCDescriptors/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCDescriptors/pch.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). 5 | * You may not use this file except in compliance with the License. 6 | * A copy of the License is located at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | // 17 | // pch.cpp 18 | // Include the standard header and generate the precompiled header. 19 | // 20 | 21 | #include "pch.h" 22 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCDescriptors/pch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). 5 | * You may not use this file except in compliance with the License. 6 | * A copy of the License is located at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | // 17 | // pch.h 18 | // Header for standard system include files. 19 | // 20 | 21 | #pragma once 22 | 23 | #include "gtest/gtest.h" 24 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCExecution/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | 16 | project(itodbc_execution) 17 | 18 | # Source, headers, and include dirs 19 | set(SOURCE_FILES test_odbc_execution.cpp) 20 | include_directories( ${UT_HELPER} 21 | ${IT_HELPER} 22 | ${ODFEODBC_SRC} 23 | ${VLD_SRC} ) 24 | 25 | # Generate executable 26 | add_executable(itodbc_execution ${SOURCE_FILES}) 27 | 28 | # Library dependencies 29 | target_link_libraries(itodbc_execution odfesqlodbc itodbc_helper ut_helper gtest_main) 30 | target_compile_definitions(itodbc_execution PUBLIC _UNICODE UNICODE) 31 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCExecution/pch.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). 5 | * You may not use this file except in compliance with the License. 6 | * A copy of the License is located at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | // 17 | // pch.cpp 18 | // Include the standard header and generate the precompiled header. 19 | // 20 | 21 | #include "pch.h" 22 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCExecution/pch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). 5 | * You may not use this file except in compliance with the License. 6 | * A copy of the License is located at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | // 17 | // pch.h 18 | // Header for standard system include files. 19 | // 20 | 21 | #pragma once 22 | 23 | #include "gtest/gtest.h" 24 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCHelper/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | 16 | project(itodbc_helper) 17 | 18 | # Source, headers, and include dirs 19 | set(SOURCE_FILES it_odbc_helper.cpp) 20 | set(HEADER_FILES it_odbc_helper.h) 21 | include_directories( 22 | ${UT_HELPER} 23 | ${ODFEODBC_SRC} 24 | ${VLD_SRC} 25 | ) 26 | 27 | # Generate dll (SHARED) 28 | add_library(itodbc_helper SHARED ${SOURCE_FILES} ${HEADER_FILES}) 29 | 30 | # Library dependencies 31 | target_link_libraries(itodbc_helper odfesqlodbc ut_helper gtest_main) 32 | target_compile_definitions(itodbc_helper PUBLIC _UNICODE UNICODE) -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCInfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | 16 | project(itodbc_info) 17 | 18 | # Source, headers, and include dirs 19 | set(SOURCE_FILES test_odbc_info.cpp) 20 | include_directories( ${UT_HELPER} 21 | ${IT_HELPER} 22 | ${ODFEODBC_SRC} 23 | ${VLD_SRC} ) 24 | 25 | # Generate executable 26 | add_executable(itodbc_info ${SOURCE_FILES}) 27 | 28 | # Library dependencies 29 | target_code_coverage(itodbc_info PUBLIC AUTO ALL) 30 | target_link_libraries(itodbc_info odfesqlodbc itodbc_helper ut_helper gtest_main) 31 | target_compile_definitions(itodbc_info PUBLIC _UNICODE UNICODE) 32 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCInfo/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCInfo/pch.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). 5 | * You may not use this file except in compliance with the License. 6 | * A copy of the License is located at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | // 17 | // pch.cpp 18 | // Include the standard header and generate the precompiled header. 19 | // 20 | 21 | #include "pch.h" 22 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCInfo/pch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). 5 | * You may not use this file except in compliance with the License. 6 | * A copy of the License is located at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | // 17 | // pch.h 18 | // Header for standard system include files. 19 | // 20 | 21 | #pragma once 22 | 23 | #include "gtest/gtest.h" 24 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCPagination/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | 16 | project(itodbc_pagination) 17 | 18 | # Source, headers, and include dirs 19 | set(SOURCE_FILES test_odbc_pagination.cpp) 20 | include_directories( ${UT_HELPER} 21 | ${IT_HELPER} 22 | ${ODFEODBC_SRC} 23 | ${VLD_SRC} ) 24 | 25 | # Generate executable 26 | add_executable(itodbc_pagination ${SOURCE_FILES}) 27 | 28 | # Library dependencies 29 | target_code_coverage(itodbc_pagination PUBLIC AUTO ALL) 30 | target_link_libraries(itodbc_pagination odfesqlodbc itodbc_helper ut_helper gtest_main) 31 | target_compile_definitions(itodbc_pagination PUBLIC _UNICODE UNICODE) 32 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCPagination/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCPagination/pch.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). 5 | * You may not use this file except in compliance with the License. 6 | * A copy of the License is located at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | // 17 | // pch.cpp 18 | // Include the standard header and generate the precompiled header. 19 | // 20 | 21 | #include "pch.h" 22 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCPagination/pch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). 5 | * You may not use this file except in compliance with the License. 6 | * A copy of the License is located at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | // 17 | // pch.h 18 | // Header for standard system include files. 19 | // 20 | 21 | #pragma once 22 | 23 | #include "gtest/gtest.h" 24 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCResults/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | 16 | project(itodbc_results) 17 | 18 | # Source, headers, and include dirs 19 | set(SOURCE_FILES test_odbc_results.cpp) 20 | include_directories( ${UT_HELPER} 21 | ${IT_HELPER} 22 | ${ODFEODBC_SRC} 23 | ${VLD_SRC} ) 24 | 25 | # Generate executable 26 | add_executable(itodbc_results ${SOURCE_FILES}) 27 | 28 | # Library dependencies 29 | target_code_coverage(itodbc_results PUBLIC AUTO ALL) 30 | target_link_libraries(itodbc_results odfesqlodbc itodbc_helper ut_helper gtest_main) 31 | target_compile_definitions(itodbc_results PUBLIC _UNICODE UNICODE) 32 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCResults/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCResults/pch.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). 5 | * You may not use this file except in compliance with the License. 6 | * A copy of the License is located at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | // 17 | // pch.cpp 18 | // Include the standard header and generate the precompiled header. 19 | // 20 | 21 | #include "pch.h" 22 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCResults/pch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). 5 | * You may not use this file except in compliance with the License. 6 | * A copy of the License is located at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | // 17 | // pch.h 18 | // Header for standard system include files. 19 | // 20 | 21 | #pragma once 22 | 23 | #include "gtest/gtest.h" 24 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCTableauQueries/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | 16 | project(itodbc_tableau_queries) 17 | 18 | # Source, headers, and include dirs 19 | set(SOURCE_FILES test_odbc_tableau_queries.cpp) 20 | include_directories( ${UT_HELPER} 21 | ${IT_HELPER} 22 | ${ODFEODBC_SRC} 23 | ${VLD_SRC} ) 24 | 25 | # Generate executable 26 | add_executable(itodbc_tableau_queries ${SOURCE_FILES}) 27 | 28 | # Library dependencies 29 | target_code_coverage(itodbc_tableau_queries PUBLIC AUTO ALL) 30 | target_link_libraries(itodbc_tableau_queries odfesqlodbc itodbc_helper ut_helper gtest_main) 31 | target_compile_definitions(itodbc_tableau_queries PUBLIC _UNICODE UNICODE) 32 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCTableauQueries/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCTableauQueries/pch.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). 5 | * You may not use this file except in compliance with the License. 6 | * A copy of the License is located at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | // 17 | // pch.cpp 18 | // Include the standard header and generate the precompiled header. 19 | // 20 | 21 | #include "pch.h" 22 | -------------------------------------------------------------------------------- /src/IntegrationTests/ITODBCTableauQueries/pch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). 5 | * You may not use this file except in compliance with the License. 6 | * A copy of the License is located at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | // 17 | // pch.h 18 | // Header for standard system include files. 19 | // 20 | 21 | #pragma once 22 | 23 | #include "gtest/gtest.h" 24 | -------------------------------------------------------------------------------- /src/PerformanceTests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | 16 | project(performance_tests) 17 | 18 | set(RESULTS_PTESTS "${CMAKE_CURRENT_SOURCE_DIR}/PTODBCResults") 19 | set(INFO_PTESTS "${CMAKE_CURRENT_SOURCE_DIR}/PTODBCInfo") 20 | set(EXECUTION_PTESTS "${CMAKE_CURRENT_SOURCE_DIR}/PTODBCExecution") 21 | 22 | # Projects to build 23 | add_subdirectory(${RESULTS_PTESTS}) 24 | add_subdirectory(${INFO_PTESTS}) 25 | add_subdirectory(${EXECUTION_PTESTS}) 26 | 27 | -------------------------------------------------------------------------------- /src/PerformanceTests/PTODBCExecution/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | 16 | project(performance_execution) 17 | 18 | # Source, headers, and include dirs 19 | set(SOURCE_FILES performance_odbc_execution.cpp) 20 | include_directories(${ODFEODBC_SRC}) 21 | 22 | # Generate executable 23 | add_executable(performance_execution ${SOURCE_FILES}) 24 | 25 | # Library dependencies 26 | target_link_libraries(performance_execution odfesqlodbc) 27 | target_compile_definitions(performance_execution PUBLIC _UNICODE UNICODE) 28 | -------------------------------------------------------------------------------- /src/PerformanceTests/PTODBCExecution/performance_odbc_execution.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright <2019> Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). 5 | * You may not use this file except in compliance with the License. 6 | * A copy of the License is located at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | * 15 | */ 16 | 17 | // clang-format off 18 | #include "chrono" 19 | #include 20 | #include 21 | #include 22 | #include 23 | // clang-format on 24 | #define IT_SIZEOF(x) (NULL == (x) ? 0 : (sizeof((x)) / sizeof((x)[0]))) 25 | #define ITERATION_COUNT 12 26 | std::wstring dsn_name = L"DSN=test_dsn"; 27 | const wchar_t* const query = L"SELECT * FROM kibana_sample_data_flights limit 10000"; 28 | 29 | int Setup(SQLHENV* env, SQLHDBC* conn, SQLHSTMT* hstmt) { 30 | SQLTCHAR out_conn_string[1024]; 31 | SQLSMALLINT out_conn_string_length; 32 | if (SQL_SUCCEEDED(SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, env)) 33 | && SQL_SUCCEEDED(SQLSetEnvAttr(*env, SQL_ATTR_ODBC_VERSION, (void*)SQL_OV_ODBC3, 0)) 34 | && SQL_SUCCEEDED(SQLAllocHandle(SQL_HANDLE_DBC, *env, conn)) 35 | && SQL_SUCCEEDED(SQLDriverConnect(*conn, NULL, (SQLTCHAR*)dsn_name.c_str(), SQL_NTS, 36 | out_conn_string, IT_SIZEOF(out_conn_string), 37 | &out_conn_string_length, SQL_DRIVER_COMPLETE)) 38 | && SQL_SUCCEEDED(SQLAllocHandle(SQL_HANDLE_STMT, *conn, hstmt))) { 39 | return SQL_SUCCESS; 40 | } 41 | return SQL_ERROR; 42 | } 43 | 44 | void Teardown(SQLHDBC* conn, SQLHENV* env) { 45 | SQLDisconnect(*conn); 46 | SQLFreeHandle(SQL_HANDLE_ENV, *env); 47 | } 48 | 49 | int QueryExecutionTime() { 50 | SQLRETURN ret = SQL_ERROR; 51 | try { 52 | SQLHENV env = SQL_NULL_HENV; 53 | SQLHDBC conn = SQL_NULL_HDBC; 54 | SQLHSTMT hstmt = SQL_NULL_HSTMT; 55 | if (SQL_SUCCEEDED(Setup(&env, &conn, &hstmt))) { 56 | std::cout << "Time(ms) for query execution:" << std::endl; 57 | for (int i = 0; i < ITERATION_COUNT; i++) { 58 | // Calculate time(ms) for query execution 59 | auto start = std::chrono::steady_clock::now(); 60 | ret = SQLExecDirect(hstmt, (SQLTCHAR*)query, SQL_NTS); 61 | auto end = std::chrono::steady_clock::now(); 62 | std::cout<< std::chrono::duration_cast< std::chrono::milliseconds >( 63 | end - start).count()<< std::endl; 64 | SQLCloseCursor(hstmt); 65 | } 66 | Teardown(&conn, &env); 67 | } 68 | } catch (...) { 69 | std::cout << "Exception occurred" << std::endl; 70 | } 71 | return ret; 72 | } 73 | 74 | int main() { 75 | return QueryExecutionTime(); 76 | } 77 | -------------------------------------------------------------------------------- /src/PerformanceTests/PTODBCInfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | 16 | project(performance_info) 17 | 18 | # Source, headers, and include dirs 19 | set(SOURCE_FILES performance_odbc_info.cpp) 20 | include_directories( ${UT_HELPER} 21 | ${IT_HELPER} 22 | ${ODFEODBC_SRC} 23 | ${VLD_SRC} 24 | ${RABBIT_SRC} 25 | ${RAPIDJSON_SRC}) 26 | 27 | # Generate executable 28 | add_executable(performance_info ${SOURCE_FILES}) 29 | 30 | # Library dependencies 31 | target_link_libraries(performance_info odfesqlodbc itodbc_helper ut_helper gtest_main) 32 | target_compile_definitions(performance_info PUBLIC _UNICODE UNICODE) 33 | -------------------------------------------------------------------------------- /src/PerformanceTests/PTODBCInfo/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /src/PerformanceTests/PTODBCInfo/pch.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). 5 | * You may not use this file except in compliance with the License. 6 | * A copy of the License is located at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | // 17 | // pch.cpp 18 | // Include the standard header and generate the precompiled header. 19 | // 20 | 21 | #include "pch.h" 22 | -------------------------------------------------------------------------------- /src/PerformanceTests/PTODBCInfo/pch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). 5 | * You may not use this file except in compliance with the License. 6 | * A copy of the License is located at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | // 17 | // pch.h 18 | // Header for standard system include files. 19 | // 20 | 21 | #pragma once 22 | 23 | #include "gtest/gtest.h" 24 | -------------------------------------------------------------------------------- /src/PerformanceTests/PTODBCResults/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | 16 | project(performance_results) 17 | 18 | # Source, headers, and include dirs 19 | set(SOURCE_FILES performance_odbc_results.cpp) 20 | include_directories( ${UT_HELPER} 21 | ${IT_HELPER} 22 | ${ODFEODBC_SRC} 23 | ${VLD_SRC} ) 24 | 25 | # Generate executable 26 | add_executable(performance_results ${SOURCE_FILES}) 27 | 28 | # Library dependencies 29 | target_link_libraries(performance_results odfesqlodbc itodbc_helper ut_helper gtest_main) 30 | target_compile_definitions(performance_results PUBLIC _UNICODE UNICODE) 31 | -------------------------------------------------------------------------------- /src/PerformanceTests/PTODBCResults/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /src/PerformanceTests/PTODBCResults/pch.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). 5 | * You may not use this file except in compliance with the License. 6 | * A copy of the License is located at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | // 17 | // pch.cpp 18 | // Include the standard header and generate the precompiled header. 19 | // 20 | 21 | #include "pch.h" 22 | -------------------------------------------------------------------------------- /src/PerformanceTests/PTODBCResults/pch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). 5 | * You may not use this file except in compliance with the License. 6 | * A copy of the License is located at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | // 17 | // pch.h 18 | // Header for standard system include files. 19 | // 20 | 21 | #pragma once 22 | 23 | #include "gtest/gtest.h" 24 | -------------------------------------------------------------------------------- /src/TableauConnector/odfe_sql_odbc/README.md: -------------------------------------------------------------------------------- 1 | ## odfe_sql_odbc 2 | 3 | The connector files in `odfe_sql_odbc` can be used to connect to elasticsearch server in Tableau. 4 | 5 | * These connector files remove and modify a set of unsupported functions and operations. 6 | * It includes set of capabilities to customize and tune connector behavior 7 | 8 | To use this connector with Tableau, [Package the connector](https://tableau.github.io/connector-plugin-sdk/docs/package-sign) and [Run Packaged Connector (TACO file)](https://tableau.github.io/connector-plugin-sdk/docs/run-taco) -------------------------------------------------------------------------------- /src/TableauConnector/odfe_sql_odbc/connection-dialog.tcd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/TableauConnector/odfe_sql_odbc/connectionBuilder.js: -------------------------------------------------------------------------------- 1 | (function dsbuilder(attr){ 2 | var params = {}; 3 | 4 | // Set host information in connection string 5 | params["SERVER"] = attr[connectionHelper.attributeServer]; 6 | params["PORT"] = attr[connectionHelper.attributePort]; 7 | 8 | // Set authentication values in connection string 9 | var authAttrValue = attr[connectionHelper.attributeAuthentication]; 10 | params["Auth"] = attr[connectionHelper.attributeAuthentication]; 11 | if (authAttrValue == "AWS_SIGV4"){ 12 | params["Region"] = attr[connectionHelper.attributeVendor1]; 13 | } else if (authAttrValue == "BASIC"){ 14 | params["UID"] = attr[connectionHelper.attributeUsername]; 15 | params["PWD"] = attr[connectionHelper.attributePassword]; 16 | } 17 | 18 | // Set SSL value in connection string 19 | if (attr[connectionHelper.attributeSSLMode] == "require"){ 20 | params["useSSL"] = "1"; 21 | } else { 22 | params["useSSL"] = "0"; 23 | } 24 | 25 | // Parse additional options and add in connection string 26 | var odbcConnectStringExtrasMap = {}; 27 | const attributeODBCConnectStringExtras = "vendor2"; 28 | if (attributeODBCConnectStringExtras in attr){ 29 | odbcConnectStringExtrasMap = connectionHelper.ParseODBCConnectString(attr[attributeODBCConnectStringExtras]); 30 | } 31 | for (var key in odbcConnectStringExtrasMap){ 32 | params[key] = odbcConnectStringExtrasMap[key]; 33 | } 34 | 35 | // Format the attributes as 'key=value' 36 | var formattedParams = []; 37 | formattedParams.push(connectionHelper.formatKeyValuePair(driverLocator.keywordDriver, driverLocator.locateDriver(attr))); 38 | for (var key in params){ 39 | formattedParams.push(connectionHelper.formatKeyValuePair(key, params[key])); 40 | } 41 | return formattedParams; 42 | }) 43 | -------------------------------------------------------------------------------- /src/TableauConnector/odfe_sql_odbc/connectionResolver.tdr: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |