Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AD-621] adapt SqlColAttribute #79

Merged
merged 273 commits into from
Jun 10, 2022
Merged

Conversation

alinaliBQ
Copy link
Contributor

@alinaliBQ alinaliBQ commented Jun 2, 2022

Summary

adapt the function SQLColAttribute to be ODBC 3.0 compatible.

Description

adapt the function SQLColAttribute

  • adapt isAutoIncrement, to be used in SQLColAttribute
  • adapt SQL_DESC_AUTO_UNIQUE_VALUE
  • make sure SQL_DESC_CASE_SENSITIVE is implemented correctly (currently it only handles JDBC_TYPE_VARCHAR) and check possible JDBC types returned from JDBC
  • adapt SQL_DESC_LITERAL_PREFIX and SQL_DESC_LITERAL_SUFFIX
  • adapt SQL_DESC_UNNAMED
  • fix adaptation of SQL_DESC_NUM_PREC_RADIX
  • adapt SQL_DESC_PRECISION
  • adapt SQL_DESC_SCALE
  • fix implementation of SQL_DESC_LENGTH, SQL_DESC_OCTET_LENGTH, and SQL_COLUMN_LENGTH
  • fix implementation of SQL_DESC_FIXED_PREC_SCALE

Write tests for

  • get SQL_DESC_AUTO_UNIQUE_VALUE by calling SQLColAttribute
  • get SQL_DESC_CASE_SENSITIVE by calling SQLColAttribute
  • get SQL_DESC_LITERAL_PREFIX
    • prefix: for JDBC_BINARY types (JDBC_TYPE_VARBINARY, and JDBC_TYPE_LONGVARBINARY), make sure "0x" is returned
    • "'" is supposed to be returned for JDBC *CHAR types for both prefix and suffix.
  • get SQL_DESC_LITERAL_SUFFIX by calling SQLColAttribute
  • get SQL_DESC_UNNAMED by calling SQLColAttribute
  • get SQL_DESC_PRECISION by calling SQLColAttribute
  • get SQL_DESC_SCALE by calling SQLColAttribute
  • SQL_DESC_BASE_COLUMN_NAME
  • SQL_DESC_BASE_TABLE_NAME
  • SQL_DESC_CATALOG_NAME
  • SQL_DESC_CONCISE_TYPE
  • SQL_DESC_DISPLAY_SIZE
  • SQL_DESC_FIXED_PREC_SCALE
  • SQL_DESC_LABEL
  • SQL_DESC_LENGTH
  • SQL_DESC_LITERAL_SUFFIX
  • SQL_DESC_LOCAL_TYPE_NAME
  • SQL_DESC_NAME
  • SQL_DESC_NULLABLE
  • SQL_DESC_OCTET_LENGTH
  • SQL_DESC_SCHEMA_NAME
  • SQL_DESC_SEARCHABLE
  • SQL_DESC_TABLE_NAME
  • SQL_DESC_TYPE
  • SQL_DESC_TYPE_NAME
  • SQL_DESC_UNSIGNED
  • SQL_DESC_UPDATABLE

Fields that are already (correctly) implemented before this PR:

  • SQL_DESC_BASE_COLUMN_NAME
  • SQL_DESC_BASE_TABLE_NAME
  • SQL_DESC_CATALOG_NAME
  • SQL_DESC_CONCISE_TYPE
  • SQL_DESC_DISPLAY_SIZE
  • SQL_DESC_LABEL
  • SQL_DESC_LITERAL_SUFFIX
  • SQL_DESC_LOCAL_TYPE_NAME
  • SQL_DESC_NAME
  • SQL_DESC_NULLABLE
  • SQL_DESC_SCHEMA_NAME
  • SQL_DESC_SEARCHABLE
  • SQL_DESC_TABLE_NAME
  • SQL_DESC_TYPE
  • SQL_DESC_TYPE_NAME
  • SQL_DESC_UNSIGNED
  • SQL_DESC_UPDATABLE

For SQL_DESC_SEARCHABLE, SQL_PRED_BASIC is always returned because our DocumentDB JDBC does not support the LIKE operator.
For SQL_DESC_UPDATABLE, SQL_ATTR_READWRITE_UNKNOWN is automatically returned.

Related Issue

https://bitquill.atlassian.net/browse/AD-621

Additional Reviewers

@affonsoBQ
@alexey-temnikov
@alinaliBQ
@andiem-bq
@birschick-bq
@mitchell-elholm
@RoyZhang2022

alinaliBQ and others added 30 commits January 20, 2022 09:20
…iguration_window.h

 Add small letter case to keep format consistency in dsn_configuration_window.h
fixed one typo (Create authentication settings group box)
added SSH User, SSH Host. SSH Strict Host Key Checking, and SSH Known Hosts File onto the UI. However, the code to save the written values would be done in later commits.
add draft variable definition to Enable ssh tunnel boolean value
… related files to be consistent with configuration.h"

This reverts commit 2bcd2a4.
… related files to be consistent with configuration.h""

This reverts commit 124b725.
…e in all related files to be consistent with configuration.h"""

This reverts commit aa7731a.
…umns

Make ssl and additional settings groups to be on the right side of the column on the configuration window. This is subject to change later.
I created the function
void DsnConfigurationWindow::RetrieveSshParameters(config::Configuration& cfg) const
to save SSH values.
The width value in the DsnConfigurationWindow constructor is doubled from 360 to 720 and added the margin value. The margins currently look imbalanced on the settings box, and will be fixed in later commits.
Make Ok button and Cancel buttons aligned with the right column
bugfix - allow the SSH strict host checking checkbox to be checked on and off by adding the case ChildId::SSH_STRICT_HOST_KEY_CHECKING_CHECK_BOX definition.
- added sshEnable variable definition and getter/setter for sshEnable.
- added code for parsing sshEnable in the connection string parser
start on transitioning from readPreferenceEdit to readPreference combo box
… private key file

* add SSH Enable variable in configuration.h and configuration.cpp
* add SSH checkbox in SSH group setting
* add SSH private key file edit in SSH group setting
* add SSH private key pass phrase in SSH group setting
** SSH private key passphrase label requires double the row height due to the label being long.
* make SSH setting items disabled/enabled as SSH enable checkbox is unchecked/checked
* save SSH variables to configuration when Ok button is pressed.
* add guards to read_preference.h fix
* include read_preference.h in dsn_configuration_window.cpp
* add draft code for read preference in dsn_configuration_window.cpp
RoyZhang2022 and others added 19 commits June 6, 2022 10:31
* add missing headers and fix compiling errors

* changes to solve all build failure

* fix linux build failure

* fix linux and mac build failure

* fix linux and mac build failure

* remove unneeded code

* remove unneeded functions

* add missing files

* remove unneeded code based on comments

* add missing namespace for odbc

* add _ODBC to header macro
* add function `isCharType` to replace duplicate code
* fixed typo
* added function SqlCharToString to replace duplicate code. The function converts SQLCHAR[] array to a std::string
* created function callSQLColAttribute to check the return value from the attribute field with the expected string.
* removed comment
* created function callSQLColAttribute to check the return value from the attribute field with the expected int.
* added documentation for  callSQLColAttribute functions
* fix implementation of SQL_DESC_UNNAMED
* fix implementation of SQL_COLUMN_PRECISION and SQL_COLUMN_SCALE. Added check to ensure decimalDigits is not -1.
* added unit tests:
TestGetAttributeCaseSensitive,
TestGetAttributeConciseTypeAndType,
TestGetAttributeDisplaySize,
TestGetAttributeLength,
TestGetAttributeOctetLength,
TestGetAttributeNullable,
TestGetAttributeNumPrecRadix,
TestGetAttributePrecision,
TestGetAttributeScale,
TestGetAttributeUnnamed,
TestGetAttributeUnsigned
* add test TestColAttributeDataTypesAndColumnNames
* added function connectToLocalServer to reduce the amount of duplicate code
* removed duplicate code
* removed extra line
* changed the expected value for JDBC_TYPE_DATE, JDBC_TYPE_TIME, JDBC_TYPE_TIMESTAMP
* refactored to re-use variable size_of_char
@alinaliBQ alinaliBQ merged commit 58b0799 into develop Jun 10, 2022
@alinaliBQ alinaliBQ deleted the alinaliBQ/AD-621/sql-col-attribute branch June 10, 2022 22:31
affonsov pushed a commit that referenced this pull request Nov 16, 2022
* Fix

* Added quotation mark
affonsov pushed a commit that referenced this pull request Nov 16, 2022
* Bug fix, support long type for aggregation (#522)

* Bug fix, support long type for aggregation

* change to datetime to JDBC format

* Opendistro Release 1.9.0 (#532)

* prepare odfe 1.9

* Fix all ES 7.8 compile and build errors

* Revert changes as Lombok is working now

* Update CustomExternalTestCluster.java

* Fix license headers check

* Use splitFieldsByMetadata to separate fields when calling SearchHit constructor

* More fixes for ODFE 1.9

* Remove todo statement

* Add ODFE 1.9.0 release notes

* Rename release notes to use 4 digit versions (#547)

* Revert changes ahead of develop branch in master (#551)

* Revert "Rename release notes to use 4 digit versions (#547)"

This reverts commit 33c6d3e37691e40c19d7d5892318e7ad23a82def.

* Revert "Opendistro Release 1.9.0 (#532)"

This reverts commit 254f2e0a854ba2c05aca159a9f7ff9af9867c22c.

* Revert "Bug fix, support long type for aggregation (#522)"

This reverts commit fb2ed912c8bfe50abed8fba182f2125905220cb4.

* Merge all SQL repos and adjust workflows (#549) (#554)

* merge all sql repos

* fix test and build workflows

* fix workbench and odbc path

* fix workbench and odbc path

* restructure workbench dir and fix workflows

* fix workbench workflow

* fix workbench workflow

* fix workbench workflow

* fix workbench workflow

* fix workbench workflow

* revert workbench directory structure

* fix workbench workflow

* fix workbench workflow

* fix workbench workflow

* fix workbench workflow

* update workbench workflow for release

* Delete .github/ in sql-workbench directory

* Add cypress to sql-workbench

* Sync latest ODBC commits

* Sync latest workbench commits (will add cypress in separate PR)

* Add ignored ODBC libs

* add date and time support (#560)

* add date and time support

* update doc

* update doc

* Revert "add date and time support (#560)" (#567)

This reverts commit 4b33a2ff54f288c1a2bd07911062ec5943e3fe00.

* add error details for all server communication errors (#645)

- add null check to avoid crashing if details not initialized

* Revert "add error details for all server communication errors (#645)" (#653)

This reverts commit c11125d752fdd5554608de170a3688dcd4ad544c.

* Fix download link in package description (#729)

* Change SQL plugin version from 1.11.0.1 to 1.11.0.0 (#789)

* Adding example of nested() for more complex nested queries (#799)

* Revert "Adding example of nested() for more complex nested queries (#799)" (#800)

This reverts commit aa115cc296301025189cfa6e6a76e06fa43631a2.

* Release/0.3.0 (#82)

* AT 702 Metadata Support - Implement SQLTables (#49)

Added support for SQLTables

* AT-712 MetaData Support - Implement SQLGetInfo (#50)

Add support for SQLGetInfo

* At-707 - Implement SQLColumns (#51)

* Basically works

* Refactored and add more tests

* Refactored code

* Refactored

* Refactored

* Added more test cases

* Fix macOS build errors

* Fixed macOS build

* basic structure for SQLColumns

* remove redundant variable declaration

* add integration tests for SQLColumns

* fix incomparable type in ConvertPattern

* address code review comments

Co-authored-by: Jerry Leung <[email protected]>

* AT-711 Metadata Support - Implement SQLGetTypeInfo (#52)

* Basically working

* Added integration test cases

* Adjust test cases due to necessary change for excel

* Adjust for macOS build

* Removed commented code

* Fixed build errors

* Worked around execution not concurrent problem

* Address review

* Address code review

* Update src/odfesqlodbc/es_info.cpp

Co-authored-by: Yan Wang <[email protected]>

* Address code review

* Address code review

* Fixed integration test cases

* Update src/odfesqlodbc/es_types.c

Co-authored-by: Yan Wang <[email protected]>

* Address code revie

Co-authored-by: Yan Wang <[email protected]>

* At 706 - AAD support (#53)

* get access token

* add libcurl dependency

* use http client inside aws sdk

* AAD support

* resolve base64 decoding issue

* fix format

* fix indentation

* remove demo from cmake

* revert format change

* revert format fchange

* make role arn available in AAD auth mode

* Remove password log message (#55)

* AT 749 - Improve performance of query execution (#54)

* Added QueryAsync mechanism and updated related documentation

* Manual Mac build (#58)

* make mac build manually

* add line break

* At 742 Remove integration tests from ODBC Distribution (#57)

* Removing VLD dependencies

* AT-761 - Adjust catalog test cases for testing sample timestream database (#61)

Adjust catalog test cases

* AT-761 - Added integration test cases to test Amazon Timestream sample tables (#62)

* Added integration test cases to test Amazon Timestream sample tables

* At 772 Bump SDK version to 1.8.186 (#60)

* bump aws sdk version to 1.9.19, and remove unrelated files

* change aws sdk version from 1.9.19 to 1.8.186 to resolve compiler warning

* use TS_ODBC_VERSION instead of hardcoing

* remove re-definition

* remove gibberish

* AT-705 Okta authentication support (#56)

* Okta support

* uncomment the tests

* fix build error in mac and win32

* refactor authentication

* refactor AAD and Okta authentication into their own classes

* add tests

* add connection unit tests to github actions

* remove use of SimpleAWSCredentialsProvider, just use AWSCredentials

* resolve code review comments

* make the parameter const reference for DecodeHex()

* remove constness for value returned by c_str()

* remove use of rabbit, use Aws::Utils::Json instead

* Address review comments

* remove demo files

* address code reviews

* make base64url encoding table a constant, and address nits

* make some variables static const inline

* use anonymous namespace instead of private static for some variables.

* remove duplicate var definition

* fix cppcheck warning

* AT-770 get rid of rapidjson and rabbit (#63)

* get rid of rapidjson and rabbit

* add newline at the end of file

* AT-704 Query cancel (#59)

* Query cancel

* AT-765 Refactor the connection function (#64)

* Refactored connect functions into smaller functions

* At 764 Add user agent for AWS client config (#65)

* test getting application name in mac

* get application name in windows

* add user agent in client config

* remove unused include

* add log msg

* add unit tests for GetUserAgent()

* remove unused library folder variable in cmakelist (#66)

* AT-774 throw an exception when scalar type not set or unsupported (#68)

* throw an exception when scalar type not set or unsupported

* use SC_set_error

* add statement as parameter in SendQueryGetResult

* change signature of _CC_(Metadata)_from_TSResult

* AT-769 Code to limit size of the query (#67)

* Added the size limit of queue

* AT 763 Fix Debug build to test for Windows memory leaks (#70)

* Fixed for Win 64bits debug

* Added github action for win debug

* Enable memory leak detection in Visual Studio

* AT-773/AT-775 - add comments for functions in es_parse_result.cpp (#69)

* add comments for functions in es_parse_result.cpp

* add extra line between function signatures

* Update BUILD_INSTRUCTIONS.md

* Update BUILD_INSTRUCTIONS.md

* Update BUILD_INSTRUCTIONS.md

Removed extra "and"

* AT-777 mask password (#74)

* mask password

* change Idp to IdP

* Added ODBCcli tools

* AT-818 Support Debug mode for Mac (#71)

* Added support Debug mode for macOS

* At 766 Refactor SQLPrepare to run metadata statement (#73)

* Fixed for Win 64bits debug

* Added github action for win debug

* Enable memory leak detection in Visual Studio

* remove TSResult struct and related functions

* run metadata statement in SQLPrepare

* refactor SendQueryGetResult and remove unneeded CC* functions

* avoid extra strlen calls, and add a test case for SQLPrepare->SQLExecDirect

* remove extra allocation/deallocation in API_Prepare, add test cases for SQLPrepare->SQLDescribeCol

* remove commented code, call SC_initialize_and_recycle when returning SQL_ERROR

Co-authored-by: Jerry Leung <[email protected]>

* AT-819 - Integration test result log files are truncated (#76)

* Resolve the x86 and x64 drivers and add registry for github actions

* Fixed new line problem

* Revised

* Revised

* Fixed Win32 reg

* Test

* test

* Test

* Fixed connection error log

* Refactored

* Fixed integration test cases

* Renames files to remove ts_ and es_prefixes.

* Changed ES_TYPE_CHAR to SQL_CHAR

* Changed ES_TYPE to TS_TYPE

* Renamed ES_ variables to TS_

* Removed commented code

* Changes to parse_result for refactoring sqlPrepare

* Address code review

* Removed Semaphore files since they are no longer used.

* Fixed macOS

* Update README.md

* Fix mac build (#79)

* Fix

* Added quotation mark

* Update README.md

* Update client.cpp

Since the number of columns doesn't change per row, only call SQLNumResultCols if it isn't set.

* Update CHANGELOG.md

* Update CMakeLists.txt

* Update helper.cpp

Co-authored-by: Jerry Leung <[email protected]>
Co-authored-by: Yan Wang <[email protected]>
Co-authored-by: Jerry Leung <[email protected]>

* Release/0.4.0 (#102)

* AT 702 Metadata Support - Implement SQLTables (#49)

Added support for SQLTables

* AT-712 MetaData Support - Implement SQLGetInfo (#50)

Add support for SQLGetInfo

* At-707 - Implement SQLColumns (#51)

* Basically works

* Refactored and add more tests

* Refactored code

* Refactored

* Refactored

* Added more test cases

* Fix macOS build errors

* Fixed macOS build

* basic structure for SQLColumns

* remove redundant variable declaration

* add integration tests for SQLColumns

* fix incomparable type in ConvertPattern

* address code review comments

Co-authored-by: Jerry Leung <[email protected]>

* AT-711 Metadata Support - Implement SQLGetTypeInfo (#52)

* Basically working

* Added integration test cases

* Adjust test cases due to necessary change for excel

* Adjust for macOS build

* Removed commented code

* Fixed build errors

* Worked around execution not concurrent problem

* Address review

* Address code review

* Update src/odfesqlodbc/es_info.cpp

Co-authored-by: Yan Wang <[email protected]>

* Address code review

* Address code review

* Fixed integration test cases

* Update src/odfesqlodbc/es_types.c

Co-authored-by: Yan Wang <[email protected]>

* Address code revie

Co-authored-by: Yan Wang <[email protected]>

* At 706 - AAD support (#53)

* get access token

* add libcurl dependency

* use http client inside aws sdk

* AAD support

* resolve base64 decoding issue

* fix format

* fix indentation

* remove demo from cmake

* revert format change

* revert format fchange

* make role arn available in AAD auth mode

* Remove password log message (#55)

* AT 749 - Improve performance of query execution (#54)

* Added QueryAsync mechanism and updated related documentation

* Manual Mac build (#58)

* make mac build manually

* add line break

* At 742 Remove integration tests from ODBC Distribution (#57)

* Removing VLD dependencies

* AT-761 - Adjust catalog test cases for testing sample timestream database (#61)

Adjust catalog test cases

* AT-761 - Added integration test cases to test Amazon Timestream sample tables (#62)

* Added integration test cases to test Amazon Timestream sample tables

* At 772 Bump SDK version to 1.8.186 (#60)

* bump aws sdk version to 1.9.19, and remove unrelated files

* change aws sdk version from 1.9.19 to 1.8.186 to resolve compiler warning

* use TS_ODBC_VERSION instead of hardcoing

* remove re-definition

* remove gibberish

* AT-705 Okta authentication support (#56)

* Okta support

* uncomment the tests

* fix build error in mac and win32

* refactor authentication

* refactor AAD and Okta authentication into their own classes

* add tests

* add connection unit tests to github actions

* remove use of SimpleAWSCredentialsProvider, just use AWSCredentials

* resolve code review comments

* make the parameter const reference for DecodeHex()

* remove constness for value returned by c_str()

* remove use of rabbit, use Aws::Utils::Json instead

* Address review comments

* remove demo files

* address code reviews

* make base64url encoding table a constant, and address nits

* make some variables static const inline

* use anonymous namespace instead of private static for some variables.

* remove duplicate var definition

* fix cppcheck warning

* AT-770 get rid of rapidjson and rabbit (#63)

* get rid of rapidjson and rabbit

* add newline at the end of file

* AT-704 Query cancel (#59)

* Query cancel

* AT-765 Refactor the connection function (#64)

* Refactored connect functions into smaller functions

* At 764 Add user agent for AWS client config (#65)

* test getting application name in mac

* get application name in windows

* add user agent in client config

* remove unused include

* add log msg

* add unit tests for GetUserAgent()

* remove unused library folder variable in cmakelist (#66)

* AT-774 throw an exception when scalar type not set or unsupported (#68)

* throw an exception when scalar type not set or unsupported

* use SC_set_error

* add statement as parameter in SendQueryGetResult

* change signature of _CC_(Metadata)_from_TSResult

* AT-769 Code to limit size of the query (#67)

* Added the size limit of queue

* AT 763 Fix Debug build to test for Windows memory leaks (#70)

* Fixed for Win 64bits debug

* Added github action for win debug

* Enable memory leak detection in Visual Studio

* AT-773/AT-775 - add comments for functions in es_parse_result.cpp (#69)

* add comments for functions in es_parse_result.cpp

* add extra line between function signatures

* Update BUILD_INSTRUCTIONS.md

* Update BUILD_INSTRUCTIONS.md

* Update BUILD_INSTRUCTIONS.md

Removed extra "and"

* AT-777 mask password (#74)

* mask password

* change Idp to IdP

* Added ODBCcli tools

* AT-818 Support Debug mode for Mac (#71)

* Added support Debug mode for macOS

* At 766 Refactor SQLPrepare to run metadata statement (#73)

* Fixed for Win 64bits debug

* Added github action for win debug

* Enable memory leak detection in Visual Studio

* remove TSResult struct and related functions

* run metadata statement in SQLPrepare

* refactor SendQueryGetResult and remove unneeded CC* functions

* avoid extra strlen calls, and add a test case for SQLPrepare->SQLExecDirect

* remove extra allocation/deallocation in API_Prepare, add test cases for SQLPrepare->SQLDescribeCol

* remove commented code, call SC_initialize_and_recycle when returning SQL_ERROR

Co-authored-by: Jerry Leung <[email protected]>

* AT-819 - Integration test result log files are truncated (#76)

* Resolve the x86 and x64 drivers and add registry for github actions

* Fixed new line problem

* Revised

* Revised

* Fixed Win32 reg

* Test

* test

* Test

* Fixed connection error log

* Refactored

* Fixed integration test cases

* Renames files to remove ts_ and es_prefixes.

* Changed ES_TYPE_CHAR to SQL_CHAR

* Changed ES_TYPE to TS_TYPE

* Renamed ES_ variables to TS_

* Removed commented code

* Changes to parse_result for refactoring sqlPrepare

* Address code review

* Removed Semaphore files since they are no longer used.

* Fixed macOS

* Update README.md

* Fix mac build (#79)

* Fix

* Added quotation mark

* Update README.md

* Update client.cpp

Since the number of columns doesn't change per row, only call SQLNumResultCols if it isn't set.

* Update CHANGELOG.md

* Update CMakeLists.txt

* Update helper.cpp

* Update README.md (#85)

Added information for compiling in Visual Studio.

* At 735 Improve test cases for SQLGetDescField (#83)

* revise error message

* improve tests for SQLGetDescField

* add assertion on return value for SQLGetDescField

* uncomment test cases

* add Kyle to reviewers

* revise SQLGetTypeInfo tests

* simplify type conversion test cases

* simplify result integration tests

* fix win32 build issue, remove unused tests from elasticsearch

* refactor SQLBindCol test to remove duplicate code

* adjust oridinal position for SQLColumns (#90)

* [1] Initial commit for linux support for timestream

* [1] Adding linux build workflow.

* [1] Minor updates

* [1] Fixing compielr error

* [1] Fixing pointer

* [1] Corrected last couple tests.

* [1] Adjusting string for compiler error

* [1] Fixing mac string cppcheck issue

* [1] Fixing additional plus sign

* [1] Fixing test failure

* [1] Updates from PR feedback

* [1] Small fixes for code review.

* AT 620 - Plus sign not working in connection options (#88)

* Fix connection string corrupted in Test Setup

* fix Fixture::Setup() corrupted connection string by switching std::string to std::wstring, remove percent encoding/decoding from ODBC layer, add percent encoding in AAD, use JsonValue to build Okta request body

* remove FORCE_PASSWORDE_DISPLAY so that passwords are always hidden, fix logging passwords in utf8_to_ucs2_lf

* improve github actions

* remove curly braces from log output in connection string

* add back curly braces in connection string and test in github actions

* add printf to debug

* add back removing curly in connection string

* revert change in main.yml

* use macro on esNAME type

* remove unused decoding function

* update comment

* add case insentitive substring match on key of connection string

* [1] Checking linux segfaults

* [1] Increasing output.

* [1] Adding some code for debugging

* [1] More debug info

* [1] Enabling all tests for test_odbc_results.cpp

* [1] Minor debug updates.

* [1] flist printf fix.

* [1] Checking user/secret updates

* [1] Fixing cppcheck

* [1] 32 bit enabled.

* [1] trying 32 bit hack for build.

* [1] Adjusting linux script.

* [1] Trying to fix toolchaiun for aws.

* [1] Trying to force cmake lookup

* [1] trying to remove find root

* [1] Updating target properties.

* no message

* no message

* no message

* no message

* Fix portability problems

- Fix conflict with version.h on some OSes.
- Reduce warnings about mylog.h due to ES_PRINTF_ATTRIBUTE.

* no message

* [1] Trying to force i386 toolchain

* [1] Trying to move constants

* [1] Removing printf

* [1] Checking if it is on destruction that I am segfaulting.

* [1] Adding additional define for linux

* minor release with bug fixed (#93)

* [1] Fixing warnings

* [1] Fixing test issue and warnings

* [1] Adding quote

* [1] More fixes

* [1] Testing fix for pragmas

* [1] General cleanup done across the board for tests and driver

* [1] Minor ifdef updates

* [1] fixing pragmas

* [1] Fixing build error.

* [1] More missing semicolons

* [1] Fixing more warnings

* [1] Fixing some more warnings

* [1] Fixing else

* [1] Eliminating more warnings

* [1] Adjusting pragmas

* [1] Fixing pragmas

* [`] More minor fixes

* [1] Macro fixes

* [1] Removing prafgmas that aren
t working

* Remove including qresult.h when not necessary

Don't include qresult.h in header when not needed.

* AT-800: Release row buffers as rows are consumed

* Rework SQLBindCol tests to allow fetch size

Modify the way SQLBindCol is used to properly allow binding
of multiple rows of SQL_C_CHAR data.

Fix incorrect binding of SQLLEN data that can cause a crash

Add a multirow-fetch test.

* [1] Added Linux build instructions.

* [1] Removing outdated comment.

* [1] Lowering log level to debug.

* [1] Fixing linux compiler errors.

* [1] Enabling DSN tests

* [1] Removed outdated 32-bit/64-bit bin/lib references

* [1] Adding some prints to dlg_specific.c

* [1] Minor fix for dsn.

* [1] Trying a different dsn fix.

* [1] Adding some debug printouts

* [1] Fixing build script.

* [1] Updates based on PR feedback.

* [1] DSN Debugging

* [1] ls fix.

* [1] More command fixes.

* Revert "adjust oridinal position for SQLColumns (#90)"

This reverts commit 6d3746f.

* [1] Trying etc based build.

* [1] Fixing cat print.

* Revert "adjust oridinal position for SQLColumns (#90)" (#96)

This reverts commit 6d3746f.

* [1] Minor updqtes yml to tryt to debug.

* [1] Removing mkdir

* [1] Fixing 32-bit dsn.

* [1] Fixing build script and trying to adjust misc.h

* [1] Fixed a bunch of warnings.
[2] adjusted output of installer.

* [1] Fixed a bunch more warnings and build error.

* [1] More warning fixes and also enable Werror

* [1] Removing another warning

* [1] Reverting removal and fixing warning with pragma because windows build needs it.

* [1] Fixing cppcheck error and pedantic error

* [1] more cppcheck fixes

* no message

* [1] Removing more unused functions and macros.

* [1] Removing printouts

* [1] fixing more warnings

* [1] Trying to fix warning.

* [1] Fixing linker

* [1] Trying to fix installer upload

* [1] Fixing build script

* [1] Fixing 32-bit failure and adding test for sample app
[2] Updating readme because it was kind of weird

* [1] Retrying cli build but moving so it is fail fast.

* [1] cd fix and readme updates.

* [1] Minor cli updates.

* [1] Added additional debug info

* [1] Printing errors to see if it will help debug issue with ODBCcli

* [1]\ Minor fixes

* [1] Fixing brace

* [1] More updates

* [1] Install deb so sample app can be tested.

* [1] Fixiong cppcheck

* [1] Updates to debug issue

* no message

* no message

* no message

* no message

* no message

* no message

* no message

* final test

* [1] Bug fixes.

* [1] Removing printf spam.
[2] Fixing other issues

* [1] Fixed encoding.

* [1] Fixing query

* [1] Fixing bitwise manips
[2] Removing sample app from build script because it now works properly.

* [1] Meant to remove this in the last commit..

* [1] Minor fixes for CR.

* Update CHANGELOG.md

* AT-748/803 Add more test cases (#98)

* remove some es prefixes

* remove es prefixes

* remove more es prefixes

* remove prefixes

* return false for deprecated functions

* add test cases for SQLForeignKeys, SQLPrimaryKeys

* add test cases for remaining catalog functions

* add test cases for unsupported functions

* address review comments, remove more es prefixes, rename overloading functions

* add impl and a test case for SQLTransact

* use static_cast

* add -fPIC compiler option

* Version Update

Updated version to 0.4.0 and addressed comments in CHANGELOG.md

* Release/0.4.0 (#100)

* Update CHANGELOG.md

* Version Update

Updated version to 0.4.0 and addressed comments in CHANGELOG.md

Co-authored-by: Charlene Solonynka <[email protected]>

* add one more keyword that needs to be masked (#101)

* add one more keyword that needs to be masked

* improve hide_password()

Co-authored-by: Jerry Leung <[email protected]>
Co-authored-by: Jerry Leung <[email protected]>
Co-authored-by: csolonynka <[email protected]>
Co-authored-by: Lyndon Bauto <[email protected]>
Co-authored-by: Lyndon Bauto <[email protected]>
Co-authored-by: James Duong <[email protected]>
Co-authored-by: Charlene Solonynka <[email protected]>

Co-authored-by: Peng Huo <[email protected]>
Co-authored-by: Joshua <[email protected]>
Co-authored-by: Joshua Li <[email protected]>
Co-authored-by: Jordan Wilson <[email protected]>
Co-authored-by: Chloe <[email protected]>
Co-authored-by: chloe-zh <[email protected]>
Co-authored-by: Sayali Gaikawad <[email protected]>
Co-authored-by: Francesco Capponi <[email protected]>
Co-authored-by: Chen Dai <[email protected]>
Co-authored-by: Jerry Leung <[email protected]>
Co-authored-by: csolonynka <[email protected]>
Co-authored-by: Jerry Leung <[email protected]>
Co-authored-by: Lyndon Bauto <[email protected]>
Co-authored-by: Lyndon Bauto <[email protected]>
Co-authored-by: James Duong <[email protected]>
Co-authored-by: Charlene Solonynka <[email protected]>
affonsov pushed a commit that referenced this pull request Nov 16, 2022
### Summary

<!--- General summary / title -->
adapt the function SQLColAttribute to be ODBC 3.0 compatible. 
### Description

<!--- Details of what you changed -->
adapt the function SQLColAttribute
- [x] adapt isAutoIncrement, to be used in SQLColAttribute
- [x] adapt `SQL_DESC_AUTO_UNIQUE_VALUE`
- [x] make sure `SQL_DESC_CASE_SENSITIVE` is implemented correctly (currently it only handles `JDBC_TYPE_VARCHAR`) and check possible JDBC types returned from JDBC
- [x] adapt `SQL_DESC_LITERAL_PREFIX` and `SQL_DESC_LITERAL_SUFFIX`
- [x] adapt `SQL_DESC_UNNAMED`
- [x] fix adaptation of `SQL_DESC_NUM_PREC_RADIX`
- [x] adapt `SQL_DESC_PRECISION`
- [x] adapt `SQL_DESC_SCALE`
- [x]  fix implementation of `SQL_DESC_LENGTH`, `SQL_DESC_OCTET_LENGTH`, and `SQL_COLUMN_LENGTH`
- [x] fix implementation of `SQL_DESC_FIXED_PREC_SCALE`

Write tests for
- [x] get `SQL_DESC_AUTO_UNIQUE_VALUE` by calling SQLColAttribute
- [x] get `SQL_DESC_CASE_SENSITIVE` by calling SQLColAttribute
- [x] get `SQL_DESC_LITERAL_PREFIX`
   - [x] prefix: for JDBC_BINARY types (JDBC_TYPE_VARBINARY, and JDBC_TYPE_LONGVARBINARY), make sure "0x" is returned
   - [x] "'" is supposed to be returned for JDBC *CHAR types for both prefix and suffix. 
- [x] get `SQL_DESC_LITERAL_SUFFIX` by calling SQLColAttribute
- [x] get `SQL_DESC_UNNAMED` by calling SQLColAttribute
- [x] get `SQL_DESC_PRECISION` by calling SQLColAttribute
- [x] get `SQL_DESC_SCALE` by calling SQLColAttribute
- [x] SQL_DESC_BASE_COLUMN_NAME 
- [x] SQL_DESC_BASE_TABLE_NAME 
- [x] SQL_DESC_CATALOG_NAME 
- [x] SQL_DESC_CONCISE_TYPE
- [x] SQL_DESC_DISPLAY_SIZE 
- [x] SQL_DESC_FIXED_PREC_SCALE 
- [x] SQL_DESC_LABEL 
- [x] SQL_DESC_LENGTH 
- [x] SQL_DESC_LITERAL_SUFFIX 
- [x] SQL_DESC_LOCAL_TYPE_NAME 
- [x] SQL_DESC_NAME 
- [x] SQL_DESC_NULLABLE 
- [x] SQL_DESC_OCTET_LENGTH 
- [x] SQL_DESC_SCHEMA_NAME 
- [x] SQL_DESC_SEARCHABLE 
- [x] SQL_DESC_TABLE_NAME 
- [x] SQL_DESC_TYPE 
- [x] SQL_DESC_TYPE_NAME 
- [x] SQL_DESC_UNSIGNED 
- [x] SQL_DESC_UPDATABLE 

Fields that are already (correctly) implemented before this PR:
- SQL_DESC_BASE_COLUMN_NAME 
- SQL_DESC_BASE_TABLE_NAME 
- SQL_DESC_CATALOG_NAME 
- SQL_DESC_CONCISE_TYPE
- SQL_DESC_DISPLAY_SIZE
- SQL_DESC_LABEL
- SQL_DESC_LITERAL_SUFFIX 
- SQL_DESC_LOCAL_TYPE_NAME 
- SQL_DESC_NAME 
- SQL_DESC_NULLABLE
- SQL_DESC_SCHEMA_NAME 
- SQL_DESC_SEARCHABLE 
- SQL_DESC_TABLE_NAME 
- SQL_DESC_TYPE 
- SQL_DESC_TYPE_NAME 
- SQL_DESC_UNSIGNED 
- SQL_DESC_UPDATABLE 

For SQL_DESC_SEARCHABLE, SQL_PRED_BASIC is always returned because our DocumentDB JDBC does not support the LIKE operator. 
For SQL_DESC_UPDATABLE, SQL_ATTR_READWRITE_UNKNOWN is automatically returned. 

### Related Issue

<!--- Link to issue where this is tracked -->
https://bitquill.atlassian.net/browse/AD-621

* [AD-621] add todo for adapting SQL_DESC_COUNT

* reason why a TODO (AD-760) is created: Currently our DocDB JDBC only has result sets that are forward only and does not support:
{
resultSet.last();
count = resultSet.getRow();
}
Therefore the task is more complicated than it seems and we may or may not support this feature.

* [AD-621] adapt SQL_DESC_CASE_SENSITIVE

* [AD-621] adapt SQL_DESC_LITERAL_PREFIX and SQL_DESC_LITERAL_SUFFIX

* prefix: for JDBC_BINARY types (JDBC_TYPE_VARBINARY, and JDBC_TYPE_LONGVARBINARY), "0x" is returned
* "'" is returned for JDBC *CHAR types for both prefix and suffix.

* [AD-621] adapt SQL_DESC_UNNAMED

* make value returned from SQL_DESC_UNNAMED match the [reference](https://docs.microsoft.com/en-us/sql/odbc/reference/syntax/sqlcolattribute-function?view=sql-server-ver16).
- SQL_DESC_UNNAMED is set to SQL_NAMED if there is a column name or column alias. If there is no column name or a column alias, SQL_DESC_UNNAMED is set to SQL_UNNAMED.

* [AD-621] adapt SQL_DESC_NUM_PREC_RADIX

* for all non-numeric data types, the `SQL_DESC_NUM_PREC_RADIX` field should be set to 0, not -1.
* update test for `num_prec_radix`, as it should not be null.

* [AD-621] implement getting decimal digits

* decimal digits have a different meaning from precision or scale, so it has its own variable

* [AD-621] adapt SQL_DESC_PRECISION

* and some reformatting

* [AD-621] test for SQL_DESC_CASE_SENSITIVE

* [AD-621] add test for SQL_DESC_AUTO_UNIQUE_VALUE

* [AD-621] test for SQL_DESC_LITERAL_PREFIX

* [AD-621] adapt SQL_COLUMN_SCALE

* for scale, return decimal digits for all exact numeric types

* [AD-621] add test TestColAttributeDescLiteralSuffix

* [AD-621] remove SQL_DESC_COUNT field in ColumnMeta::GetAttribute

* the SQL_DESC_COUNT  field is already handled in odbc.cpp

* [AD-621] add test TestColAttributeDescUnnamed

* [AD-621] add test TestColAttributeDescPrecision

* [AD-621] add test TestColAttributeDescScale

* add implementation for BinaryTypeDecimalDigits. All exact numeric types other than SQL_DECIMAL and SQL_NUMERIC should return 0.

* [AD-621] temporarily disable TestColAttributeDescPrecision

* [AD-621] add tests

* add tests:
- TestColAttributeDescBaseColumnName
- TestColAttributeDescBaseTableName
- TestColAttributeDescCatalogName

* [AD-621] add test TestColAttributeDescConciseType

* [AD-621] add test TestColAttributeDescCount

* [AD-621] update comment

* [AD-621] attempt to fix TestColAttributeDescBaseColumnName and TestColAttributeDescBaseTableName

* [AD-621] fix TestColAttributeDescCatalogName

* [AD-621] make value -1 by default in ColumnMeta::GetAttribute(uint16_t fieldId, SqlLen& value)

* [AD-621] fix TestColAttributeDescConciseType

* `"columnName": null` in json table does not mean that the column is of NULL type. Therefore I'm replacing the reference of fieldNull to fieldString

* [AD-621] add test TestColAttributeDescDisplaySize

* [AD-621] test TestColAttributeDescPrecision

* removed SQL_TYPE_NULL check because JDBC is not automatically recognizing fields containing null values as JDBC_TYPE_NULL
* added test for checking precision values of SQL_VARCHAR

* [AD-621] fix TestColAttributeDescDisplaySize

* correct the expected value of display size for SQL_TYPE_TIMESTAMP

* [AD-621] add test TestColAttributeDescFixedPrecScale

* only SQL_FALSE is returned for the field SQL_DESC_FIXED_PREC_SCALE for all possible columns

* [AD-621] add test TestColAttributeDescBaseLabel

* SQL_DESC_LABEL returns the same value for column name

* [AD-621] undo accidental commit merge

* [AD-621] add test TestColAttributeDescLength

* [AD-621] Refactoring comments

* removed commented out code
* added comments

* [AD-621] update TestColAttributeDescLiteralSuffix

* reason: fieldObjectId is recognized as VARCHAR type, therefore it would get the "'" literal instead. So replace fieldObjectId with fieldBoolean, which is non-char and non-binary

* [AD-621] add test TestColAttributeDescLocalTypeName

* tests local type names for:
SQL_DOUBLE, SQL_VARCHAR, SQL_BINARY, SQL_TYPE_TIMESTAMP, SQL_INTEGER
* update `req` to `req1` in `TestColAttributeDescPrecision` for a better naming convention

* [AD-621] dereference optional int for scale value

* this is an attempt to fix the TestColAttributeDescFixedPrecScale test

* [AD-621] fix implementation of SQL_DESC_LENGTH, SQL_DESC_OCTET_LENGTH, and SQL_COLUMN_LENGTH

* column length should not be the precision value and only the type_traits::BinaryTypeTransferLength function should be used for that value instead

* [AD-621] fix test TestColAttributeDescLength

* [AD-621] refactor replace `req` with `req1`

* update `req` to `req1` in tests for a better naming convention

* [AD-621] add test TestColAttributeDescName

* [AD-621] add test TestColAttributeDescNullable

* fieldObjectId should not be nullable because it contains an primary key id
* fields that are not primary keys should be nullable. This is according to settings on JDBC driver

* [AD-621] fix TestColAttributeDescLocalTypeName

* reason: binary fields would be recognized as type SQL_VARBINARY instead of SQL_BINARY.

* [AD-621] fix implementation of SQL_DESC_FIXED_PREC_SCALE

* SQL_TRUE if the column has a fixed precision and nonzero scale that are data source-specific.
* SQL_FALSE if the column does not have a fixed precision  and nonzero scale that are data source specific.
* refactor changes

* [AD-621] add test TestColAttributeDescNumPrecRadix

* tests 3 columns (field float, int, any non-numeric column), each should return 2,10, 0 for precision radix value respectively

* [AD-621] fix implementation of SQL_DESC_OCTET_LENGTH

* SQL_DESC_LENGTH is the character length of a datatype, and SQL_DESC_OCTET_LENGTH is SQL_DESC_LENGTH  in bytes. Therefore, they should have different values if the number of bytes per char is not 1.

* [AD-621] add test TestColAttributeDescOctetLength

* [AD-621] fix test TestColAttributeDescNullable

* meta_queries_test_001__id is the correct primary keys field

* [AD-621] fix test TestColAttributeDescNumPrecRadix

* added float field in test database

* [AD-621] fix implementation of SQL_DESC_SCALE

* [AD-621] fix implementation of precision value

* JDBC precision/scale value does not apply to ODBC, thus we do not retrieve the precision/scale value from JDBC.
* fixed implementation for retrieving column attribute field SQL_DESC_PRECISION.

* [AD-621] add test TestColAttributeDescSchemaName

* schema name is the database name

* [AD-621] add tests

added tests:
* TestColAttributeDescSearchable
* TestColAttributeDescTableName
* TestColAttributeDescType
* TestColAttributeDescUnsigned
* TestColAttributeDescUpdatable

* [AD-621] fix test TestColAttributeDescType

* and added todo for re-enabling the tests

* [AD-621] refactor changes

* added debug messages for InternalGetColumnAttribute

* [AD-621] add todo link to Jira ticket

* [AD-621] add file column_meta_test.cpp

* column_meta_test contains unit tests for ColumnMeta::GetAttribute

* [AD-621] add checks for GetAttribute with string value

* added BOOST checks for calling ColumnMeta::GetAttribute with all of SQL_DESC_* fields that apply
* removed unnecessary include <sql.h>

* [AD-621] add more checks for retrieving int values

* added more boost checks for unit test

* [AD-621] resolve code review comments

* add function `isCharType` to replace duplicate code
* fixed typo

* [AD-621] code refactor

* added function SqlCharToString to replace duplicate code. The function converts SQLCHAR[] array to a std::string

* [AD-621] refactor code

* created function callSQLColAttribute to check the return value from the attribute field with the expected string.
* removed comment

* [AD-621] code refactor

* created function callSQLColAttribute to check the return value from the attribute field with the expected int.
* added documentation for  callSQLColAttribute functions

* [AD-621] add more checks for TestGetAttribute

* [AD-621] add unit test TestGetAttributeLiteralPrefix

* [AD-621] add test TestGetAttributeLiteralSuffix

* [AD-621] add unit test TestGetAttributeLocalTypeName

* [AD-621] fix implementation

* fix implementation of SQL_DESC_UNNAMED
* fix implementation of SQL_COLUMN_PRECISION and SQL_COLUMN_SCALE. Added check to ensure decimalDigits is not -1.

* [AD-621] add unit tests

* added unit tests:
TestGetAttributeCaseSensitive,
TestGetAttributeConciseTypeAndType,
TestGetAttributeDisplaySize,
TestGetAttributeLength,
TestGetAttributeOctetLength,
TestGetAttributeNullable,
TestGetAttributeNumPrecRadix,
TestGetAttributePrecision,
TestGetAttributeScale,
TestGetAttributeUnnamed,
TestGetAttributeUnsigned

* [AD-621] Add test that checks multiple columns

* add test TestColAttributeDataTypesAndColumnNames

* [AD-621] code refactor

* added function connectToLocalServer to reduce the amount of duplicate code

* [AD-621] code refactor

* removed duplicate code
* removed extra line

* [AD-621] fix unit test TestGetAttributeOctetLength

* changed the expected value for JDBC_TYPE_DATE, JDBC_TYPE_TIME, JDBC_TYPE_TIMESTAMP
* refactored to re-use variable size_of_char
affonsov pushed a commit that referenced this pull request Nov 17, 2022
* Fix

* Added quotation mark
affonsov pushed a commit that referenced this pull request Nov 17, 2022
* Bug fix, support long type for aggregation (#522)

* Bug fix, support long type for aggregation

* change to datetime to JDBC format

* Opendistro Release 1.9.0 (#532)

* prepare odfe 1.9

* Fix all ES 7.8 compile and build errors

* Revert changes as Lombok is working now

* Update CustomExternalTestCluster.java

* Fix license headers check

* Use splitFieldsByMetadata to separate fields when calling SearchHit constructor

* More fixes for ODFE 1.9

* Remove todo statement

* Add ODFE 1.9.0 release notes

* Rename release notes to use 4 digit versions (#547)

* Revert changes ahead of develop branch in master (#551)

* Revert "Rename release notes to use 4 digit versions (#547)"

This reverts commit 33c6d3e37691e40c19d7d5892318e7ad23a82def.

* Revert "Opendistro Release 1.9.0 (#532)"

This reverts commit 254f2e0a854ba2c05aca159a9f7ff9af9867c22c.

* Revert "Bug fix, support long type for aggregation (#522)"

This reverts commit fb2ed912c8bfe50abed8fba182f2125905220cb4.

* Merge all SQL repos and adjust workflows (#549) (#554)

* merge all sql repos

* fix test and build workflows

* fix workbench and odbc path

* fix workbench and odbc path

* restructure workbench dir and fix workflows

* fix workbench workflow

* fix workbench workflow

* fix workbench workflow

* fix workbench workflow

* fix workbench workflow

* revert workbench directory structure

* fix workbench workflow

* fix workbench workflow

* fix workbench workflow

* fix workbench workflow

* update workbench workflow for release

* Delete .github/ in sql-workbench directory

* Add cypress to sql-workbench

* Sync latest ODBC commits

* Sync latest workbench commits (will add cypress in separate PR)

* Add ignored ODBC libs

* add date and time support (#560)

* add date and time support

* update doc

* update doc

* Revert "add date and time support (#560)" (#567)

This reverts commit 4b33a2ff54f288c1a2bd07911062ec5943e3fe00.

* add error details for all server communication errors (#645)

- add null check to avoid crashing if details not initialized

* Revert "add error details for all server communication errors (#645)" (#653)

This reverts commit c11125d752fdd5554608de170a3688dcd4ad544c.

* Fix download link in package description (#729)

* Change SQL plugin version from 1.11.0.1 to 1.11.0.0 (#789)

* Adding example of nested() for more complex nested queries (#799)

* Revert "Adding example of nested() for more complex nested queries (#799)" (#800)

This reverts commit aa115cc296301025189cfa6e6a76e06fa43631a2.

* Release/0.3.0 (#82)

* AT 702 Metadata Support - Implement SQLTables (#49)

Added support for SQLTables

* AT-712 MetaData Support - Implement SQLGetInfo (#50)

Add support for SQLGetInfo

* At-707 - Implement SQLColumns (#51)

* Basically works

* Refactored and add more tests

* Refactored code

* Refactored

* Refactored

* Added more test cases

* Fix macOS build errors

* Fixed macOS build

* basic structure for SQLColumns

* remove redundant variable declaration

* add integration tests for SQLColumns

* fix incomparable type in ConvertPattern

* address code review comments

Co-authored-by: Jerry Leung <[email protected]>

* AT-711 Metadata Support - Implement SQLGetTypeInfo (#52)

* Basically working

* Added integration test cases

* Adjust test cases due to necessary change for excel

* Adjust for macOS build

* Removed commented code

* Fixed build errors

* Worked around execution not concurrent problem

* Address review

* Address code review

* Update src/odfesqlodbc/es_info.cpp

Co-authored-by: Yan Wang <[email protected]>

* Address code review

* Address code review

* Fixed integration test cases

* Update src/odfesqlodbc/es_types.c

Co-authored-by: Yan Wang <[email protected]>

* Address code revie

Co-authored-by: Yan Wang <[email protected]>

* At 706 - AAD support (#53)

* get access token

* add libcurl dependency

* use http client inside aws sdk

* AAD support

* resolve base64 decoding issue

* fix format

* fix indentation

* remove demo from cmake

* revert format change

* revert format fchange

* make role arn available in AAD auth mode

* Remove password log message (#55)

* AT 749 - Improve performance of query execution (#54)

* Added QueryAsync mechanism and updated related documentation

* Manual Mac build (#58)

* make mac build manually

* add line break

* At 742 Remove integration tests from ODBC Distribution (#57)

* Removing VLD dependencies

* AT-761 - Adjust catalog test cases for testing sample timestream database (#61)

Adjust catalog test cases

* AT-761 - Added integration test cases to test Amazon Timestream sample tables (#62)

* Added integration test cases to test Amazon Timestream sample tables

* At 772 Bump SDK version to 1.8.186 (#60)

* bump aws sdk version to 1.9.19, and remove unrelated files

* change aws sdk version from 1.9.19 to 1.8.186 to resolve compiler warning

* use TS_ODBC_VERSION instead of hardcoing

* remove re-definition

* remove gibberish

* AT-705 Okta authentication support (#56)

* Okta support

* uncomment the tests

* fix build error in mac and win32

* refactor authentication

* refactor AAD and Okta authentication into their own classes

* add tests

* add connection unit tests to github actions

* remove use of SimpleAWSCredentialsProvider, just use AWSCredentials

* resolve code review comments

* make the parameter const reference for DecodeHex()

* remove constness for value returned by c_str()

* remove use of rabbit, use Aws::Utils::Json instead

* Address review comments

* remove demo files

* address code reviews

* make base64url encoding table a constant, and address nits

* make some variables static const inline

* use anonymous namespace instead of private static for some variables.

* remove duplicate var definition

* fix cppcheck warning

* AT-770 get rid of rapidjson and rabbit (#63)

* get rid of rapidjson and rabbit

* add newline at the end of file

* AT-704 Query cancel (#59)

* Query cancel

* AT-765 Refactor the connection function (#64)

* Refactored connect functions into smaller functions

* At 764 Add user agent for AWS client config (#65)

* test getting application name in mac

* get application name in windows

* add user agent in client config

* remove unused include

* add log msg

* add unit tests for GetUserAgent()

* remove unused library folder variable in cmakelist (#66)

* AT-774 throw an exception when scalar type not set or unsupported (#68)

* throw an exception when scalar type not set or unsupported

* use SC_set_error

* add statement as parameter in SendQueryGetResult

* change signature of _CC_(Metadata)_from_TSResult

* AT-769 Code to limit size of the query (#67)

* Added the size limit of queue

* AT 763 Fix Debug build to test for Windows memory leaks (#70)

* Fixed for Win 64bits debug

* Added github action for win debug

* Enable memory leak detection in Visual Studio

* AT-773/AT-775 - add comments for functions in es_parse_result.cpp (#69)

* add comments for functions in es_parse_result.cpp

* add extra line between function signatures

* Update BUILD_INSTRUCTIONS.md

* Update BUILD_INSTRUCTIONS.md

* Update BUILD_INSTRUCTIONS.md

Removed extra "and"

* AT-777 mask password (#74)

* mask password

* change Idp to IdP

* Added ODBCcli tools

* AT-818 Support Debug mode for Mac (#71)

* Added support Debug mode for macOS

* At 766 Refactor SQLPrepare to run metadata statement (#73)

* Fixed for Win 64bits debug

* Added github action for win debug

* Enable memory leak detection in Visual Studio

* remove TSResult struct and related functions

* run metadata statement in SQLPrepare

* refactor SendQueryGetResult and remove unneeded CC* functions

* avoid extra strlen calls, and add a test case for SQLPrepare->SQLExecDirect

* remove extra allocation/deallocation in API_Prepare, add test cases for SQLPrepare->SQLDescribeCol

* remove commented code, call SC_initialize_and_recycle when returning SQL_ERROR

Co-authored-by: Jerry Leung <[email protected]>

* AT-819 - Integration test result log files are truncated (#76)

* Resolve the x86 and x64 drivers and add registry for github actions

* Fixed new line problem

* Revised

* Revised

* Fixed Win32 reg

* Test

* test

* Test

* Fixed connection error log

* Refactored

* Fixed integration test cases

* Renames files to remove ts_ and es_prefixes.

* Changed ES_TYPE_CHAR to SQL_CHAR

* Changed ES_TYPE to TS_TYPE

* Renamed ES_ variables to TS_

* Removed commented code

* Changes to parse_result for refactoring sqlPrepare

* Address code review

* Removed Semaphore files since they are no longer used.

* Fixed macOS

* Update README.md

* Fix mac build (#79)

* Fix

* Added quotation mark

* Update README.md

* Update client.cpp

Since the number of columns doesn't change per row, only call SQLNumResultCols if it isn't set.

* Update CHANGELOG.md

* Update CMakeLists.txt

* Update helper.cpp

Co-authored-by: Jerry Leung <[email protected]>
Co-authored-by: Yan Wang <[email protected]>
Co-authored-by: Jerry Leung <[email protected]>

* Release/0.4.0 (#102)

* AT 702 Metadata Support - Implement SQLTables (#49)

Added support for SQLTables

* AT-712 MetaData Support - Implement SQLGetInfo (#50)

Add support for SQLGetInfo

* At-707 - Implement SQLColumns (#51)

* Basically works

* Refactored and add more tests

* Refactored code

* Refactored

* Refactored

* Added more test cases

* Fix macOS build errors

* Fixed macOS build

* basic structure for SQLColumns

* remove redundant variable declaration

* add integration tests for SQLColumns

* fix incomparable type in ConvertPattern

* address code review comments

Co-authored-by: Jerry Leung <[email protected]>

* AT-711 Metadata Support - Implement SQLGetTypeInfo (#52)

* Basically working

* Added integration test cases

* Adjust test cases due to necessary change for excel

* Adjust for macOS build

* Removed commented code

* Fixed build errors

* Worked around execution not concurrent problem

* Address review

* Address code review

* Update src/odfesqlodbc/es_info.cpp

Co-authored-by: Yan Wang <[email protected]>

* Address code review

* Address code review

* Fixed integration test cases

* Update src/odfesqlodbc/es_types.c

Co-authored-by: Yan Wang <[email protected]>

* Address code revie

Co-authored-by: Yan Wang <[email protected]>

* At 706 - AAD support (#53)

* get access token

* add libcurl dependency

* use http client inside aws sdk

* AAD support

* resolve base64 decoding issue

* fix format

* fix indentation

* remove demo from cmake

* revert format change

* revert format fchange

* make role arn available in AAD auth mode

* Remove password log message (#55)

* AT 749 - Improve performance of query execution (#54)

* Added QueryAsync mechanism and updated related documentation

* Manual Mac build (#58)

* make mac build manually

* add line break

* At 742 Remove integration tests from ODBC Distribution (#57)

* Removing VLD dependencies

* AT-761 - Adjust catalog test cases for testing sample timestream database (#61)

Adjust catalog test cases

* AT-761 - Added integration test cases to test Amazon Timestream sample tables (#62)

* Added integration test cases to test Amazon Timestream sample tables

* At 772 Bump SDK version to 1.8.186 (#60)

* bump aws sdk version to 1.9.19, and remove unrelated files

* change aws sdk version from 1.9.19 to 1.8.186 to resolve compiler warning

* use TS_ODBC_VERSION instead of hardcoing

* remove re-definition

* remove gibberish

* AT-705 Okta authentication support (#56)

* Okta support

* uncomment the tests

* fix build error in mac and win32

* refactor authentication

* refactor AAD and Okta authentication into their own classes

* add tests

* add connection unit tests to github actions

* remove use of SimpleAWSCredentialsProvider, just use AWSCredentials

* resolve code review comments

* make the parameter const reference for DecodeHex()

* remove constness for value returned by c_str()

* remove use of rabbit, use Aws::Utils::Json instead

* Address review comments

* remove demo files

* address code reviews

* make base64url encoding table a constant, and address nits

* make some variables static const inline

* use anonymous namespace instead of private static for some variables.

* remove duplicate var definition

* fix cppcheck warning

* AT-770 get rid of rapidjson and rabbit (#63)

* get rid of rapidjson and rabbit

* add newline at the end of file

* AT-704 Query cancel (#59)

* Query cancel

* AT-765 Refactor the connection function (#64)

* Refactored connect functions into smaller functions

* At 764 Add user agent for AWS client config (#65)

* test getting application name in mac

* get application name in windows

* add user agent in client config

* remove unused include

* add log msg

* add unit tests for GetUserAgent()

* remove unused library folder variable in cmakelist (#66)

* AT-774 throw an exception when scalar type not set or unsupported (#68)

* throw an exception when scalar type not set or unsupported

* use SC_set_error

* add statement as parameter in SendQueryGetResult

* change signature of _CC_(Metadata)_from_TSResult

* AT-769 Code to limit size of the query (#67)

* Added the size limit of queue

* AT 763 Fix Debug build to test for Windows memory leaks (#70)

* Fixed for Win 64bits debug

* Added github action for win debug

* Enable memory leak detection in Visual Studio

* AT-773/AT-775 - add comments for functions in es_parse_result.cpp (#69)

* add comments for functions in es_parse_result.cpp

* add extra line between function signatures

* Update BUILD_INSTRUCTIONS.md

* Update BUILD_INSTRUCTIONS.md

* Update BUILD_INSTRUCTIONS.md

Removed extra "and"

* AT-777 mask password (#74)

* mask password

* change Idp to IdP

* Added ODBCcli tools

* AT-818 Support Debug mode for Mac (#71)

* Added support Debug mode for macOS

* At 766 Refactor SQLPrepare to run metadata statement (#73)

* Fixed for Win 64bits debug

* Added github action for win debug

* Enable memory leak detection in Visual Studio

* remove TSResult struct and related functions

* run metadata statement in SQLPrepare

* refactor SendQueryGetResult and remove unneeded CC* functions

* avoid extra strlen calls, and add a test case for SQLPrepare->SQLExecDirect

* remove extra allocation/deallocation in API_Prepare, add test cases for SQLPrepare->SQLDescribeCol

* remove commented code, call SC_initialize_and_recycle when returning SQL_ERROR

Co-authored-by: Jerry Leung <[email protected]>

* AT-819 - Integration test result log files are truncated (#76)

* Resolve the x86 and x64 drivers and add registry for github actions

* Fixed new line problem

* Revised

* Revised

* Fixed Win32 reg

* Test

* test

* Test

* Fixed connection error log

* Refactored

* Fixed integration test cases

* Renames files to remove ts_ and es_prefixes.

* Changed ES_TYPE_CHAR to SQL_CHAR

* Changed ES_TYPE to TS_TYPE

* Renamed ES_ variables to TS_

* Removed commented code

* Changes to parse_result for refactoring sqlPrepare

* Address code review

* Removed Semaphore files since they are no longer used.

* Fixed macOS

* Update README.md

* Fix mac build (#79)

* Fix

* Added quotation mark

* Update README.md

* Update client.cpp

Since the number of columns doesn't change per row, only call SQLNumResultCols if it isn't set.

* Update CHANGELOG.md

* Update CMakeLists.txt

* Update helper.cpp

* Update README.md (#85)

Added information for compiling in Visual Studio.

* At 735 Improve test cases for SQLGetDescField (#83)

* revise error message

* improve tests for SQLGetDescField

* add assertion on return value for SQLGetDescField

* uncomment test cases

* add Kyle to reviewers

* revise SQLGetTypeInfo tests

* simplify type conversion test cases

* simplify result integration tests

* fix win32 build issue, remove unused tests from elasticsearch

* refactor SQLBindCol test to remove duplicate code

* adjust oridinal position for SQLColumns (#90)

* [1] Initial commit for linux support for timestream

* [1] Adding linux build workflow.

* [1] Minor updates

* [1] Fixing compielr error

* [1] Fixing pointer

* [1] Corrected last couple tests.

* [1] Adjusting string for compiler error

* [1] Fixing mac string cppcheck issue

* [1] Fixing additional plus sign

* [1] Fixing test failure

* [1] Updates from PR feedback

* [1] Small fixes for code review.

* AT 620 - Plus sign not working in connection options (#88)

* Fix connection string corrupted in Test Setup

* fix Fixture::Setup() corrupted connection string by switching std::string to std::wstring, remove percent encoding/decoding from ODBC layer, add percent encoding in AAD, use JsonValue to build Okta request body

* remove FORCE_PASSWORDE_DISPLAY so that passwords are always hidden, fix logging passwords in utf8_to_ucs2_lf

* improve github actions

* remove curly braces from log output in connection string

* add back curly braces in connection string and test in github actions

* add printf to debug

* add back removing curly in connection string

* revert change in main.yml

* use macro on esNAME type

* remove unused decoding function

* update comment

* add case insentitive substring match on key of connection string

* [1] Checking linux segfaults

* [1] Increasing output.

* [1] Adding some code for debugging

* [1] More debug info

* [1] Enabling all tests for test_odbc_results.cpp

* [1] Minor debug updates.

* [1] flist printf fix.

* [1] Checking user/secret updates

* [1] Fixing cppcheck

* [1] 32 bit enabled.

* [1] trying 32 bit hack for build.

* [1] Adjusting linux script.

* [1] Trying to fix toolchaiun for aws.

* [1] Trying to force cmake lookup

* [1] trying to remove find root

* [1] Updating target properties.

* no message

* no message

* no message

* no message

* Fix portability problems

- Fix conflict with version.h on some OSes.
- Reduce warnings about mylog.h due to ES_PRINTF_ATTRIBUTE.

* no message

* [1] Trying to force i386 toolchain

* [1] Trying to move constants

* [1] Removing printf

* [1] Checking if it is on destruction that I am segfaulting.

* [1] Adding additional define for linux

* minor release with bug fixed (#93)

* [1] Fixing warnings

* [1] Fixing test issue and warnings

* [1] Adding quote

* [1] More fixes

* [1] Testing fix for pragmas

* [1] General cleanup done across the board for tests and driver

* [1] Minor ifdef updates

* [1] fixing pragmas

* [1] Fixing build error.

* [1] More missing semicolons

* [1] Fixing more warnings

* [1] Fixing some more warnings

* [1] Fixing else

* [1] Eliminating more warnings

* [1] Adjusting pragmas

* [1] Fixing pragmas

* [`] More minor fixes

* [1] Macro fixes

* [1] Removing prafgmas that aren
t working

* Remove including qresult.h when not necessary

Don't include qresult.h in header when not needed.

* AT-800: Release row buffers as rows are consumed

* Rework SQLBindCol tests to allow fetch size

Modify the way SQLBindCol is used to properly allow binding
of multiple rows of SQL_C_CHAR data.

Fix incorrect binding of SQLLEN data that can cause a crash

Add a multirow-fetch test.

* [1] Added Linux build instructions.

* [1] Removing outdated comment.

* [1] Lowering log level to debug.

* [1] Fixing linux compiler errors.

* [1] Enabling DSN tests

* [1] Removed outdated 32-bit/64-bit bin/lib references

* [1] Adding some prints to dlg_specific.c

* [1] Minor fix for dsn.

* [1] Trying a different dsn fix.

* [1] Adding some debug printouts

* [1] Fixing build script.

* [1] Updates based on PR feedback.

* [1] DSN Debugging

* [1] ls fix.

* [1] More command fixes.

* Revert "adjust oridinal position for SQLColumns (#90)"

This reverts commit 08caf34.

* [1] Trying etc based build.

* [1] Fixing cat print.

* Revert "adjust oridinal position for SQLColumns (#90)" (#96)

This reverts commit 08caf34.

* [1] Minor updqtes yml to tryt to debug.

* [1] Removing mkdir

* [1] Fixing 32-bit dsn.

* [1] Fixing build script and trying to adjust misc.h

* [1] Fixed a bunch of warnings.
[2] adjusted output of installer.

* [1] Fixed a bunch more warnings and build error.

* [1] More warning fixes and also enable Werror

* [1] Removing another warning

* [1] Reverting removal and fixing warning with pragma because windows build needs it.

* [1] Fixing cppcheck error and pedantic error

* [1] more cppcheck fixes

* no message

* [1] Removing more unused functions and macros.

* [1] Removing printouts

* [1] fixing more warnings

* [1] Trying to fix warning.

* [1] Fixing linker

* [1] Trying to fix installer upload

* [1] Fixing build script

* [1] Fixing 32-bit failure and adding test for sample app
[2] Updating readme because it was kind of weird

* [1] Retrying cli build but moving so it is fail fast.

* [1] cd fix and readme updates.

* [1] Minor cli updates.

* [1] Added additional debug info

* [1] Printing errors to see if it will help debug issue with ODBCcli

* [1]\ Minor fixes

* [1] Fixing brace

* [1] More updates

* [1] Install deb so sample app can be tested.

* [1] Fixiong cppcheck

* [1] Updates to debug issue

* no message

* no message

* no message

* no message

* no message

* no message

* no message

* final test

* [1] Bug fixes.

* [1] Removing printf spam.
[2] Fixing other issues

* [1] Fixed encoding.

* [1] Fixing query

* [1] Fixing bitwise manips
[2] Removing sample app from build script because it now works properly.

* [1] Meant to remove this in the last commit..

* [1] Minor fixes for CR.

* Update CHANGELOG.md

* AT-748/803 Add more test cases (#98)

* remove some es prefixes

* remove es prefixes

* remove more es prefixes

* remove prefixes

* return false for deprecated functions

* add test cases for SQLForeignKeys, SQLPrimaryKeys

* add test cases for remaining catalog functions

* add test cases for unsupported functions

* address review comments, remove more es prefixes, rename overloading functions

* add impl and a test case for SQLTransact

* use static_cast

* add -fPIC compiler option

* Version Update

Updated version to 0.4.0 and addressed comments in CHANGELOG.md

* Release/0.4.0 (#100)

* Update CHANGELOG.md

* Version Update

Updated version to 0.4.0 and addressed comments in CHANGELOG.md

Co-authored-by: Charlene Solonynka <[email protected]>

* add one more keyword that needs to be masked (#101)

* add one more keyword that needs to be masked

* improve hide_password()

Co-authored-by: Jerry Leung <[email protected]>
Co-authored-by: Jerry Leung <[email protected]>
Co-authored-by: csolonynka <[email protected]>
Co-authored-by: Lyndon Bauto <[email protected]>
Co-authored-by: Lyndon Bauto <[email protected]>
Co-authored-by: James Duong <[email protected]>
Co-authored-by: Charlene Solonynka <[email protected]>

Co-authored-by: Peng Huo <[email protected]>
Co-authored-by: Joshua <[email protected]>
Co-authored-by: Joshua Li <[email protected]>
Co-authored-by: Jordan Wilson <[email protected]>
Co-authored-by: Chloe <[email protected]>
Co-authored-by: chloe-zh <[email protected]>
Co-authored-by: Sayali Gaikawad <[email protected]>
Co-authored-by: Francesco Capponi <[email protected]>
Co-authored-by: Chen Dai <[email protected]>
Co-authored-by: Jerry Leung <[email protected]>
Co-authored-by: csolonynka <[email protected]>
Co-authored-by: Jerry Leung <[email protected]>
Co-authored-by: Lyndon Bauto <[email protected]>
Co-authored-by: Lyndon Bauto <[email protected]>
Co-authored-by: James Duong <[email protected]>
Co-authored-by: Charlene Solonynka <[email protected]>
affonsov pushed a commit that referenced this pull request Nov 17, 2022
### Summary

<!--- General summary / title -->
adapt the function SQLColAttribute to be ODBC 3.0 compatible. 
### Description

<!--- Details of what you changed -->
adapt the function SQLColAttribute
- [x] adapt isAutoIncrement, to be used in SQLColAttribute
- [x] adapt `SQL_DESC_AUTO_UNIQUE_VALUE`
- [x] make sure `SQL_DESC_CASE_SENSITIVE` is implemented correctly (currently it only handles `JDBC_TYPE_VARCHAR`) and check possible JDBC types returned from JDBC
- [x] adapt `SQL_DESC_LITERAL_PREFIX` and `SQL_DESC_LITERAL_SUFFIX`
- [x] adapt `SQL_DESC_UNNAMED`
- [x] fix adaptation of `SQL_DESC_NUM_PREC_RADIX`
- [x] adapt `SQL_DESC_PRECISION`
- [x] adapt `SQL_DESC_SCALE`
- [x]  fix implementation of `SQL_DESC_LENGTH`, `SQL_DESC_OCTET_LENGTH`, and `SQL_COLUMN_LENGTH`
- [x] fix implementation of `SQL_DESC_FIXED_PREC_SCALE`

Write tests for
- [x] get `SQL_DESC_AUTO_UNIQUE_VALUE` by calling SQLColAttribute
- [x] get `SQL_DESC_CASE_SENSITIVE` by calling SQLColAttribute
- [x] get `SQL_DESC_LITERAL_PREFIX`
   - [x] prefix: for JDBC_BINARY types (JDBC_TYPE_VARBINARY, and JDBC_TYPE_LONGVARBINARY), make sure "0x" is returned
   - [x] "'" is supposed to be returned for JDBC *CHAR types for both prefix and suffix. 
- [x] get `SQL_DESC_LITERAL_SUFFIX` by calling SQLColAttribute
- [x] get `SQL_DESC_UNNAMED` by calling SQLColAttribute
- [x] get `SQL_DESC_PRECISION` by calling SQLColAttribute
- [x] get `SQL_DESC_SCALE` by calling SQLColAttribute
- [x] SQL_DESC_BASE_COLUMN_NAME 
- [x] SQL_DESC_BASE_TABLE_NAME 
- [x] SQL_DESC_CATALOG_NAME 
- [x] SQL_DESC_CONCISE_TYPE
- [x] SQL_DESC_DISPLAY_SIZE 
- [x] SQL_DESC_FIXED_PREC_SCALE 
- [x] SQL_DESC_LABEL 
- [x] SQL_DESC_LENGTH 
- [x] SQL_DESC_LITERAL_SUFFIX 
- [x] SQL_DESC_LOCAL_TYPE_NAME 
- [x] SQL_DESC_NAME 
- [x] SQL_DESC_NULLABLE 
- [x] SQL_DESC_OCTET_LENGTH 
- [x] SQL_DESC_SCHEMA_NAME 
- [x] SQL_DESC_SEARCHABLE 
- [x] SQL_DESC_TABLE_NAME 
- [x] SQL_DESC_TYPE 
- [x] SQL_DESC_TYPE_NAME 
- [x] SQL_DESC_UNSIGNED 
- [x] SQL_DESC_UPDATABLE 

Fields that are already (correctly) implemented before this PR:
- SQL_DESC_BASE_COLUMN_NAME 
- SQL_DESC_BASE_TABLE_NAME 
- SQL_DESC_CATALOG_NAME 
- SQL_DESC_CONCISE_TYPE
- SQL_DESC_DISPLAY_SIZE
- SQL_DESC_LABEL
- SQL_DESC_LITERAL_SUFFIX 
- SQL_DESC_LOCAL_TYPE_NAME 
- SQL_DESC_NAME 
- SQL_DESC_NULLABLE
- SQL_DESC_SCHEMA_NAME 
- SQL_DESC_SEARCHABLE 
- SQL_DESC_TABLE_NAME 
- SQL_DESC_TYPE 
- SQL_DESC_TYPE_NAME 
- SQL_DESC_UNSIGNED 
- SQL_DESC_UPDATABLE 

For SQL_DESC_SEARCHABLE, SQL_PRED_BASIC is always returned because our DocumentDB JDBC does not support the LIKE operator. 
For SQL_DESC_UPDATABLE, SQL_ATTR_READWRITE_UNKNOWN is automatically returned. 

### Related Issue

<!--- Link to issue where this is tracked -->
https://bitquill.atlassian.net/browse/AD-621

* [AD-621] add todo for adapting SQL_DESC_COUNT

* reason why a TODO (AD-760) is created: Currently our DocDB JDBC only has result sets that are forward only and does not support:
{
resultSet.last();
count = resultSet.getRow();
}
Therefore the task is more complicated than it seems and we may or may not support this feature.

* [AD-621] adapt SQL_DESC_CASE_SENSITIVE

* [AD-621] adapt SQL_DESC_LITERAL_PREFIX and SQL_DESC_LITERAL_SUFFIX

* prefix: for JDBC_BINARY types (JDBC_TYPE_VARBINARY, and JDBC_TYPE_LONGVARBINARY), "0x" is returned
* "'" is returned for JDBC *CHAR types for both prefix and suffix.

* [AD-621] adapt SQL_DESC_UNNAMED

* make value returned from SQL_DESC_UNNAMED match the [reference](https://docs.microsoft.com/en-us/sql/odbc/reference/syntax/sqlcolattribute-function?view=sql-server-ver16).
- SQL_DESC_UNNAMED is set to SQL_NAMED if there is a column name or column alias. If there is no column name or a column alias, SQL_DESC_UNNAMED is set to SQL_UNNAMED.

* [AD-621] adapt SQL_DESC_NUM_PREC_RADIX

* for all non-numeric data types, the `SQL_DESC_NUM_PREC_RADIX` field should be set to 0, not -1.
* update test for `num_prec_radix`, as it should not be null.

* [AD-621] implement getting decimal digits

* decimal digits have a different meaning from precision or scale, so it has its own variable

* [AD-621] adapt SQL_DESC_PRECISION

* and some reformatting

* [AD-621] test for SQL_DESC_CASE_SENSITIVE

* [AD-621] add test for SQL_DESC_AUTO_UNIQUE_VALUE

* [AD-621] test for SQL_DESC_LITERAL_PREFIX

* [AD-621] adapt SQL_COLUMN_SCALE

* for scale, return decimal digits for all exact numeric types

* [AD-621] add test TestColAttributeDescLiteralSuffix

* [AD-621] remove SQL_DESC_COUNT field in ColumnMeta::GetAttribute

* the SQL_DESC_COUNT  field is already handled in odbc.cpp

* [AD-621] add test TestColAttributeDescUnnamed

* [AD-621] add test TestColAttributeDescPrecision

* [AD-621] add test TestColAttributeDescScale

* add implementation for BinaryTypeDecimalDigits. All exact numeric types other than SQL_DECIMAL and SQL_NUMERIC should return 0.

* [AD-621] temporarily disable TestColAttributeDescPrecision

* [AD-621] add tests

* add tests:
- TestColAttributeDescBaseColumnName
- TestColAttributeDescBaseTableName
- TestColAttributeDescCatalogName

* [AD-621] add test TestColAttributeDescConciseType

* [AD-621] add test TestColAttributeDescCount

* [AD-621] update comment

* [AD-621] attempt to fix TestColAttributeDescBaseColumnName and TestColAttributeDescBaseTableName

* [AD-621] fix TestColAttributeDescCatalogName

* [AD-621] make value -1 by default in ColumnMeta::GetAttribute(uint16_t fieldId, SqlLen& value)

* [AD-621] fix TestColAttributeDescConciseType

* `"columnName": null` in json table does not mean that the column is of NULL type. Therefore I'm replacing the reference of fieldNull to fieldString

* [AD-621] add test TestColAttributeDescDisplaySize

* [AD-621] test TestColAttributeDescPrecision

* removed SQL_TYPE_NULL check because JDBC is not automatically recognizing fields containing null values as JDBC_TYPE_NULL
* added test for checking precision values of SQL_VARCHAR

* [AD-621] fix TestColAttributeDescDisplaySize

* correct the expected value of display size for SQL_TYPE_TIMESTAMP

* [AD-621] add test TestColAttributeDescFixedPrecScale

* only SQL_FALSE is returned for the field SQL_DESC_FIXED_PREC_SCALE for all possible columns

* [AD-621] add test TestColAttributeDescBaseLabel

* SQL_DESC_LABEL returns the same value for column name

* [AD-621] undo accidental commit merge

* [AD-621] add test TestColAttributeDescLength

* [AD-621] Refactoring comments

* removed commented out code
* added comments

* [AD-621] update TestColAttributeDescLiteralSuffix

* reason: fieldObjectId is recognized as VARCHAR type, therefore it would get the "'" literal instead. So replace fieldObjectId with fieldBoolean, which is non-char and non-binary

* [AD-621] add test TestColAttributeDescLocalTypeName

* tests local type names for:
SQL_DOUBLE, SQL_VARCHAR, SQL_BINARY, SQL_TYPE_TIMESTAMP, SQL_INTEGER
* update `req` to `req1` in `TestColAttributeDescPrecision` for a better naming convention

* [AD-621] dereference optional int for scale value

* this is an attempt to fix the TestColAttributeDescFixedPrecScale test

* [AD-621] fix implementation of SQL_DESC_LENGTH, SQL_DESC_OCTET_LENGTH, and SQL_COLUMN_LENGTH

* column length should not be the precision value and only the type_traits::BinaryTypeTransferLength function should be used for that value instead

* [AD-621] fix test TestColAttributeDescLength

* [AD-621] refactor replace `req` with `req1`

* update `req` to `req1` in tests for a better naming convention

* [AD-621] add test TestColAttributeDescName

* [AD-621] add test TestColAttributeDescNullable

* fieldObjectId should not be nullable because it contains an primary key id
* fields that are not primary keys should be nullable. This is according to settings on JDBC driver

* [AD-621] fix TestColAttributeDescLocalTypeName

* reason: binary fields would be recognized as type SQL_VARBINARY instead of SQL_BINARY.

* [AD-621] fix implementation of SQL_DESC_FIXED_PREC_SCALE

* SQL_TRUE if the column has a fixed precision and nonzero scale that are data source-specific.
* SQL_FALSE if the column does not have a fixed precision  and nonzero scale that are data source specific.
* refactor changes

* [AD-621] add test TestColAttributeDescNumPrecRadix

* tests 3 columns (field float, int, any non-numeric column), each should return 2,10, 0 for precision radix value respectively

* [AD-621] fix implementation of SQL_DESC_OCTET_LENGTH

* SQL_DESC_LENGTH is the character length of a datatype, and SQL_DESC_OCTET_LENGTH is SQL_DESC_LENGTH  in bytes. Therefore, they should have different values if the number of bytes per char is not 1.

* [AD-621] add test TestColAttributeDescOctetLength

* [AD-621] fix test TestColAttributeDescNullable

* meta_queries_test_001__id is the correct primary keys field

* [AD-621] fix test TestColAttributeDescNumPrecRadix

* added float field in test database

* [AD-621] fix implementation of SQL_DESC_SCALE

* [AD-621] fix implementation of precision value

* JDBC precision/scale value does not apply to ODBC, thus we do not retrieve the precision/scale value from JDBC.
* fixed implementation for retrieving column attribute field SQL_DESC_PRECISION.

* [AD-621] add test TestColAttributeDescSchemaName

* schema name is the database name

* [AD-621] add tests

added tests:
* TestColAttributeDescSearchable
* TestColAttributeDescTableName
* TestColAttributeDescType
* TestColAttributeDescUnsigned
* TestColAttributeDescUpdatable

* [AD-621] fix test TestColAttributeDescType

* and added todo for re-enabling the tests

* [AD-621] refactor changes

* added debug messages for InternalGetColumnAttribute

* [AD-621] add todo link to Jira ticket

* [AD-621] add file column_meta_test.cpp

* column_meta_test contains unit tests for ColumnMeta::GetAttribute

* [AD-621] add checks for GetAttribute with string value

* added BOOST checks for calling ColumnMeta::GetAttribute with all of SQL_DESC_* fields that apply
* removed unnecessary include <sql.h>

* [AD-621] add more checks for retrieving int values

* added more boost checks for unit test

* [AD-621] resolve code review comments

* add function `isCharType` to replace duplicate code
* fixed typo

* [AD-621] code refactor

* added function SqlCharToString to replace duplicate code. The function converts SQLCHAR[] array to a std::string

* [AD-621] refactor code

* created function callSQLColAttribute to check the return value from the attribute field with the expected string.
* removed comment

* [AD-621] code refactor

* created function callSQLColAttribute to check the return value from the attribute field with the expected int.
* added documentation for  callSQLColAttribute functions

* [AD-621] add more checks for TestGetAttribute

* [AD-621] add unit test TestGetAttributeLiteralPrefix

* [AD-621] add test TestGetAttributeLiteralSuffix

* [AD-621] add unit test TestGetAttributeLocalTypeName

* [AD-621] fix implementation

* fix implementation of SQL_DESC_UNNAMED
* fix implementation of SQL_COLUMN_PRECISION and SQL_COLUMN_SCALE. Added check to ensure decimalDigits is not -1.

* [AD-621] add unit tests

* added unit tests:
TestGetAttributeCaseSensitive,
TestGetAttributeConciseTypeAndType,
TestGetAttributeDisplaySize,
TestGetAttributeLength,
TestGetAttributeOctetLength,
TestGetAttributeNullable,
TestGetAttributeNumPrecRadix,
TestGetAttributePrecision,
TestGetAttributeScale,
TestGetAttributeUnnamed,
TestGetAttributeUnsigned

* [AD-621] Add test that checks multiple columns

* add test TestColAttributeDataTypesAndColumnNames

* [AD-621] code refactor

* added function connectToLocalServer to reduce the amount of duplicate code

* [AD-621] code refactor

* removed duplicate code
* removed extra line

* [AD-621] fix unit test TestGetAttributeOctetLength

* changed the expected value for JDBC_TYPE_DATE, JDBC_TYPE_TIME, JDBC_TYPE_TIMESTAMP
* refactored to re-use variable size_of_char
alexey-temnikov pushed a commit that referenced this pull request Jan 14, 2023
* Fix

* Added quotation mark
alexey-temnikov pushed a commit that referenced this pull request Jan 14, 2023
* Bug fix, support long type for aggregation (#522)

* Bug fix, support long type for aggregation

* change to datetime to JDBC format

* Opendistro Release 1.9.0 (#532)

* prepare odfe 1.9

* Fix all ES 7.8 compile and build errors

* Revert changes as Lombok is working now

* Update CustomExternalTestCluster.java

* Fix license headers check

* Use splitFieldsByMetadata to separate fields when calling SearchHit constructor

* More fixes for ODFE 1.9

* Remove todo statement

* Add ODFE 1.9.0 release notes

* Rename release notes to use 4 digit versions (#547)

* Revert changes ahead of develop branch in master (#551)

* Revert "Rename release notes to use 4 digit versions (#547)"

This reverts commit 33c6d3e37691e40c19d7d5892318e7ad23a82def.

* Revert "Opendistro Release 1.9.0 (#532)"

This reverts commit 254f2e0a854ba2c05aca159a9f7ff9af9867c22c.

* Revert "Bug fix, support long type for aggregation (#522)"

This reverts commit fb2ed912c8bfe50abed8fba182f2125905220cb4.

* Merge all SQL repos and adjust workflows (#549) (#554)

* merge all sql repos

* fix test and build workflows

* fix workbench and odbc path

* fix workbench and odbc path

* restructure workbench dir and fix workflows

* fix workbench workflow

* fix workbench workflow

* fix workbench workflow

* fix workbench workflow

* fix workbench workflow

* revert workbench directory structure

* fix workbench workflow

* fix workbench workflow

* fix workbench workflow

* fix workbench workflow

* update workbench workflow for release

* Delete .github/ in sql-workbench directory

* Add cypress to sql-workbench

* Sync latest ODBC commits

* Sync latest workbench commits (will add cypress in separate PR)

* Add ignored ODBC libs

* add date and time support (#560)

* add date and time support

* update doc

* update doc

* Revert "add date and time support (#560)" (#567)

This reverts commit 4b33a2ff54f288c1a2bd07911062ec5943e3fe00.

* add error details for all server communication errors (#645)

- add null check to avoid crashing if details not initialized

* Revert "add error details for all server communication errors (#645)" (#653)

This reverts commit c11125d752fdd5554608de170a3688dcd4ad544c.

* Fix download link in package description (#729)

* Change SQL plugin version from 1.11.0.1 to 1.11.0.0 (#789)

* Adding example of nested() for more complex nested queries (#799)

* Revert "Adding example of nested() for more complex nested queries (#799)" (#800)

This reverts commit aa115cc296301025189cfa6e6a76e06fa43631a2.

* Release/0.3.0 (#82)

* AT 702 Metadata Support - Implement SQLTables (#49)

Added support for SQLTables

* AT-712 MetaData Support - Implement SQLGetInfo (#50)

Add support for SQLGetInfo

* At-707 - Implement SQLColumns (#51)

* Basically works

* Refactored and add more tests

* Refactored code

* Refactored

* Refactored

* Added more test cases

* Fix macOS build errors

* Fixed macOS build

* basic structure for SQLColumns

* remove redundant variable declaration

* add integration tests for SQLColumns

* fix incomparable type in ConvertPattern

* address code review comments

Co-authored-by: Jerry Leung <[email protected]>

* AT-711 Metadata Support - Implement SQLGetTypeInfo (#52)

* Basically working

* Added integration test cases

* Adjust test cases due to necessary change for excel

* Adjust for macOS build

* Removed commented code

* Fixed build errors

* Worked around execution not concurrent problem

* Address review

* Address code review

* Update src/odfesqlodbc/es_info.cpp

Co-authored-by: Yan Wang <[email protected]>

* Address code review

* Address code review

* Fixed integration test cases

* Update src/odfesqlodbc/es_types.c

Co-authored-by: Yan Wang <[email protected]>

* Address code revie

Co-authored-by: Yan Wang <[email protected]>

* At 706 - AAD support (#53)

* get access token

* add libcurl dependency

* use http client inside aws sdk

* AAD support

* resolve base64 decoding issue

* fix format

* fix indentation

* remove demo from cmake

* revert format change

* revert format fchange

* make role arn available in AAD auth mode

* Remove password log message (#55)

* AT 749 - Improve performance of query execution (#54)

* Added QueryAsync mechanism and updated related documentation

* Manual Mac build (#58)

* make mac build manually

* add line break

* At 742 Remove integration tests from ODBC Distribution (#57)

* Removing VLD dependencies

* AT-761 - Adjust catalog test cases for testing sample timestream database (#61)

Adjust catalog test cases

* AT-761 - Added integration test cases to test Amazon Timestream sample tables (#62)

* Added integration test cases to test Amazon Timestream sample tables

* At 772 Bump SDK version to 1.8.186 (#60)

* bump aws sdk version to 1.9.19, and remove unrelated files

* change aws sdk version from 1.9.19 to 1.8.186 to resolve compiler warning

* use TS_ODBC_VERSION instead of hardcoing

* remove re-definition

* remove gibberish

* AT-705 Okta authentication support (#56)

* Okta support

* uncomment the tests

* fix build error in mac and win32

* refactor authentication

* refactor AAD and Okta authentication into their own classes

* add tests

* add connection unit tests to github actions

* remove use of SimpleAWSCredentialsProvider, just use AWSCredentials

* resolve code review comments

* make the parameter const reference for DecodeHex()

* remove constness for value returned by c_str()

* remove use of rabbit, use Aws::Utils::Json instead

* Address review comments

* remove demo files

* address code reviews

* make base64url encoding table a constant, and address nits

* make some variables static const inline

* use anonymous namespace instead of private static for some variables.

* remove duplicate var definition

* fix cppcheck warning

* AT-770 get rid of rapidjson and rabbit (#63)

* get rid of rapidjson and rabbit

* add newline at the end of file

* AT-704 Query cancel (#59)

* Query cancel

* AT-765 Refactor the connection function (#64)

* Refactored connect functions into smaller functions

* At 764 Add user agent for AWS client config (#65)

* test getting application name in mac

* get application name in windows

* add user agent in client config

* remove unused include

* add log msg

* add unit tests for GetUserAgent()

* remove unused library folder variable in cmakelist (#66)

* AT-774 throw an exception when scalar type not set or unsupported (#68)

* throw an exception when scalar type not set or unsupported

* use SC_set_error

* add statement as parameter in SendQueryGetResult

* change signature of _CC_(Metadata)_from_TSResult

* AT-769 Code to limit size of the query (#67)

* Added the size limit of queue

* AT 763 Fix Debug build to test for Windows memory leaks (#70)

* Fixed for Win 64bits debug

* Added github action for win debug

* Enable memory leak detection in Visual Studio

* AT-773/AT-775 - add comments for functions in es_parse_result.cpp (#69)

* add comments for functions in es_parse_result.cpp

* add extra line between function signatures

* Update BUILD_INSTRUCTIONS.md

* Update BUILD_INSTRUCTIONS.md

* Update BUILD_INSTRUCTIONS.md

Removed extra "and"

* AT-777 mask password (#74)

* mask password

* change Idp to IdP

* Added ODBCcli tools

* AT-818 Support Debug mode for Mac (#71)

* Added support Debug mode for macOS

* At 766 Refactor SQLPrepare to run metadata statement (#73)

* Fixed for Win 64bits debug

* Added github action for win debug

* Enable memory leak detection in Visual Studio

* remove TSResult struct and related functions

* run metadata statement in SQLPrepare

* refactor SendQueryGetResult and remove unneeded CC* functions

* avoid extra strlen calls, and add a test case for SQLPrepare->SQLExecDirect

* remove extra allocation/deallocation in API_Prepare, add test cases for SQLPrepare->SQLDescribeCol

* remove commented code, call SC_initialize_and_recycle when returning SQL_ERROR

Co-authored-by: Jerry Leung <[email protected]>

* AT-819 - Integration test result log files are truncated (#76)

* Resolve the x86 and x64 drivers and add registry for github actions

* Fixed new line problem

* Revised

* Revised

* Fixed Win32 reg

* Test

* test

* Test

* Fixed connection error log

* Refactored

* Fixed integration test cases

* Renames files to remove ts_ and es_prefixes.

* Changed ES_TYPE_CHAR to SQL_CHAR

* Changed ES_TYPE to TS_TYPE

* Renamed ES_ variables to TS_

* Removed commented code

* Changes to parse_result for refactoring sqlPrepare

* Address code review

* Removed Semaphore files since they are no longer used.

* Fixed macOS

* Update README.md

* Fix mac build (#79)

* Fix

* Added quotation mark

* Update README.md

* Update client.cpp

Since the number of columns doesn't change per row, only call SQLNumResultCols if it isn't set.

* Update CHANGELOG.md

* Update CMakeLists.txt

* Update helper.cpp

Co-authored-by: Jerry Leung <[email protected]>
Co-authored-by: Yan Wang <[email protected]>
Co-authored-by: Jerry Leung <[email protected]>

* Release/0.4.0 (#102)

* AT 702 Metadata Support - Implement SQLTables (#49)

Added support for SQLTables

* AT-712 MetaData Support - Implement SQLGetInfo (#50)

Add support for SQLGetInfo

* At-707 - Implement SQLColumns (#51)

* Basically works

* Refactored and add more tests

* Refactored code

* Refactored

* Refactored

* Added more test cases

* Fix macOS build errors

* Fixed macOS build

* basic structure for SQLColumns

* remove redundant variable declaration

* add integration tests for SQLColumns

* fix incomparable type in ConvertPattern

* address code review comments

Co-authored-by: Jerry Leung <[email protected]>

* AT-711 Metadata Support - Implement SQLGetTypeInfo (#52)

* Basically working

* Added integration test cases

* Adjust test cases due to necessary change for excel

* Adjust for macOS build

* Removed commented code

* Fixed build errors

* Worked around execution not concurrent problem

* Address review

* Address code review

* Update src/odfesqlodbc/es_info.cpp

Co-authored-by: Yan Wang <[email protected]>

* Address code review

* Address code review

* Fixed integration test cases

* Update src/odfesqlodbc/es_types.c

Co-authored-by: Yan Wang <[email protected]>

* Address code revie

Co-authored-by: Yan Wang <[email protected]>

* At 706 - AAD support (#53)

* get access token

* add libcurl dependency

* use http client inside aws sdk

* AAD support

* resolve base64 decoding issue

* fix format

* fix indentation

* remove demo from cmake

* revert format change

* revert format fchange

* make role arn available in AAD auth mode

* Remove password log message (#55)

* AT 749 - Improve performance of query execution (#54)

* Added QueryAsync mechanism and updated related documentation

* Manual Mac build (#58)

* make mac build manually

* add line break

* At 742 Remove integration tests from ODBC Distribution (#57)

* Removing VLD dependencies

* AT-761 - Adjust catalog test cases for testing sample timestream database (#61)

Adjust catalog test cases

* AT-761 - Added integration test cases to test Amazon Timestream sample tables (#62)

* Added integration test cases to test Amazon Timestream sample tables

* At 772 Bump SDK version to 1.8.186 (#60)

* bump aws sdk version to 1.9.19, and remove unrelated files

* change aws sdk version from 1.9.19 to 1.8.186 to resolve compiler warning

* use TS_ODBC_VERSION instead of hardcoing

* remove re-definition

* remove gibberish

* AT-705 Okta authentication support (#56)

* Okta support

* uncomment the tests

* fix build error in mac and win32

* refactor authentication

* refactor AAD and Okta authentication into their own classes

* add tests

* add connection unit tests to github actions

* remove use of SimpleAWSCredentialsProvider, just use AWSCredentials

* resolve code review comments

* make the parameter const reference for DecodeHex()

* remove constness for value returned by c_str()

* remove use of rabbit, use Aws::Utils::Json instead

* Address review comments

* remove demo files

* address code reviews

* make base64url encoding table a constant, and address nits

* make some variables static const inline

* use anonymous namespace instead of private static for some variables.

* remove duplicate var definition

* fix cppcheck warning

* AT-770 get rid of rapidjson and rabbit (#63)

* get rid of rapidjson and rabbit

* add newline at the end of file

* AT-704 Query cancel (#59)

* Query cancel

* AT-765 Refactor the connection function (#64)

* Refactored connect functions into smaller functions

* At 764 Add user agent for AWS client config (#65)

* test getting application name in mac

* get application name in windows

* add user agent in client config

* remove unused include

* add log msg

* add unit tests for GetUserAgent()

* remove unused library folder variable in cmakelist (#66)

* AT-774 throw an exception when scalar type not set or unsupported (#68)

* throw an exception when scalar type not set or unsupported

* use SC_set_error

* add statement as parameter in SendQueryGetResult

* change signature of _CC_(Metadata)_from_TSResult

* AT-769 Code to limit size of the query (#67)

* Added the size limit of queue

* AT 763 Fix Debug build to test for Windows memory leaks (#70)

* Fixed for Win 64bits debug

* Added github action for win debug

* Enable memory leak detection in Visual Studio

* AT-773/AT-775 - add comments for functions in es_parse_result.cpp (#69)

* add comments for functions in es_parse_result.cpp

* add extra line between function signatures

* Update BUILD_INSTRUCTIONS.md

* Update BUILD_INSTRUCTIONS.md

* Update BUILD_INSTRUCTIONS.md

Removed extra "and"

* AT-777 mask password (#74)

* mask password

* change Idp to IdP

* Added ODBCcli tools

* AT-818 Support Debug mode for Mac (#71)

* Added support Debug mode for macOS

* At 766 Refactor SQLPrepare to run metadata statement (#73)

* Fixed for Win 64bits debug

* Added github action for win debug

* Enable memory leak detection in Visual Studio

* remove TSResult struct and related functions

* run metadata statement in SQLPrepare

* refactor SendQueryGetResult and remove unneeded CC* functions

* avoid extra strlen calls, and add a test case for SQLPrepare->SQLExecDirect

* remove extra allocation/deallocation in API_Prepare, add test cases for SQLPrepare->SQLDescribeCol

* remove commented code, call SC_initialize_and_recycle when returning SQL_ERROR

Co-authored-by: Jerry Leung <[email protected]>

* AT-819 - Integration test result log files are truncated (#76)

* Resolve the x86 and x64 drivers and add registry for github actions

* Fixed new line problem

* Revised

* Revised

* Fixed Win32 reg

* Test

* test

* Test

* Fixed connection error log

* Refactored

* Fixed integration test cases

* Renames files to remove ts_ and es_prefixes.

* Changed ES_TYPE_CHAR to SQL_CHAR

* Changed ES_TYPE to TS_TYPE

* Renamed ES_ variables to TS_

* Removed commented code

* Changes to parse_result for refactoring sqlPrepare

* Address code review

* Removed Semaphore files since they are no longer used.

* Fixed macOS

* Update README.md

* Fix mac build (#79)

* Fix

* Added quotation mark

* Update README.md

* Update client.cpp

Since the number of columns doesn't change per row, only call SQLNumResultCols if it isn't set.

* Update CHANGELOG.md

* Update CMakeLists.txt

* Update helper.cpp

* Update README.md (#85)

Added information for compiling in Visual Studio.

* At 735 Improve test cases for SQLGetDescField (#83)

* revise error message

* improve tests for SQLGetDescField

* add assertion on return value for SQLGetDescField

* uncomment test cases

* add Kyle to reviewers

* revise SQLGetTypeInfo tests

* simplify type conversion test cases

* simplify result integration tests

* fix win32 build issue, remove unused tests from elasticsearch

* refactor SQLBindCol test to remove duplicate code

* adjust oridinal position for SQLColumns (#90)

* [1] Initial commit for linux support for timestream

* [1] Adding linux build workflow.

* [1] Minor updates

* [1] Fixing compielr error

* [1] Fixing pointer

* [1] Corrected last couple tests.

* [1] Adjusting string for compiler error

* [1] Fixing mac string cppcheck issue

* [1] Fixing additional plus sign

* [1] Fixing test failure

* [1] Updates from PR feedback

* [1] Small fixes for code review.

* AT 620 - Plus sign not working in connection options (#88)

* Fix connection string corrupted in Test Setup

* fix Fixture::Setup() corrupted connection string by switching std::string to std::wstring, remove percent encoding/decoding from ODBC layer, add percent encoding in AAD, use JsonValue to build Okta request body

* remove FORCE_PASSWORDE_DISPLAY so that passwords are always hidden, fix logging passwords in utf8_to_ucs2_lf

* improve github actions

* remove curly braces from log output in connection string

* add back curly braces in connection string and test in github actions

* add printf to debug

* add back removing curly in connection string

* revert change in main.yml

* use macro on esNAME type

* remove unused decoding function

* update comment

* add case insentitive substring match on key of connection string

* [1] Checking linux segfaults

* [1] Increasing output.

* [1] Adding some code for debugging

* [1] More debug info

* [1] Enabling all tests for test_odbc_results.cpp

* [1] Minor debug updates.

* [1] flist printf fix.

* [1] Checking user/secret updates

* [1] Fixing cppcheck

* [1] 32 bit enabled.

* [1] trying 32 bit hack for build.

* [1] Adjusting linux script.

* [1] Trying to fix toolchaiun for aws.

* [1] Trying to force cmake lookup

* [1] trying to remove find root

* [1] Updating target properties.

* no message

* no message

* no message

* no message

* Fix portability problems

- Fix conflict with version.h on some OSes.
- Reduce warnings about mylog.h due to ES_PRINTF_ATTRIBUTE.

* no message

* [1] Trying to force i386 toolchain

* [1] Trying to move constants

* [1] Removing printf

* [1] Checking if it is on destruction that I am segfaulting.

* [1] Adding additional define for linux

* minor release with bug fixed (#93)

* [1] Fixing warnings

* [1] Fixing test issue and warnings

* [1] Adding quote

* [1] More fixes

* [1] Testing fix for pragmas

* [1] General cleanup done across the board for tests and driver

* [1] Minor ifdef updates

* [1] fixing pragmas

* [1] Fixing build error.

* [1] More missing semicolons

* [1] Fixing more warnings

* [1] Fixing some more warnings

* [1] Fixing else

* [1] Eliminating more warnings

* [1] Adjusting pragmas

* [1] Fixing pragmas

* [`] More minor fixes

* [1] Macro fixes

* [1] Removing prafgmas that aren
t working

* Remove including qresult.h when not necessary

Don't include qresult.h in header when not needed.

* AT-800: Release row buffers as rows are consumed

* Rework SQLBindCol tests to allow fetch size

Modify the way SQLBindCol is used to properly allow binding
of multiple rows of SQL_C_CHAR data.

Fix incorrect binding of SQLLEN data that can cause a crash

Add a multirow-fetch test.

* [1] Added Linux build instructions.

* [1] Removing outdated comment.

* [1] Lowering log level to debug.

* [1] Fixing linux compiler errors.

* [1] Enabling DSN tests

* [1] Removed outdated 32-bit/64-bit bin/lib references

* [1] Adding some prints to dlg_specific.c

* [1] Minor fix for dsn.

* [1] Trying a different dsn fix.

* [1] Adding some debug printouts

* [1] Fixing build script.

* [1] Updates based on PR feedback.

* [1] DSN Debugging

* [1] ls fix.

* [1] More command fixes.

* Revert "adjust oridinal position for SQLColumns (#90)"

This reverts commit 8efe672.

* [1] Trying etc based build.

* [1] Fixing cat print.

* Revert "adjust oridinal position for SQLColumns (#90)" (#96)

This reverts commit 8efe672.

* [1] Minor updqtes yml to tryt to debug.

* [1] Removing mkdir

* [1] Fixing 32-bit dsn.

* [1] Fixing build script and trying to adjust misc.h

* [1] Fixed a bunch of warnings.
[2] adjusted output of installer.

* [1] Fixed a bunch more warnings and build error.

* [1] More warning fixes and also enable Werror

* [1] Removing another warning

* [1] Reverting removal and fixing warning with pragma because windows build needs it.

* [1] Fixing cppcheck error and pedantic error

* [1] more cppcheck fixes

* no message

* [1] Removing more unused functions and macros.

* [1] Removing printouts

* [1] fixing more warnings

* [1] Trying to fix warning.

* [1] Fixing linker

* [1] Trying to fix installer upload

* [1] Fixing build script

* [1] Fixing 32-bit failure and adding test for sample app
[2] Updating readme because it was kind of weird

* [1] Retrying cli build but moving so it is fail fast.

* [1] cd fix and readme updates.

* [1] Minor cli updates.

* [1] Added additional debug info

* [1] Printing errors to see if it will help debug issue with ODBCcli

* [1]\ Minor fixes

* [1] Fixing brace

* [1] More updates

* [1] Install deb so sample app can be tested.

* [1] Fixiong cppcheck

* [1] Updates to debug issue

* no message

* no message

* no message

* no message

* no message

* no message

* no message

* final test

* [1] Bug fixes.

* [1] Removing printf spam.
[2] Fixing other issues

* [1] Fixed encoding.

* [1] Fixing query

* [1] Fixing bitwise manips
[2] Removing sample app from build script because it now works properly.

* [1] Meant to remove this in the last commit..

* [1] Minor fixes for CR.

* Update CHANGELOG.md

* AT-748/803 Add more test cases (#98)

* remove some es prefixes

* remove es prefixes

* remove more es prefixes

* remove prefixes

* return false for deprecated functions

* add test cases for SQLForeignKeys, SQLPrimaryKeys

* add test cases for remaining catalog functions

* add test cases for unsupported functions

* address review comments, remove more es prefixes, rename overloading functions

* add impl and a test case for SQLTransact

* use static_cast

* add -fPIC compiler option

* Version Update

Updated version to 0.4.0 and addressed comments in CHANGELOG.md

* Release/0.4.0 (#100)

* Update CHANGELOG.md

* Version Update

Updated version to 0.4.0 and addressed comments in CHANGELOG.md

Co-authored-by: Charlene Solonynka <[email protected]>

* add one more keyword that needs to be masked (#101)

* add one more keyword that needs to be masked

* improve hide_password()

Co-authored-by: Jerry Leung <[email protected]>
Co-authored-by: Jerry Leung <[email protected]>
Co-authored-by: csolonynka <[email protected]>
Co-authored-by: Lyndon Bauto <[email protected]>
Co-authored-by: Lyndon Bauto <[email protected]>
Co-authored-by: James Duong <[email protected]>
Co-authored-by: Charlene Solonynka <[email protected]>

Co-authored-by: Peng Huo <[email protected]>
Co-authored-by: Joshua <[email protected]>
Co-authored-by: Joshua Li <[email protected]>
Co-authored-by: Jordan Wilson <[email protected]>
Co-authored-by: Chloe <[email protected]>
Co-authored-by: chloe-zh <[email protected]>
Co-authored-by: Sayali Gaikawad <[email protected]>
Co-authored-by: Francesco Capponi <[email protected]>
Co-authored-by: Chen Dai <[email protected]>
Co-authored-by: Jerry Leung <[email protected]>
Co-authored-by: csolonynka <[email protected]>
Co-authored-by: Jerry Leung <[email protected]>
Co-authored-by: Lyndon Bauto <[email protected]>
Co-authored-by: Lyndon Bauto <[email protected]>
Co-authored-by: James Duong <[email protected]>
Co-authored-by: Charlene Solonynka <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants