-
Notifications
You must be signed in to change notification settings - Fork 3
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
Enable CodeCoverage #29
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Are windows_64 and windows_64_coverage the same apart from the coverage? Is it important that we run once without and once with?
I'd like to know the answer to this also. |
The code coverage report says total lines is 0 for item ignite-odbc-tests.exe, is this expected? |
change to debug build
They should be different. Actually you guys got an issue. |
fixing action
fixing coverage job
fixing running tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code coverage page is working fine. Looks good to me!
### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3b. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a4. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b725. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609da, reversing changes made to 0aa2052. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]>
Summary Adapt Foreign Keys (i.e., the SQLForeignKeys function) Description JNI wrapper code for getImportedKeys adapt SQLForeignKeys function unit test for jni_test unit test for java_test Related Issue https://bitquill.atlassian.net/browse/AD-550 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3b. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a4. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b725. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609da, reversing changes made to 0aa2052. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit edb9459. * Revert "SQLPrimaryKey using JNI" This reverts commit ba4b68f. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3b. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a4. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b725. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609da, reversing changes made to 0aa2052. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]>
### Summary Remove unused functions in java.h/.cpp ### Description These functions in odbc JNI is not used by anyone. Remove them to avoid confusion. ### Related Issue https://bitquill.atlassian.net/browse/AD-757 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit edb94599c77b9d60d68cbad9489838742f31805c. * Revert "SQLPrimaryKey using JNI" This reverts commit ba4b68f082542878524e9100d27f31045a2d14dc. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * Fix README.md (#30) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo…
Summary Adapt Foreign Keys (i.e., the SQLForeignKeys function) Description JNI wrapper code for getImportedKeys adapt SQLForeignKeys function unit test for jni_test unit test for java_test Related Issue https://bitquill.atlassian.net/browse/AD-550 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3b. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a4. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b725. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609da, reversing changes made to 0aa2052. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit edb9459. * Revert "SQLPrimaryKey using JNI" This reverts commit ba4b68f. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) [AD-649] Add missing documentation Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ODBC driver will not run on large document tests The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3b. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a4. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b725. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609da, reversing changes made to 0aa2052. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]>
### Summary remove unneeded libraries from core/binary/common ### Description 1. Remove core, binary, common and core-test code from repository 2. Add needed header files to odbc/src/include from core/binary/common 3. Add needed cpp files to odbc/src from core/binary/common 4. Add needed functions to existing files and remove some not in use code. 5. Make sure code compile and test successfully. ### Related Issue https://bitquill.atlassian.net/browse/AD-563 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit edb94599c77b9d60d68cbad9489838742f31805c. * Revert "SQLPrimaryKey using JNI" This reverts commit ba4b68f082542878524e9100d27f31045a2d14dc. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * Fix README.md (#30) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnecti…
… to iterate past vector end (#86) ### Summary [AD-753] check JVM attach result before use it [AD-772] add bug fix to iterate past vector end ### Description #### [AD-753] check JVM attach result before use it Current JniContext::Attach() returns a pointer. The pointer is not checked before use it which is somewhat dangerous. My change add a check for the Attach() to see if there is an error to ensure the pointer is used safely. <!--- Details of what you changed --> 1. Use error code to pass error to caller and caller needs to check the error info before use the pointer. 2. Unit test could not be added as I could not inject the stub behavior to JniContext::jvm. #### [AD-772] add bug fix to iterate past vector end The error of `expression: can't increment vector iterator past end` is actually caused by Tableau setting rowArraySize to a number that is larger than the number of available rows in the database. Our ODBC driver continues to retrieve rows when SqlResult::AI_NO_DATA is returned, which usually causes the `Error: expression: can't increment vector iterator past end` error, because SqlResult::AI_NO_DATA is returned by PrimaryKeysQuery::FetchNextRow only when cursor has reached the end of the vector. ### Related Issue https://bitquill.atlassian.net/browse/AD-753 https://bitquill.atlassian.net/browse/AD-772 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit edb94599c77b9d60d68cbad9489838742f31805c. * Revert "SQLPrimaryKey using JNI" This reverts commit ba4b68f082542878524e9100d27f31045a2d14dc. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * Fix README.md (#30) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when…
### Summary Add log message to statement.cpp. ### Description rowArraySize should not hold values other than 1, therefore putting a log to indicate it better ### Related Issue https://bitquill.atlassian.net/browse/AD-801 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit edb94599c77b9d60d68cbad9489838742f31805c. * Revert "SQLPrimaryKey using JNI" This reverts commit ba4b68f082542878524e9100d27f31045a2d14dc. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * Fix README.md (#30) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * …
### Summary [AD-573] unicode port ( ODBC W API Interfaces) ### Description - [x] Add the -DUNICODE=1 definition. - [x] Convert SQLWCHAR to/from UTF-8 encoded strings internally - [x] Ensure tests use a combination of SQLWCHAR and SQLCHAR, where appropriate - [x] Add test to perform query with wide characters and return wide and non-wide results. - [x] Report `W` (wide) types for columns with JDBC_CHAR/JDBC_VARCHAR/JDBC_LONGVARCHAR. ### Related Issue https://bitquill.atlassian.net/browse/AD-573 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-550] Adapt Foreign Keys (#75) Summary Adapt Foreign Keys (i.e., the SQLForeignKeys function) Description JNI wrapper code for getImportedKeys adapt SQLForeignKeys function unit test for jni_test unit test for java_test Related Issue https://bitquill.atlassian.net/browse/AD-550 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit edb94599c77b9d60d68cbad9489838742f31805c. * Revert "SQLPrimaryKey using JNI" This reverts commit ba4b68f082542878524e9100d27f31045a2d14dc. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActi…
* [AD-573] unicode port ( ODBC W API Interfaces) - [x] Add the -DUNICODE=1 definition. - [x] Convert SQLWCHAR to/from UTF-8 encoded strings internally - [x] Ensure tests use a combination of SQLWCHAR and SQLCHAR, where appropriate - [x] Add test to perform query with wide characters and return wide and non-wide results. - [x] Report `W` (wide) types for columns with JDBC_CHAR/JDBC_VARCHAR/JDBC_LONGVARCHAR. https://bitquill.atlassian.net/browse/AD-573 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit edb94599c77b9d60d68cbad9489838742f31805c. * Revert "SQLPrimaryKey using JNI" This reverts commit ba4b68f082542878524e9100d27f31045a2d14dc. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * Fix README.md (#30) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionI…
* [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit edb94599c77b9d60d68cbad9489838742f31805c. * Revert "SQLPrimaryKey using JNI" This reverts commit ba4b68f082542878524e9100d27f31045a2d14dc. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * Fix README.md (#30) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetS…
* Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-550] Adapt Foreign Keys (#75) Summary Adapt Foreign Keys (i.e., the SQLForeignKeys function) Description JNI wrapper code for getImportedKeys adapt SQLForeignKeys function unit test for jni_test unit test for java_test Related Issue https://bitquill.atlassian.net/browse/AD-550 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit edb94599c77b9d60d68cbad9489838742f31805c. * Revert "SQLPrimaryKey using JNI" This reverts commit ba4b68f082542878524e9100d27f31045a2d14dc. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseS…
* [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit edb94599c77b9d60d68cbad9489838742f31805c. * Revert "SQLPrimaryKey using JNI" This reverts commit ba4b68f082542878524e9100d27f31045a2d14dc. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * Fix README.md (#30) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGe…
* Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-550] Adapt Foreign Keys (#75) Summary Adapt Foreign Keys (i.e., the SQLForeignKeys function) Description JNI wrapper code for getImportedKeys adapt SQLForeignKeys function unit test for jni_test unit test for java_test Related Issue https://bitquill.atlassian.net/browse/AD-550 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit edb94599c77b9d60d68cbad9489838742f31805c. * Revert "SQLPrimaryKey using JNI" This reverts commit ba4b68f082542878524e9100d27f31045a2d14dc. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDataba…
* [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit edb94599c77b9d60d68cbad9489838742f31805c. * Revert "SQLPrimaryKey using JNI" This reverts commit ba4b68f082542878524e9100d27f31045a2d14dc. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * Fix README.md (#30) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadata…
* Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-550] Adapt Foreign Keys (#75) Summary Adapt Foreign Keys (i.e., the SQLForeignKeys function) Description JNI wrapper code for getImportedKeys adapt SQLForeignKeys function unit test for jni_test unit test for java_test Related Issue https://bitquill.atlassian.net/browse/AD-550 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit edb94599c77b9d60d68cbad9489838742f31805c. * Revert "SQLPrimaryKey using JNI" This reverts commit ba4b68f082542878524e9100d27f31045a2d14dc. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDo…
…QLWCHAR (#48) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-550] Adapt Foreign Keys (#75) Summary Adapt Foreign Keys (i.e., the SQLForeignKeys function) Description JNI wrapper code for getImportedKeys adapt SQLForeignKeys function unit test for jni_test unit test for java_test Related Issue https://bitquill.atlassian.net/browse/AD-550 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit edb94599c77b9d60d68cbad9489838742f31805c. * Revert "SQLPrimaryKey using JNI" This reverts commit ba4b68f082542878524e9100d27f31045a2d14dc. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test functi…
* [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit edb94599c77b9d60d68cbad9489838742f31805c. * Revert "SQLPrimaryKey using JNI" This reverts commit ba4b68f082542878524e9100d27f31045a2d14dc. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * Fix README.md (#30) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty…
* [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit edb94599c77b9d60d68cbad9489838742f31805c. * Revert "SQLPrimaryKey using JNI" This reverts commit ba4b68f082542878524e9100d27f31045a2d14dc. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * Fix README.md (#30) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit f311e3bc7df1fd66d7be66c8e60170a41d078c18. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit 2bcd2a492bd69fbde5de986a03c5a407a729ba47. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 124b7256d8f96fb31363aa2efb0423b115b11b0a. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit aa7731a67f123c8942b89cba8334efe15776f6c8. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit cbaeedd0cde8b82bc29134efcad28dba943751c2. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 8d609dac52d3e3fc0442f2e8ec8526ec3eb2d6ab, reversing changes made to 0aa20527606ccc11a7a99d6bd6f8d249fa8d1f61. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit df0cad5490612c695ca28cc8ee44c73dbb1b68bd. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetada…
* enabling publishing code coverage results
Summary Adapt Foreign Keys (i.e., the SQLForeignKeys function) Description JNI wrapper code for getImportedKeys adapt SQLForeignKeys function unit test for jni_test unit test for java_test Related Issue https://bitquill.atlassian.net/browse/AD-550 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 8a04166b05161326e68c30d98ca17cdbec0df1dc. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit f89a7e9516c20924fbc6c3e6d3763f26309c5723. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 05eae8ade2c68607bd8a16bee8f60b5681ad74c6. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 301e04524c1bfcc89db76476171714c69ca1f582. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit 74dd190fac5ef642d0d83015766fe33dfefb3489. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 696db387de8f509d846ad6351d5cdfcc9937a514, reversing changes made to 8d81a183bea353fef47a62e542bf3fd6f53c13ab. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 788cad79f72a7f99ff66c5032bb1532eb71b0da5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit c75194688a0969edae20f59cbe6c55cf5eb4a4da. * Revert "SQLPrimaryKey using JNI" This reverts commit 02380e9e434a55a9b034da138f7d0d32d1654708. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 8a04166b05161326e68c30d98ca17cdbec0df1dc. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit f89a7e9516c20924fbc6c3e6d3763f26309c5723. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 05eae8ade2c68607bd8a16bee8f60b5681ad74c6. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 301e04524c1bfcc89db76476171714c69ca1f582. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit 74dd190fac5ef642d0d83015766fe33dfefb3489. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 696db387de8f509d846ad6351d5cdfcc9937a514, reversing changes made to 8d81a183bea353fef47a62e542bf3fd6f53c13ab. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 788cad79f72a7f99ff66c5032bb1532eb71b0da5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]>
### Summary Remove unused functions in java.h/.cpp ### Description These functions in odbc JNI is not used by anyone. Remove them to avoid confusion. ### Related Issue https://bitquill.atlassian.net/browse/AD-757 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 8a04166b05161326e68c30d98ca17cdbec0df1dc. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit f89a7e9516c20924fbc6c3e6d3763f26309c5723. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 05eae8ade2c68607bd8a16bee8f60b5681ad74c6. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 301e04524c1bfcc89db76476171714c69ca1f582. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit 74dd190fac5ef642d0d83015766fe33dfefb3489. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 696db387de8f509d846ad6351d5cdfcc9937a514, reversing changes made to 8d81a183bea353fef47a62e542bf3fd6f53c13ab. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 788cad79f72a7f99ff66c5032bb1532eb71b0da5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit c75194688a0969edae20f59cbe6c55cf5eb4a4da. * Revert "SQLPrimaryKey using JNI" This reverts commit 02380e9e434a55a9b034da138f7d0d32d1654708. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 8a04166b05161326e68c30d98ca17cdbec0df1dc. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit f89a7e9516c20924fbc6c3e6d3763f26309c5723. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 05eae8ade2c68607bd8a16bee8f60b5681ad74c6. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 301e04524c1bfcc89db76476171714c69ca1f582. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit 74dd190fac5ef642d0d83015766fe33dfefb3489. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 696db387de8f509d846ad6351d5cdfcc9937a514, reversing changes made to 8d81a183bea353fef47a62e542bf3fd6f53c13ab. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 788cad79f72a7f99ff66c5032bb1532eb71b0da5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * Fix README.md (#30) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 8a04166b05161326e68c30d98ca17cdbec0df1dc. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit f89a7e9516c20924fbc6c3e6d3763f26309c5723. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 05eae8ade2c68607bd8a16bee8f60b5681ad74c6. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 301e04524c1bfcc89db76476171714c69ca1f582. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit 74dd190fac5ef642d0d83015766fe33dfefb3489. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 696db387de8f509d846ad6351d5cdfcc9937a514, reversing changes made to 8d81a183bea353fef47a62e542bf3fd6f53c13ab. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 788cad79f72a7f99ff66c5032bb1532eb71b0da5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo…
### Summary remove unneeded libraries from core/binary/common ### Description 1. Remove core, binary, common and core-test code from repository 2. Add needed header files to odbc/src/include from core/binary/common 3. Add needed cpp files to odbc/src from core/binary/common 4. Add needed functions to existing files and remove some not in use code. 5. Make sure code compile and test successfully. ### Related Issue https://bitquill.atlassian.net/browse/AD-563 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 8a04166b05161326e68c30d98ca17cdbec0df1dc. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit f89a7e9516c20924fbc6c3e6d3763f26309c5723. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 05eae8ade2c68607bd8a16bee8f60b5681ad74c6. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 301e04524c1bfcc89db76476171714c69ca1f582. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit 74dd190fac5ef642d0d83015766fe33dfefb3489. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 696db387de8f509d846ad6351d5cdfcc9937a514, reversing changes made to 8d81a183bea353fef47a62e542bf3fd6f53c13ab. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 788cad79f72a7f99ff66c5032bb1532eb71b0da5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit c75194688a0969edae20f59cbe6c55cf5eb4a4da. * Revert "SQLPrimaryKey using JNI" This reverts commit 02380e9e434a55a9b034da138f7d0d32d1654708. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 8a04166b05161326e68c30d98ca17cdbec0df1dc. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit f89a7e9516c20924fbc6c3e6d3763f26309c5723. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 05eae8ade2c68607bd8a16bee8f60b5681ad74c6. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 301e04524c1bfcc89db76476171714c69ca1f582. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit 74dd190fac5ef642d0d83015766fe33dfefb3489. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 696db387de8f509d846ad6351d5cdfcc9937a514, reversing changes made to 8d81a183bea353fef47a62e542bf3fd6f53c13ab. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 788cad79f72a7f99ff66c5032bb1532eb71b0da5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * Fix README.md (#30) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 8a04166b05161326e68c30d98ca17cdbec0df1dc. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit f89a7e9516c20924fbc6c3e6d3763f26309c5723. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 05eae8ade2c68607bd8a16bee8f60b5681ad74c6. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 301e04524c1bfcc89db76476171714c69ca1f582. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit 74dd190fac5ef642d0d83015766fe33dfefb3489. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 696db387de8f509d846ad6351d5cdfcc9937a514, reversing changes made to 8d81a183bea353fef47a62e542bf3fd6f53c13ab. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 788cad79f72a7f99ff66c5032bb1532eb71b0da5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnecti…
… to iterate past vector end (#86) ### Summary [AD-753] check JVM attach result before use it [AD-772] add bug fix to iterate past vector end ### Description #### [AD-753] check JVM attach result before use it Current JniContext::Attach() returns a pointer. The pointer is not checked before use it which is somewhat dangerous. My change add a check for the Attach() to see if there is an error to ensure the pointer is used safely. <!--- Details of what you changed --> 1. Use error code to pass error to caller and caller needs to check the error info before use the pointer. 2. Unit test could not be added as I could not inject the stub behavior to JniContext::jvm. #### [AD-772] add bug fix to iterate past vector end The error of `expression: can't increment vector iterator past end` is actually caused by Tableau setting rowArraySize to a number that is larger than the number of available rows in the database. Our ODBC driver continues to retrieve rows when SqlResult::AI_NO_DATA is returned, which usually causes the `Error: expression: can't increment vector iterator past end` error, because SqlResult::AI_NO_DATA is returned by PrimaryKeysQuery::FetchNextRow only when cursor has reached the end of the vector. ### Related Issue https://bitquill.atlassian.net/browse/AD-753 https://bitquill.atlassian.net/browse/AD-772 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 8a04166b05161326e68c30d98ca17cdbec0df1dc. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit f89a7e9516c20924fbc6c3e6d3763f26309c5723. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 05eae8ade2c68607bd8a16bee8f60b5681ad74c6. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 301e04524c1bfcc89db76476171714c69ca1f582. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit 74dd190fac5ef642d0d83015766fe33dfefb3489. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 696db387de8f509d846ad6351d5cdfcc9937a514, reversing changes made to 8d81a183bea353fef47a62e542bf3fd6f53c13ab. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 788cad79f72a7f99ff66c5032bb1532eb71b0da5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit c75194688a0969edae20f59cbe6c55cf5eb4a4da. * Revert "SQLPrimaryKey using JNI" This reverts commit 02380e9e434a55a9b034da138f7d0d32d1654708. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 8a04166b05161326e68c30d98ca17cdbec0df1dc. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit f89a7e9516c20924fbc6c3e6d3763f26309c5723. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 05eae8ade2c68607bd8a16bee8f60b5681ad74c6. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 301e04524c1bfcc89db76476171714c69ca1f582. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit 74dd190fac5ef642d0d83015766fe33dfefb3489. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 696db387de8f509d846ad6351d5cdfcc9937a514, reversing changes made to 8d81a183bea353fef47a62e542bf3fd6f53c13ab. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 788cad79f72a7f99ff66c5032bb1532eb71b0da5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * Fix README.md (#30) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 8a04166b05161326e68c30d98ca17cdbec0df1dc. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit f89a7e9516c20924fbc6c3e6d3763f26309c5723. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 05eae8ade2c68607bd8a16bee8f60b5681ad74c6. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 301e04524c1bfcc89db76476171714c69ca1f582. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit 74dd190fac5ef642d0d83015766fe33dfefb3489. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 696db387de8f509d846ad6351d5cdfcc9937a514, reversing changes made to 8d81a183bea353fef47a62e542bf3fd6f53c13ab. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 788cad79f72a7f99ff66c5032bb1532eb71b0da5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when…
### Summary Add log message to statement.cpp. ### Description rowArraySize should not hold values other than 1, therefore putting a log to indicate it better ### Related Issue https://bitquill.atlassian.net/browse/AD-801 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 8a04166b05161326e68c30d98ca17cdbec0df1dc. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit f89a7e9516c20924fbc6c3e6d3763f26309c5723. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 05eae8ade2c68607bd8a16bee8f60b5681ad74c6. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 301e04524c1bfcc89db76476171714c69ca1f582. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit 74dd190fac5ef642d0d83015766fe33dfefb3489. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 696db387de8f509d846ad6351d5cdfcc9937a514, reversing changes made to 8d81a183bea353fef47a62e542bf3fd6f53c13ab. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 788cad79f72a7f99ff66c5032bb1532eb71b0da5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit c75194688a0969edae20f59cbe6c55cf5eb4a4da. * Revert "SQLPrimaryKey using JNI" This reverts commit 02380e9e434a55a9b034da138f7d0d32d1654708. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 8a04166b05161326e68c30d98ca17cdbec0df1dc. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit f89a7e9516c20924fbc6c3e6d3763f26309c5723. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 05eae8ade2c68607bd8a16bee8f60b5681ad74c6. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 301e04524c1bfcc89db76476171714c69ca1f582. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit 74dd190fac5ef642d0d83015766fe33dfefb3489. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 696db387de8f509d846ad6351d5cdfcc9937a514, reversing changes made to 8d81a183bea353fef47a62e542bf3fd6f53c13ab. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 788cad79f72a7f99ff66c5032bb1532eb71b0da5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * Fix README.md (#30) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 8a04166b05161326e68c30d98ca17cdbec0df1dc. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit f89a7e9516c20924fbc6c3e6d3763f26309c5723. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 05eae8ade2c68607bd8a16bee8f60b5681ad74c6. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 301e04524c1bfcc89db76476171714c69ca1f582. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit 74dd190fac5ef642d0d83015766fe33dfefb3489. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 696db387de8f509d846ad6351d5cdfcc9937a514, reversing changes made to 8d81a183bea353fef47a62e542bf3fd6f53c13ab. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 788cad79f72a7f99ff66c5032bb1532eb71b0da5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * …
* [AD-573] unicode port ( ODBC W API Interfaces) - [x] Add the -DUNICODE=1 definition. - [x] Convert SQLWCHAR to/from UTF-8 encoded strings internally - [x] Ensure tests use a combination of SQLWCHAR and SQLCHAR, where appropriate - [x] Add test to perform query with wide characters and return wide and non-wide results. - [x] Report `W` (wide) types for columns with JDBC_CHAR/JDBC_VARCHAR/JDBC_LONGVARCHAR. https://bitquill.atlassian.net/browse/AD-573 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 8a04166b05161326e68c30d98ca17cdbec0df1dc. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit f89a7e9516c20924fbc6c3e6d3763f26309c5723. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 05eae8ade2c68607bd8a16bee8f60b5681ad74c6. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 301e04524c1bfcc89db76476171714c69ca1f582. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit 74dd190fac5ef642d0d83015766fe33dfefb3489. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 696db387de8f509d846ad6351d5cdfcc9937a514, reversing changes made to 8d81a183bea353fef47a62e542bf3fd6f53c13ab. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 788cad79f72a7f99ff66c5032bb1532eb71b0da5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit c75194688a0969edae20f59cbe6c55cf5eb4a4da. * Revert "SQLPrimaryKey using JNI" This reverts commit 02380e9e434a55a9b034da138f7d0d32d1654708. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 8a04166b05161326e68c30d98ca17cdbec0df1dc. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit f89a7e9516c20924fbc6c3e6d3763f26309c5723. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 05eae8ade2c68607bd8a16bee8f60b5681ad74c6. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 301e04524c1bfcc89db76476171714c69ca1f582. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit 74dd190fac5ef642d0d83015766fe33dfefb3489. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 696db387de8f509d846ad6351d5cdfcc9937a514, reversing changes made to 8d81a183bea353fef47a62e542bf3fd6f53c13ab. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 788cad79f72a7f99ff66c5032bb1532eb71b0da5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * Fix README.md (#30) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 8a04166b05161326e68c30d98ca17cdbec0df1dc. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit f89a7e9516c20924fbc6c3e6d3763f26309c5723. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 05eae8ade2c68607bd8a16bee8f60b5681ad74c6. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 301e04524c1bfcc89db76476171714c69ca1f582. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit 74dd190fac5ef642d0d83015766fe33dfefb3489. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 696db387de8f509d846ad6351d5cdfcc9937a514, reversing changes made to 8d81a183bea353fef47a62e542bf3fd6f53c13ab. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 788cad79f72a7f99ff66c5032bb1532eb71b0da5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionI…
* [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 8a04166b05161326e68c30d98ca17cdbec0df1dc. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit f89a7e9516c20924fbc6c3e6d3763f26309c5723. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 05eae8ade2c68607bd8a16bee8f60b5681ad74c6. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 301e04524c1bfcc89db76476171714c69ca1f582. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit 74dd190fac5ef642d0d83015766fe33dfefb3489. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 696db387de8f509d846ad6351d5cdfcc9937a514, reversing changes made to 8d81a183bea353fef47a62e542bf3fd6f53c13ab. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 788cad79f72a7f99ff66c5032bb1532eb71b0da5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit c75194688a0969edae20f59cbe6c55cf5eb4a4da. * Revert "SQLPrimaryKey using JNI" This reverts commit 02380e9e434a55a9b034da138f7d0d32d1654708. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 8a04166b05161326e68c30d98ca17cdbec0df1dc. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit f89a7e9516c20924fbc6c3e6d3763f26309c5723. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 05eae8ade2c68607bd8a16bee8f60b5681ad74c6. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 301e04524c1bfcc89db76476171714c69ca1f582. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit 74dd190fac5ef642d0d83015766fe33dfefb3489. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 696db387de8f509d846ad6351d5cdfcc9937a514, reversing changes made to 8d81a183bea353fef47a62e542bf3fd6f53c13ab. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 788cad79f72a7f99ff66c5032bb1532eb71b0da5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * Fix README.md (#30) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 8a04166b05161326e68c30d98ca17cdbec0df1dc. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit f89a7e9516c20924fbc6c3e6d3763f26309c5723. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 05eae8ade2c68607bd8a16bee8f60b5681ad74c6. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 301e04524c1bfcc89db76476171714c69ca1f582. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit 74dd190fac5ef642d0d83015766fe33dfefb3489. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 696db387de8f509d846ad6351d5cdfcc9937a514, reversing changes made to 8d81a183bea353fef47a62e542bf3fd6f53c13ab. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 788cad79f72a7f99ff66c5032bb1532eb71b0da5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetS…
* [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 8a04166b05161326e68c30d98ca17cdbec0df1dc. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit f89a7e9516c20924fbc6c3e6d3763f26309c5723. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 05eae8ade2c68607bd8a16bee8f60b5681ad74c6. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 301e04524c1bfcc89db76476171714c69ca1f582. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit 74dd190fac5ef642d0d83015766fe33dfefb3489. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 696db387de8f509d846ad6351d5cdfcc9937a514, reversing changes made to 8d81a183bea353fef47a62e542bf3fd6f53c13ab. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 788cad79f72a7f99ff66c5032bb1532eb71b0da5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit c75194688a0969edae20f59cbe6c55cf5eb4a4da. * Revert "SQLPrimaryKey using JNI" This reverts commit 02380e9e434a55a9b034da138f7d0d32d1654708. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 8a04166b05161326e68c30d98ca17cdbec0df1dc. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit f89a7e9516c20924fbc6c3e6d3763f26309c5723. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 05eae8ade2c68607bd8a16bee8f60b5681ad74c6. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 301e04524c1bfcc89db76476171714c69ca1f582. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit 74dd190fac5ef642d0d83015766fe33dfefb3489. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 696db387de8f509d846ad6351d5cdfcc9937a514, reversing changes made to 8d81a183bea353fef47a62e542bf3fd6f53c13ab. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 788cad79f72a7f99ff66c5032bb1532eb71b0da5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * Fix README.md (#30) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 8a04166b05161326e68c30d98ca17cdbec0df1dc. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit f89a7e9516c20924fbc6c3e6d3763f26309c5723. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 05eae8ade2c68607bd8a16bee8f60b5681ad74c6. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 301e04524c1bfcc89db76476171714c69ca1f582. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit 74dd190fac5ef642d0d83015766fe33dfefb3489. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 696db387de8f509d846ad6351d5cdfcc9937a514, reversing changes made to 8d81a183bea353fef47a62e542bf3fd6f53c13ab. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 788cad79f72a7f99ff66c5032bb1532eb71b0da5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGe…
* [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 8a04166b05161326e68c30d98ca17cdbec0df1dc. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit f89a7e9516c20924fbc6c3e6d3763f26309c5723. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 05eae8ade2c68607bd8a16bee8f60b5681ad74c6. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 301e04524c1bfcc89db76476171714c69ca1f582. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit 74dd190fac5ef642d0d83015766fe33dfefb3489. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 696db387de8f509d846ad6351d5cdfcc9937a514, reversing changes made to 8d81a183bea353fef47a62e542bf3fd6f53c13ab. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 788cad79f72a7f99ff66c5032bb1532eb71b0da5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit c75194688a0969edae20f59cbe6c55cf5eb4a4da. * Revert "SQLPrimaryKey using JNI" This reverts commit 02380e9e434a55a9b034da138f7d0d32d1654708. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 8a04166b05161326e68c30d98ca17cdbec0df1dc. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit f89a7e9516c20924fbc6c3e6d3763f26309c5723. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 05eae8ade2c68607bd8a16bee8f60b5681ad74c6. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 301e04524c1bfcc89db76476171714c69ca1f582. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit 74dd190fac5ef642d0d83015766fe33dfefb3489. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 696db387de8f509d846ad6351d5cdfcc9937a514, reversing changes made to 8d81a183bea353fef47a62e542bf3fd6f53c13ab. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 788cad79f72a7f99ff66c5032bb1532eb71b0da5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * Fix README.md (#30) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 8a04166b05161326e68c30d98ca17cdbec0df1dc. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit f89a7e9516c20924fbc6c3e6d3763f26309c5723. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 05eae8ade2c68607bd8a16bee8f60b5681ad74c6. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 301e04524c1bfcc89db76476171714c69ca1f582. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit 74dd190fac5ef642d0d83015766fe33dfefb3489. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 696db387de8f509d846ad6351d5cdfcc9937a514, reversing changes made to 8d81a183bea353fef47a62e542bf3fd6f53c13ab. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 788cad79f72a7f99ff66c5032bb1532eb71b0da5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadata…
* [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 8a04166b05161326e68c30d98ca17cdbec0df1dc. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit f89a7e9516c20924fbc6c3e6d3763f26309c5723. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 05eae8ade2c68607bd8a16bee8f60b5681ad74c6. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 301e04524c1bfcc89db76476171714c69ca1f582. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit 74dd190fac5ef642d0d83015766fe33dfefb3489. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 696db387de8f509d846ad6351d5cdfcc9937a514, reversing changes made to 8d81a183bea353fef47a62e542bf3fd6f53c13ab. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 788cad79f72a7f99ff66c5032bb1532eb71b0da5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit c75194688a0969edae20f59cbe6c55cf5eb4a4da. * Revert "SQLPrimaryKey using JNI" This reverts commit 02380e9e434a55a9b034da138f7d0d32d1654708. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 8a04166b05161326e68c30d98ca17cdbec0df1dc. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit f89a7e9516c20924fbc6c3e6d3763f26309c5723. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 05eae8ade2c68607bd8a16bee8f60b5681ad74c6. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 301e04524c1bfcc89db76476171714c69ca1f582. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit 74dd190fac5ef642d0d83015766fe33dfefb3489. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 696db387de8f509d846ad6351d5cdfcc9937a514, reversing changes made to 8d81a183bea353fef47a62e542bf3fd6f53c13ab. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 788cad79f72a7f99ff66c5032bb1532eb71b0da5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * Fix README.md (#30) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 8a04166b05161326e68c30d98ca17cdbec0df1dc. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit f89a7e9516c20924fbc6c3e6d3763f26309c5723. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 05eae8ade2c68607bd8a16bee8f60b5681ad74c6. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 301e04524c1bfcc89db76476171714c69ca1f582. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit 74dd190fac5ef642d0d83015766fe33dfefb3489. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 696db387de8f509d846ad6351d5cdfcc9937a514, reversing changes made to 8d81a183bea353fef47a62e542bf3fd6f53c13ab. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 788cad79f72a7f99ff66c5032bb1532eb71b0da5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty…
* [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 8a04166b05161326e68c30d98ca17cdbec0df1dc. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit f89a7e9516c20924fbc6c3e6d3763f26309c5723. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 05eae8ade2c68607bd8a16bee8f60b5681ad74c6. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 301e04524c1bfcc89db76476171714c69ca1f582. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit 74dd190fac5ef642d0d83015766fe33dfefb3489. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 696db387de8f509d846ad6351d5cdfcc9937a514, reversing changes made to 8d81a183bea353fef47a62e542bf3fd6f53c13ab. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 788cad79f72a7f99ff66c5032bb1532eb71b0da5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit c75194688a0969edae20f59cbe6c55cf5eb4a4da. * Revert "SQLPrimaryKey using JNI" This reverts commit 02380e9e434a55a9b034da138f7d0d32d1654708. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 8a04166b05161326e68c30d98ca17cdbec0df1dc. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit f89a7e9516c20924fbc6c3e6d3763f26309c5723. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 05eae8ade2c68607bd8a16bee8f60b5681ad74c6. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 301e04524c1bfcc89db76476171714c69ca1f582. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit 74dd190fac5ef642d0d83015766fe33dfefb3489. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 696db387de8f509d846ad6351d5cdfcc9937a514, reversing changes made to 8d81a183bea353fef47a62e542bf3fd6f53c13ab. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 788cad79f72a7f99ff66c5032bb1532eb71b0da5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * Fix README.md (#30) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 8a04166b05161326e68c30d98ca17cdbec0df1dc. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit f89a7e9516c20924fbc6c3e6d3763f26309c5723. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 05eae8ade2c68607bd8a16bee8f60b5681ad74c6. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 301e04524c1bfcc89db76476171714c69ca1f582. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit 74dd190fac5ef642d0d83015766fe33dfefb3489. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit 696db387de8f509d846ad6351d5cdfcc9937a514, reversing changes made to 8d81a183bea353fef47a62e542bf3fd6f53c13ab. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 788cad79f72a7f99ff66c5032bb1532eb71b0da5. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetada…
* enabling publishing code coverage results
Summary Adapt Foreign Keys (i.e., the SQLForeignKeys function) Description JNI wrapper code for getImportedKeys adapt SQLForeignKeys function unit test for jni_test unit test for java_test Related Issue https://bitquill.atlassian.net/browse/AD-550 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 3f58b3995262c22dc6b411cd9e41a6ea38112844. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit ae1a6047bbab9b3dc8c7869b70c8d4499c6cc7cf. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 52eef4931e022553633b0c7f5f535b26e3b4f940. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 686aa59e7a473a4aa88e7c1e5f32264c3c71a40c. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit ff1729d46da780a3ed5654211487da066849ae95. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit b4a52d49eba77b8b409878c6d5e1b9ef2bba1750, reversing changes made to b4d20ff9c2a39de0fe89de14fd40db107b2e98b4. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 42dd752b23be78058f4b19c5386ac3f61281ff91. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit 57043326d22b6a60bffb029959c3065202120409. * Revert "SQLPrimaryKey using JNI" This reverts commit f32bace48fed99164a113193673ff17ba6b1cf22. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 3f58b3995262c22dc6b411cd9e41a6ea38112844. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit ae1a6047bbab9b3dc8c7869b70c8d4499c6cc7cf. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 52eef4931e022553633b0c7f5f535b26e3b4f940. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 686aa59e7a473a4aa88e7c1e5f32264c3c71a40c. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit ff1729d46da780a3ed5654211487da066849ae95. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit b4a52d49eba77b8b409878c6d5e1b9ef2bba1750, reversing changes made to b4d20ff9c2a39de0fe89de14fd40db107b2e98b4. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 42dd752b23be78058f4b19c5386ac3f61281ff91. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]>
### Summary Remove unused functions in java.h/.cpp ### Description These functions in odbc JNI is not used by anyone. Remove them to avoid confusion. ### Related Issue https://bitquill.atlassian.net/browse/AD-757 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 3f58b3995262c22dc6b411cd9e41a6ea38112844. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit ae1a6047bbab9b3dc8c7869b70c8d4499c6cc7cf. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 52eef4931e022553633b0c7f5f535b26e3b4f940. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 686aa59e7a473a4aa88e7c1e5f32264c3c71a40c. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit ff1729d46da780a3ed5654211487da066849ae95. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit b4a52d49eba77b8b409878c6d5e1b9ef2bba1750, reversing changes made to b4d20ff9c2a39de0fe89de14fd40db107b2e98b4. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 42dd752b23be78058f4b19c5386ac3f61281ff91. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit 57043326d22b6a60bffb029959c3065202120409. * Revert "SQLPrimaryKey using JNI" This reverts commit f32bace48fed99164a113193673ff17ba6b1cf22. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 3f58b3995262c22dc6b411cd9e41a6ea38112844. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit ae1a6047bbab9b3dc8c7869b70c8d4499c6cc7cf. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 52eef4931e022553633b0c7f5f535b26e3b4f940. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 686aa59e7a473a4aa88e7c1e5f32264c3c71a40c. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit ff1729d46da780a3ed5654211487da066849ae95. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit b4a52d49eba77b8b409878c6d5e1b9ef2bba1750, reversing changes made to b4d20ff9c2a39de0fe89de14fd40db107b2e98b4. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 42dd752b23be78058f4b19c5386ac3f61281ff91. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * Fix README.md (#30) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 3f58b3995262c22dc6b411cd9e41a6ea38112844. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit ae1a6047bbab9b3dc8c7869b70c8d4499c6cc7cf. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 52eef4931e022553633b0c7f5f535b26e3b4f940. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 686aa59e7a473a4aa88e7c1e5f32264c3c71a40c. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit ff1729d46da780a3ed5654211487da066849ae95. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit b4a52d49eba77b8b409878c6d5e1b9ef2bba1750, reversing changes made to b4d20ff9c2a39de0fe89de14fd40db107b2e98b4. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 42dd752b23be78058f4b19c5386ac3f61281ff91. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo…
### Summary remove unneeded libraries from core/binary/common ### Description 1. Remove core, binary, common and core-test code from repository 2. Add needed header files to odbc/src/include from core/binary/common 3. Add needed cpp files to odbc/src from core/binary/common 4. Add needed functions to existing files and remove some not in use code. 5. Make sure code compile and test successfully. ### Related Issue https://bitquill.atlassian.net/browse/AD-563 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 3f58b3995262c22dc6b411cd9e41a6ea38112844. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit ae1a6047bbab9b3dc8c7869b70c8d4499c6cc7cf. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 52eef4931e022553633b0c7f5f535b26e3b4f940. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 686aa59e7a473a4aa88e7c1e5f32264c3c71a40c. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit ff1729d46da780a3ed5654211487da066849ae95. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit b4a52d49eba77b8b409878c6d5e1b9ef2bba1750, reversing changes made to b4d20ff9c2a39de0fe89de14fd40db107b2e98b4. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 42dd752b23be78058f4b19c5386ac3f61281ff91. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit 57043326d22b6a60bffb029959c3065202120409. * Revert "SQLPrimaryKey using JNI" This reverts commit f32bace48fed99164a113193673ff17ba6b1cf22. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 3f58b3995262c22dc6b411cd9e41a6ea38112844. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit ae1a6047bbab9b3dc8c7869b70c8d4499c6cc7cf. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 52eef4931e022553633b0c7f5f535b26e3b4f940. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 686aa59e7a473a4aa88e7c1e5f32264c3c71a40c. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit ff1729d46da780a3ed5654211487da066849ae95. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit b4a52d49eba77b8b409878c6d5e1b9ef2bba1750, reversing changes made to b4d20ff9c2a39de0fe89de14fd40db107b2e98b4. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 42dd752b23be78058f4b19c5386ac3f61281ff91. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * Fix README.md (#30) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 3f58b3995262c22dc6b411cd9e41a6ea38112844. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit ae1a6047bbab9b3dc8c7869b70c8d4499c6cc7cf. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 52eef4931e022553633b0c7f5f535b26e3b4f940. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 686aa59e7a473a4aa88e7c1e5f32264c3c71a40c. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit ff1729d46da780a3ed5654211487da066849ae95. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit b4a52d49eba77b8b409878c6d5e1b9ef2bba1750, reversing changes made to b4d20ff9c2a39de0fe89de14fd40db107b2e98b4. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 42dd752b23be78058f4b19c5386ac3f61281ff91. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnecti…
… to iterate past vector end (#86) ### Summary [AD-753] check JVM attach result before use it [AD-772] add bug fix to iterate past vector end ### Description #### [AD-753] check JVM attach result before use it Current JniContext::Attach() returns a pointer. The pointer is not checked before use it which is somewhat dangerous. My change add a check for the Attach() to see if there is an error to ensure the pointer is used safely. <!--- Details of what you changed --> 1. Use error code to pass error to caller and caller needs to check the error info before use the pointer. 2. Unit test could not be added as I could not inject the stub behavior to JniContext::jvm. #### [AD-772] add bug fix to iterate past vector end The error of `expression: can't increment vector iterator past end` is actually caused by Tableau setting rowArraySize to a number that is larger than the number of available rows in the database. Our ODBC driver continues to retrieve rows when SqlResult::AI_NO_DATA is returned, which usually causes the `Error: expression: can't increment vector iterator past end` error, because SqlResult::AI_NO_DATA is returned by PrimaryKeysQuery::FetchNextRow only when cursor has reached the end of the vector. ### Related Issue https://bitquill.atlassian.net/browse/AD-753 https://bitquill.atlassian.net/browse/AD-772 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 3f58b3995262c22dc6b411cd9e41a6ea38112844. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit ae1a6047bbab9b3dc8c7869b70c8d4499c6cc7cf. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 52eef4931e022553633b0c7f5f535b26e3b4f940. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 686aa59e7a473a4aa88e7c1e5f32264c3c71a40c. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit ff1729d46da780a3ed5654211487da066849ae95. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit b4a52d49eba77b8b409878c6d5e1b9ef2bba1750, reversing changes made to b4d20ff9c2a39de0fe89de14fd40db107b2e98b4. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 42dd752b23be78058f4b19c5386ac3f61281ff91. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit 57043326d22b6a60bffb029959c3065202120409. * Revert "SQLPrimaryKey using JNI" This reverts commit f32bace48fed99164a113193673ff17ba6b1cf22. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 3f58b3995262c22dc6b411cd9e41a6ea38112844. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit ae1a6047bbab9b3dc8c7869b70c8d4499c6cc7cf. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 52eef4931e022553633b0c7f5f535b26e3b4f940. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 686aa59e7a473a4aa88e7c1e5f32264c3c71a40c. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit ff1729d46da780a3ed5654211487da066849ae95. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit b4a52d49eba77b8b409878c6d5e1b9ef2bba1750, reversing changes made to b4d20ff9c2a39de0fe89de14fd40db107b2e98b4. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 42dd752b23be78058f4b19c5386ac3f61281ff91. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * Fix README.md (#30) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 3f58b3995262c22dc6b411cd9e41a6ea38112844. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit ae1a6047bbab9b3dc8c7869b70c8d4499c6cc7cf. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 52eef4931e022553633b0c7f5f535b26e3b4f940. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 686aa59e7a473a4aa88e7c1e5f32264c3c71a40c. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit ff1729d46da780a3ed5654211487da066849ae95. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit b4a52d49eba77b8b409878c6d5e1b9ef2bba1750, reversing changes made to b4d20ff9c2a39de0fe89de14fd40db107b2e98b4. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 42dd752b23be78058f4b19c5386ac3f61281ff91. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when…
### Summary Add log message to statement.cpp. ### Description rowArraySize should not hold values other than 1, therefore putting a log to indicate it better ### Related Issue https://bitquill.atlassian.net/browse/AD-801 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 3f58b3995262c22dc6b411cd9e41a6ea38112844. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit ae1a6047bbab9b3dc8c7869b70c8d4499c6cc7cf. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 52eef4931e022553633b0c7f5f535b26e3b4f940. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 686aa59e7a473a4aa88e7c1e5f32264c3c71a40c. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit ff1729d46da780a3ed5654211487da066849ae95. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit b4a52d49eba77b8b409878c6d5e1b9ef2bba1750, reversing changes made to b4d20ff9c2a39de0fe89de14fd40db107b2e98b4. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 42dd752b23be78058f4b19c5386ac3f61281ff91. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit 57043326d22b6a60bffb029959c3065202120409. * Revert "SQLPrimaryKey using JNI" This reverts commit f32bace48fed99164a113193673ff17ba6b1cf22. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 3f58b3995262c22dc6b411cd9e41a6ea38112844. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit ae1a6047bbab9b3dc8c7869b70c8d4499c6cc7cf. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 52eef4931e022553633b0c7f5f535b26e3b4f940. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 686aa59e7a473a4aa88e7c1e5f32264c3c71a40c. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit ff1729d46da780a3ed5654211487da066849ae95. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit b4a52d49eba77b8b409878c6d5e1b9ef2bba1750, reversing changes made to b4d20ff9c2a39de0fe89de14fd40db107b2e98b4. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 42dd752b23be78058f4b19c5386ac3f61281ff91. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * Fix README.md (#30) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 3f58b3995262c22dc6b411cd9e41a6ea38112844. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit ae1a6047bbab9b3dc8c7869b70c8d4499c6cc7cf. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 52eef4931e022553633b0c7f5f535b26e3b4f940. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 686aa59e7a473a4aa88e7c1e5f32264c3c71a40c. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit ff1729d46da780a3ed5654211487da066849ae95. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit b4a52d49eba77b8b409878c6d5e1b9ef2bba1750, reversing changes made to b4d20ff9c2a39de0fe89de14fd40db107b2e98b4. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 42dd752b23be78058f4b19c5386ac3f61281ff91. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * …
* [AD-573] unicode port ( ODBC W API Interfaces) - [x] Add the -DUNICODE=1 definition. - [x] Convert SQLWCHAR to/from UTF-8 encoded strings internally - [x] Ensure tests use a combination of SQLWCHAR and SQLCHAR, where appropriate - [x] Add test to perform query with wide characters and return wide and non-wide results. - [x] Report `W` (wide) types for columns with JDBC_CHAR/JDBC_VARCHAR/JDBC_LONGVARCHAR. https://bitquill.atlassian.net/browse/AD-573 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 3f58b3995262c22dc6b411cd9e41a6ea38112844. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit ae1a6047bbab9b3dc8c7869b70c8d4499c6cc7cf. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 52eef4931e022553633b0c7f5f535b26e3b4f940. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 686aa59e7a473a4aa88e7c1e5f32264c3c71a40c. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit ff1729d46da780a3ed5654211487da066849ae95. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit b4a52d49eba77b8b409878c6d5e1b9ef2bba1750, reversing changes made to b4d20ff9c2a39de0fe89de14fd40db107b2e98b4. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 42dd752b23be78058f4b19c5386ac3f61281ff91. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit 57043326d22b6a60bffb029959c3065202120409. * Revert "SQLPrimaryKey using JNI" This reverts commit f32bace48fed99164a113193673ff17ba6b1cf22. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 3f58b3995262c22dc6b411cd9e41a6ea38112844. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit ae1a6047bbab9b3dc8c7869b70c8d4499c6cc7cf. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 52eef4931e022553633b0c7f5f535b26e3b4f940. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 686aa59e7a473a4aa88e7c1e5f32264c3c71a40c. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit ff1729d46da780a3ed5654211487da066849ae95. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit b4a52d49eba77b8b409878c6d5e1b9ef2bba1750, reversing changes made to b4d20ff9c2a39de0fe89de14fd40db107b2e98b4. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 42dd752b23be78058f4b19c5386ac3f61281ff91. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * Fix README.md (#30) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 3f58b3995262c22dc6b411cd9e41a6ea38112844. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit ae1a6047bbab9b3dc8c7869b70c8d4499c6cc7cf. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 52eef4931e022553633b0c7f5f535b26e3b4f940. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 686aa59e7a473a4aa88e7c1e5f32264c3c71a40c. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit ff1729d46da780a3ed5654211487da066849ae95. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit b4a52d49eba77b8b409878c6d5e1b9ef2bba1750, reversing changes made to b4d20ff9c2a39de0fe89de14fd40db107b2e98b4. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 42dd752b23be78058f4b19c5386ac3f61281ff91. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionI…
* [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 3f58b3995262c22dc6b411cd9e41a6ea38112844. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit ae1a6047bbab9b3dc8c7869b70c8d4499c6cc7cf. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 52eef4931e022553633b0c7f5f535b26e3b4f940. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 686aa59e7a473a4aa88e7c1e5f32264c3c71a40c. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit ff1729d46da780a3ed5654211487da066849ae95. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit b4a52d49eba77b8b409878c6d5e1b9ef2bba1750, reversing changes made to b4d20ff9c2a39de0fe89de14fd40db107b2e98b4. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 42dd752b23be78058f4b19c5386ac3f61281ff91. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit 57043326d22b6a60bffb029959c3065202120409. * Revert "SQLPrimaryKey using JNI" This reverts commit f32bace48fed99164a113193673ff17ba6b1cf22. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 3f58b3995262c22dc6b411cd9e41a6ea38112844. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit ae1a6047bbab9b3dc8c7869b70c8d4499c6cc7cf. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 52eef4931e022553633b0c7f5f535b26e3b4f940. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 686aa59e7a473a4aa88e7c1e5f32264c3c71a40c. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit ff1729d46da780a3ed5654211487da066849ae95. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit b4a52d49eba77b8b409878c6d5e1b9ef2bba1750, reversing changes made to b4d20ff9c2a39de0fe89de14fd40db107b2e98b4. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 42dd752b23be78058f4b19c5386ac3f61281ff91. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * Fix README.md (#30) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 3f58b3995262c22dc6b411cd9e41a6ea38112844. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit ae1a6047bbab9b3dc8c7869b70c8d4499c6cc7cf. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 52eef4931e022553633b0c7f5f535b26e3b4f940. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 686aa59e7a473a4aa88e7c1e5f32264c3c71a40c. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit ff1729d46da780a3ed5654211487da066849ae95. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit b4a52d49eba77b8b409878c6d5e1b9ef2bba1750, reversing changes made to b4d20ff9c2a39de0fe89de14fd40db107b2e98b4. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 42dd752b23be78058f4b19c5386ac3f61281ff91. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetS…
* [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 3f58b3995262c22dc6b411cd9e41a6ea38112844. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit ae1a6047bbab9b3dc8c7869b70c8d4499c6cc7cf. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 52eef4931e022553633b0c7f5f535b26e3b4f940. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 686aa59e7a473a4aa88e7c1e5f32264c3c71a40c. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit ff1729d46da780a3ed5654211487da066849ae95. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit b4a52d49eba77b8b409878c6d5e1b9ef2bba1750, reversing changes made to b4d20ff9c2a39de0fe89de14fd40db107b2e98b4. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 42dd752b23be78058f4b19c5386ac3f61281ff91. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit 57043326d22b6a60bffb029959c3065202120409. * Revert "SQLPrimaryKey using JNI" This reverts commit f32bace48fed99164a113193673ff17ba6b1cf22. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 3f58b3995262c22dc6b411cd9e41a6ea38112844. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit ae1a6047bbab9b3dc8c7869b70c8d4499c6cc7cf. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 52eef4931e022553633b0c7f5f535b26e3b4f940. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 686aa59e7a473a4aa88e7c1e5f32264c3c71a40c. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit ff1729d46da780a3ed5654211487da066849ae95. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit b4a52d49eba77b8b409878c6d5e1b9ef2bba1750, reversing changes made to b4d20ff9c2a39de0fe89de14fd40db107b2e98b4. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 42dd752b23be78058f4b19c5386ac3f61281ff91. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * Fix README.md (#30) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 3f58b3995262c22dc6b411cd9e41a6ea38112844. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit ae1a6047bbab9b3dc8c7869b70c8d4499c6cc7cf. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 52eef4931e022553633b0c7f5f535b26e3b4f940. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 686aa59e7a473a4aa88e7c1e5f32264c3c71a40c. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit ff1729d46da780a3ed5654211487da066849ae95. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit b4a52d49eba77b8b409878c6d5e1b9ef2bba1750, reversing changes made to b4d20ff9c2a39de0fe89de14fd40db107b2e98b4. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 42dd752b23be78058f4b19c5386ac3f61281ff91. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGe…
* [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 3f58b3995262c22dc6b411cd9e41a6ea38112844. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit ae1a6047bbab9b3dc8c7869b70c8d4499c6cc7cf. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 52eef4931e022553633b0c7f5f535b26e3b4f940. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 686aa59e7a473a4aa88e7c1e5f32264c3c71a40c. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit ff1729d46da780a3ed5654211487da066849ae95. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit b4a52d49eba77b8b409878c6d5e1b9ef2bba1750, reversing changes made to b4d20ff9c2a39de0fe89de14fd40db107b2e98b4. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 42dd752b23be78058f4b19c5386ac3f61281ff91. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit 57043326d22b6a60bffb029959c3065202120409. * Revert "SQLPrimaryKey using JNI" This reverts commit f32bace48fed99164a113193673ff17ba6b1cf22. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 3f58b3995262c22dc6b411cd9e41a6ea38112844. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit ae1a6047bbab9b3dc8c7869b70c8d4499c6cc7cf. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 52eef4931e022553633b0c7f5f535b26e3b4f940. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 686aa59e7a473a4aa88e7c1e5f32264c3c71a40c. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit ff1729d46da780a3ed5654211487da066849ae95. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit b4a52d49eba77b8b409878c6d5e1b9ef2bba1750, reversing changes made to b4d20ff9c2a39de0fe89de14fd40db107b2e98b4. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 42dd752b23be78058f4b19c5386ac3f61281ff91. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * Fix README.md (#30) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 3f58b3995262c22dc6b411cd9e41a6ea38112844. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit ae1a6047bbab9b3dc8c7869b70c8d4499c6cc7cf. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 52eef4931e022553633b0c7f5f535b26e3b4f940. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 686aa59e7a473a4aa88e7c1e5f32264c3c71a40c. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit ff1729d46da780a3ed5654211487da066849ae95. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit b4a52d49eba77b8b409878c6d5e1b9ef2bba1750, reversing changes made to b4d20ff9c2a39de0fe89de14fd40db107b2e98b4. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 42dd752b23be78058f4b19c5386ac3f61281ff91. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadata…
* [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 3f58b3995262c22dc6b411cd9e41a6ea38112844. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit ae1a6047bbab9b3dc8c7869b70c8d4499c6cc7cf. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 52eef4931e022553633b0c7f5f535b26e3b4f940. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 686aa59e7a473a4aa88e7c1e5f32264c3c71a40c. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit ff1729d46da780a3ed5654211487da066849ae95. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit b4a52d49eba77b8b409878c6d5e1b9ef2bba1750, reversing changes made to b4d20ff9c2a39de0fe89de14fd40db107b2e98b4. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 42dd752b23be78058f4b19c5386ac3f61281ff91. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit 57043326d22b6a60bffb029959c3065202120409. * Revert "SQLPrimaryKey using JNI" This reverts commit f32bace48fed99164a113193673ff17ba6b1cf22. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 3f58b3995262c22dc6b411cd9e41a6ea38112844. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit ae1a6047bbab9b3dc8c7869b70c8d4499c6cc7cf. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 52eef4931e022553633b0c7f5f535b26e3b4f940. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 686aa59e7a473a4aa88e7c1e5f32264c3c71a40c. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit ff1729d46da780a3ed5654211487da066849ae95. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit b4a52d49eba77b8b409878c6d5e1b9ef2bba1750, reversing changes made to b4d20ff9c2a39de0fe89de14fd40db107b2e98b4. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 42dd752b23be78058f4b19c5386ac3f61281ff91. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * Fix README.md (#30) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 3f58b3995262c22dc6b411cd9e41a6ea38112844. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit ae1a6047bbab9b3dc8c7869b70c8d4499c6cc7cf. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 52eef4931e022553633b0c7f5f535b26e3b4f940. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 686aa59e7a473a4aa88e7c1e5f32264c3c71a40c. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit ff1729d46da780a3ed5654211487da066849ae95. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit b4a52d49eba77b8b409878c6d5e1b9ef2bba1750, reversing changes made to b4d20ff9c2a39de0fe89de14fd40db107b2e98b4. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 42dd752b23be78058f4b19c5386ac3f61281ff91. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty…
* [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 3f58b3995262c22dc6b411cd9e41a6ea38112844. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit ae1a6047bbab9b3dc8c7869b70c8d4499c6cc7cf. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 52eef4931e022553633b0c7f5f535b26e3b4f940. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 686aa59e7a473a4aa88e7c1e5f32264c3c71a40c. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit ff1729d46da780a3ed5654211487da066849ae95. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit b4a52d49eba77b8b409878c6d5e1b9ef2bba1750, reversing changes made to b4d20ff9c2a39de0fe89de14fd40db107b2e98b4. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 42dd752b23be78058f4b19c5386ac3f61281ff91. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments * SQLPrimaryKey using JNI * odbc test failure fix * Revert "odbc test failure fix" This reverts commit 57043326d22b6a60bffb029959c3065202120409. * Revert "SQLPrimaryKey using JNI" This reverts commit f32bace48fed99164a113193673ff17ba6b1cf22. * [AD-550] Adapt Foreign Keys (#24) * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] JNI implementation for getImportedKeys * [AD-550] update Pull Request Template * added reviewees Roy Zhang and Micthell Elholm * [AD-550] add todo note to unit test * [AD-550] define GetImportedKeys in database_metadata.h/.cpp * add ODBC wrapper code to the JNI call for GetImportedKeys * [AD-550] initialize string vars to be empty string in column_metadata_query * [AD-550] modify ForeignKeysQuery to accept 3 arguments only * modified ForeignKeysQuery to only accept catalog, schema, and table, as other fields are not needed. * [AD-550] update column metadata for foreign keys * [AD-550] fix typo in primary_key_meta.h * [AD-550] define vars for foreign key meta * [AD-550] add getter functions for vars in foreign_key_meta.h * [AD-550] support vars in foreign key meta to be optional * [AD-550] add headers for boost optional * [AD-550] add headers and constructors for foreign key meta * added ForeignKeyMeta constructor, and copy constructor *added ForeignKeyMeta destructor * define ForeignKeyMetaVector * basically, complete foreign_key_meta.h * [AD-550] implement resultset.getSmallInt * implement resultset.getSmallInt taking column indices or column names as parameters * make ColumnMeta::dataType be updated with resultSet.Get()->GetSmallInt to simplify code and readbility * [AD-550] Add foreign_key_meta.cpp * implemented functions: ReadForeignKeysColumnMetaVector ForeignKeyMeta::Read * [AD-550] update CMakeLists to include foreign_key_meta.cpp * [AD-550] implement MakeRequestGetForeignKeysMeta * MakeRequestGetForeignKeysMeta calls GetImportedKeys to get Jni ResultSet object for foreign keys, and then reads the resultSet object to fill in the meta object. * [AD-550] update ForeignKeysQuery::DataAvailable and ForeignKeysQuery::Close * update meta object accordingly whenForeignKeysQuery::Close() is called. * return boolean for whether data is available based on meta object * [AD-550] implement ForeignKeysQuery::Execute and FetchNextRow * the code for ForeignKeysQuery::Execute and ForeignKeysQuery::FetchNextRow is based on ColumnMetadataQuery::Execute and ColumnMetadataQuery::FetchNextRow * [AD-550] fix Mac and Linux build * remove extra qualification on GetSmallInt function * [AD-550] implement ForeignKeysQuery::GetColumn * had formatting changes as well * [AD-550] update docs for foreign_keys_query.h * [AD-550] refine SQLForeignKey call * [AD-550] add draft foreign key test for JNI test * [AD-550] add test tables for jni test * [AD-550] update test TestDocumentDbDatabaseMetaDataGetImportedKeys * update test to query virtual table jni_test_001_sub_doc * [AD-550] add SQLForeignKeys sql api test * [AD-550] add logs for ReadForeignKeysColumnMetaVector * PK* variables will contain the list of foreign keys in the specified table * [AD-550] reformat jni_test * [AD-550] implement TestDatabaseMetaDataGetImportedKeys for java_test * [AD-550] add test document meta_queries_test_002_with_array * this document will be used to test SQLForeignKeys in meta_queries_test * [AD-550] refactor TestSQLForeignKeys test * reason: I see that `SQLCHAR empty[] = "";` is used in meta_queries_test, and I think that might be a better way of writing the parameters * [AD-550] add test for SQLForeignKeys in meta_queries_test tests added: * TestGetDataWithForeignKeysReturnsOneFromLocalServer * TestGetDataWithForeignKeysReturnsNone * they use test table meta_queries_test_002_with_array * [AD-550] clean up * add doc for SQLForeignKeys * remove comments * [AD-550] remove commented out code * [AD-550] remove unneeded commented out code * [AD-550] make ODBC pass nullptr for JString catalog and schema for SQLForeignKeys * in getImportedKeys, null boost::optional strings will be passed as nullptr to JDBC * make jni test and java test pass null boost::optional strings to JNI calls for getImportedKeys * ODBC now passes boost::optional strings foreignCatalog and foreignSchema to ExecuteGetForeignKeysQuery function. * [AD-550] add if check for sqlStrLen * if sqlString is empty, return boost::none * [AD-550] debug `choco install cppcheck -y` not working on GitHub Actions * [AD-550] add tests for testing empty string parameters * added Java test TestDatabaseMetaDataGetImportedKeysReturnsNone * added Jni test TestDocumentDbDatabaseMetaDataGetImportedKeysReturnsNone * [AD-550] disable cppcheck * created [AD-752](https://bitquill.atlassian.net/browse/AD-752) to investigate it further. * [AD-550] change the place for code doc for function SQLForeignKeys * [AD-550] update if statement check of SqlStringToOptString * to resolve code review comment * [AD-550] resolve code review comment * The sqlStrLen is an int32_t, so "!sqlStrLen" can be removed * [AD-550] make boost optional strings constant where needed * previously, I changed `const std::string` to `boost::optional< std::string >` in some areas, and this is now fixed by replacing the latter with `boost::optional< const std::string >` * [AD-550] SqlStringToOptString fix * also fixed SqlStringToConstOptString * reason: SQL_NTS is a flag that indicates that the string passed is a null-terminated string. * [AD-550] make tests pass null to SQLForeignKeys * [AD-550] add test case for TestGetDataWithForeignKeysReturnsNone * even with the correct table name, as long as empty strings are passed as catalog/schema, SQL_NO_DATA should be returned * [AD-550] update SqlStringToOptString * [AD-550] update TestSQLForeignKeys to pass NULL as parameters properly * [AD-550] move `const` out of `boost::optional< const std::string >` * reason: `const boost::optional< std::string >` works better than `boost::optional< const std::string >`. * this commit is to resolve code review comments * [AD-550] add meta_queries test that passes catalog as empty string * [AD-550] Set `fetched` to false in ForeignKeysQuery::Close() * [AD-550] add explicit conversion to boost::optional variable initialization * [AD-550] resolve code review comment * remove duplicate code * [AD-550] remove function * removed unneeded function: SqlStringToConstOptString * [AD-649] Add missing documentation (#29) ### Summary [AD-649] Add missing documentation ### Description Update ODBC driver documentation - [x] Documentation about connections string ( Parameters description) - [x] Documentation about DSN configuration window ( with screenshots) - [x] Documentation how the ODBC driver works ( ODBC and JDBC integration) - [x] Documentation what is supported ( link with JDBC driver) ### Related Issue https://bitquill.atlassian.net/browse/AD-649 * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 3f58b3995262c22dc6b411cd9e41a6ea38112844. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit ae1a6047bbab9b3dc8c7869b70c8d4499c6cc7cf. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 52eef4931e022553633b0c7f5f535b26e3b4f940. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 686aa59e7a473a4aa88e7c1e5f32264c3c71a40c. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit ff1729d46da780a3ed5654211487da066849ae95. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit b4a52d49eba77b8b409878c6d5e1b9ef2bba1750, reversing changes made to b4d20ff9c2a39de0fe89de14fd40db107b2e98b4. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 42dd752b23be78058f4b19c5386ac3f61281ff91. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * [AD-521] refactor - change case of ssh to SSH for consistency * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * Birschick bq/sync up (#21) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> * [AD-735] large dataset crash issue (#23) * first test * fix performance test crash * fix performance test crash * fix whitespace issue * rework based on comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * [AD-649] Add missing documentation (#73) * Initial user/developer documentation Co-authored-by: andiem-bq <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: affonsoBQ <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Alina (Xi) Li <[email protected]> Co-authored-by: RoyZhang2022 <[email protected]> * Fix README.md (#30) * Updating JDBC version (#72) * [AD-370] upload odbc driver build on push to develop (#71) * [AD-730] upload odbc driver build at push to develop * [AD-730] update github actions to upload with v3 * [AD-730] Test artifact upload action * temporarily comment out if statement guard to test upload-artifact github action * [AD-730] upload performance test executable * [AD-730] update readme * [AD-730] upload Release folder as artifact * our odbc needs more than just the ignite.odbc.dll to run properly * [AD-730] update to upload artifacts for release build * previously, I uploaded the Debug builds, but the Release build is the one that requires less dependencies. * [AD-730] add back if statment * add the if statement back in win-build.yml to ensure that the odbc driver performance artifact is only published when pushed to develop * [AD-730] fix typo of performance test plan * [AD-735] large dataset crash issue (#74) ### Summary ODBC driver will not run on large document tests ### Description The performance test crashes for large document tests. 1. The root cause is the wrong memory is passed to SQLBindCol(). The parameter TargetValuePtr is passed &cols[i][0].data_dat[i]. The i could exceed 255 for large table while its max valid value should be 254. The correct value should be 0. 2. The SQLExtendedFetch is deprecated. Replace it with SQLFetch. ### Related Issue https://bitquill.atlassian.net/browse/AD-735 * [AD-509] Update mac developer environment setup * Adjust formatting * Add note about llvm * Add note about iodbc * Update README.md change the install options for OpenSSL, since vcpkg is a preferred option * Update README.md remove the WiX Toolset v4 requirement * Update README.md add steps for the fix for ignite-odbc-tests.profraw error in README. * [AD-517] Remove old properties + add new properties * remove SSL settings and add TLS checkbox on the Configuration Window * add comments for my own work added some comments for my own convenience. Will remove later * fix tls checkbox on Configuration Window fixed by updating ChildId in tlsCheckBox = CreateCheckBox * add TlsAllowInvalidHostnames checkbox and TLS CA edit to the Configuration Window * Update configuration.cpp add comment to illustrate plan on what to do for the configuration window * Update dsn_configuration_window.cpp bugfix to make tlsCheckBox and tlsAllowInvalidHostnamesCheckBox read into the saved values * change defaultFetchSize to fetchSize in configuration.h * change Default DSN name to DocumentDB DSN * add App Name, Fetch Size, Read Preference, and login timeout to configuration window * [AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h Files that had the change connection_string_parser.cpp, connection_string_parser.h, dsn_config.cpp, batch_query.cpp, data_query.cpp. * [AD-522] save read preference settings * [AD-522] remove commented out code * [AD-522] Implement replicaSet and retryReads on Configuration Window * [AD-517] Re-enable unit tests - WIP - still need to cleanup * [AD-522] add space to code lines for format consistency in configuration_window.h * Add more unit tests * Remove extra file * [AD-522] Add small letter case to keep format consistency in dsn_configuration_window.h Add small letter case to keep format consistency in dsn_configuration_window.h fixed one typo (Create authentication settings group box) * Remove redundant declaration * [AD-522] add variable definitions for SSH tunnel settings for config UI * [AD-522] add function definition for SSH Tunnel 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. * [AD-522] code draft for configuration.cpp add draft variable definition to Enable ssh tunnel boolean value * Revert "change defaultFetchSize to fetchSize in configuration.h" This reverts commit 3f58b3995262c22dc6b411cd9e41a6ea38112844. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h" This reverts commit ae1a6047bbab9b3dc8c7869b70c8d4499c6cc7cf. * [AD-517] * Change the C++ version to use to compile. * [AD-522] change fetchSize to defaultFetchSize on configuration window for consistency with JDBC driver * [AD-517] * Changed checks.yml so that it doesn't fail on code review errors. * Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h"" This reverts commit 52eef4931e022553633b0c7f5f535b26e3b4f940. * [AD-522] make TLS allow invalid hostnames checkbox enabled only when tls Check box is checked * Revert "Revert "[AD-522] bugfix - change DefaultFetchSize to fetchSize in all related files to be consistent with configuration.h""" This reverts commit 686aa59e7a473a4aa88e7c1e5f32264c3c71a40c. * Improvements from review * Updated comments * [AD-522] save SSH values for re-read, make settings window into 2 columns 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. * Removed includes no longer being used in configuration.h * Some formatting improvements * [Ad-522] add sshEnable variable in DSN config - added sshEnable variable definition and getter/setter for sshEnable. - added code for parsing sshEnable in the connection string parser * [AD-522] change from GetSshEnable to IsSshEnable for consistency * [AD-522] comment out deprecated readPreference variable start on transitioning from readPreferenceEdit to readPreference combo box * [AD-522] add SSH enable checkbox, SSH private key passphrase, and SSH 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. * [AD-522] read_preference.h fix * 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 * [AD-522] update fields in configuration window * modified order of fields in the configuration window. - Retry reads checkbox is now in the first row under "Additional Settings". - SSH Strict host key check is now in the last row under "Internal SSH Tunnel Settings" - Allow invalid hostnames checkbox now is in 2nd row under "TLS/SSL settings" * added warning sentences for Allow invalid hostnames checkbox and SSH strict host key check * Improvements from code review + address some warnings * Change connection _test to use hostname key instead of address * Change connection_test to use databse key instead of schema key * [AD-522] implement read Preference * add SpaceToUnderscore function * implement read Preference in Config window and save the value * Attempt to fix windows 32 build * [AD-522] refactor dsn_configuration_window.cpp refactor code format; remove spaces and unnecessary comments * [AD-522] fix config window margins now the config window is symmetric * Fix formatting * [AD-522] add HasText() function to window.h * previously, the definition of HasText was mistakenly committed in commit ff1729d46da780a3ed5654211487da066849ae95. * add header of HasText() to resolve building errors in origin * update HasText() function to make code simpler * [AD-522] make "rs0" the default value of replicaSet * [AD-522] implement database, hostname, port fields. And disable ok button unless all required fields are filled * implement database, hostname, port fields. * disable ok button unless all required fields (database, hostname, port, username, password) are filled * added boolean created to indicate whether the configuration window has been created. If has, then check for disabling/enabling the Ok button * [AD-522] rename SSH Known Hosts File label for clarity * [AD-522] refactor logs for retrieving TSL settings Make the sentences align * [AD-522] rename TLS CA File label for clarity * change label length to the same label length as connection settings group * [AD-522] move authorization setting fields to connection fields reason: only username and password are authorization settings, the rest are not. We chose to put username, password in the connections group because all fields in the connections group are required. * [AD-522] bugfix-comment out address field related code in RetrieveConnectionParameters * [AD-522] rename sslSettings to tlsSettings and add comment for connection settings group * [AD-522] remove protocol version from config window * [AD-522] bug fix sshKnownHostsFile not saved when Ok button is pressed * [AD-522] remove commented out #include headers * [AD-522] disable SSH Known Hosts File edit when SSH Strict Host Key Check check box is unchecked * move SSH Strict Host Key Checking check box above SSH Known Hosts File edit in the config window * [AD-522] refactor - remove commented out header code * [AD-522] add comments in configuration.cpp for planning * modify commented out example code in dsn_configuration_window.cpp for clarity * [AD-522] change from SSL to TLS for consistency * SSL_SETTINGS_GROUP_BOX is changed to TLS_SETTINGS_GROUP_BOX * [AD-522] remove commented out code Removed commented out code: * RetrieveAuthParameters * CreateAuthSettingsGroup * CreateAdditionalSettingsGroup function and CreateSslSettingsGroup function for 1 column window * protocol version - related code * authSettingsGroupBox code * [AD-522] remove std::auto_ptr<Window> authSettingsGroupBox; * [AD-522] remove address field auto pointer initialization * [AD-522] remove address field from config window constructor * [AD-522] refactor - remove unneeded commented out code in HasText * [AD-522] refactor - remove white spaces and update comment * [AD-522] debug scan_method.h * SpaceToUnderscore is called in scan_method.cpp to make reads better * added guards to scan_method.h * [AD-522] implement Schema group settings box * fixed bug in dsn_config.cpp to save scanLimit correctly * [AD-522] update readPreference default value to unknown * removed unneeded commented out code * removed unnecessary code to get string value on readPreference * [AD-522] refactor - remove unnecessary comments * [AD-522] adjust window size and additional settings group label size * additional settings group label size is now the same as other settings group in the same column * Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window" This reverts commit b4a52d49eba77b8b409878c6d5e1b9ef2bba1750, reversing changes made to b4d20ff9c2a39de0fe89de14fd40db107b2e98b4. * [AD-522] keyboard user interface design + disable DSN empty strimg warning dialog * make cursor go to checkboxes on the Config window and not skip them when tab key is pressed * when DSN field is empty, Ok Button is disabled * make default replicaSet value empty string (default is disable repliaSet) * refactor - removed unneeded comments * [AD-522] add end_point header to resolve build errors end_point related code still exist in connection.cpp, so I readded the header for end_point * Revert "Revert "Merge branch 'develop' into alinaliBQ/AD-522/config_window"" This reverts commit 42dd752b23be78058f4b19c5386ac3f61281ff91. * [AD-522] resolve errors after merging develop branch * GetAddresses() is deprecated, replaced it with GetHostname() and GetTcpPort() to get hostname and port number, respectively. * replaced GetSchema() with GetSchemaName() * removed commented out code * refactor with dsn_configuration_window.cpp * [AD-512] Resolve issue with missing include file. * [AD-522] make BoolParseResult recognizable * [AD-522] fix build errors after develop branch merge * update schema checkbox string * make edit row height single * update SetTcpPort to SetPort etc * define default value for sshEnable * [AD-522] enable encrypt password for ssh private key passphrase * modify refresh schema checkbox string to fit better * remove log message for ssh private key passphrase to increase security * [AD-521] add comments and notes for starting AD-521 * [AD-509] update readMe to include directions about saving Java bin and server directories. * reason: ODBC JNI calls have a dependency on `jvm.dll`, as a result, the ODBC driver cannot operate properly unless the Java bin and server directories are included in the path. * [AD-522] reduce space between ssh private key passphrase and the checkbox below * [AD-521] define constants for Java GetSshLocalPort method call * [AD-521] integrate code review feedback from Andie * refactors with comment changes and log changes * [AD-521] refactor code * make open brace bracket start on new line for JVMException * remove excess space * [AD-427] Tracer Code - Limited Capability to load metadata - work-in-progress. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-427] Fix Windows build. * [AD-522] remove space and add new line at the end of enum types * [AD-522] add new lines at the end of Enum type files * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] add changes for Java.cpp from Bruce's AD-427 branch * those changes are not included in the previous merge, and are now added * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-427] Fix Mac build. * [AD-521] JNI wrapper calls to iSshTunnelActive and getSshLocalPort * some draft comments are left to be cleaned up * [AD-521] debug getSshLocalPort * change function type signature from optional to int * refactor - remove comments * [AD-521] change return value in getSshLocalPort from boolean to a 0 * try to fix access memory issue in TestDriverManagerGetConnection * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetada…
…tion. (#133) * Enable CodeCoverage (#29) * enabling publishing code coverage results * Enable CodeCoverage (#29) * enabling publishing code coverage results * Enable cppcheck in windows build (#33) * removing thin-client and thin-client-test * enabling cppcheck * Enable cppcheck in windows build (#33) * removing thin-client and thin-client-test * enabling cppcheck * [AD-543] Adaption SQLColumns Return Columns metadata (#30) * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * fixing connection uri and instance ptr * fixing merge connection string * refactoring fixing mongo instance happen more than once * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * fixing mac run test error * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * cmakelist cleanup * [AD-521] Updated JDBC driver version. (#19) ### Summary [AD-521] Updated JDBC driver version. ### Description * Updated JDBC driver version to 1.1.1 ### Related Issue https://bitquill.atlassian.net/browse/AD-521 * [AD-490] Add performance test. (#15) * Add performance test. * Replace include header odbcinst.h with odbc_constants.h. * Revert header file odbc_constant.h to odbcinst.h. * Include odbcinst.h for windows only. * Revert: include odbcinst.h for windows only. * Update performance test cmake file to include ODBC_INCLUDE_DIRS. * Update performance test cmake file to find package ODBC REQUIRED. * Fix error in performance_test_runner.cpp. * Link to performance test to odbc library in cmake file. * Link performance test to odbc library for windows. * Update checks.yml to continue on error. * Change PerformanceTests to tests. * Change PerformanceTests to tests in file performance_test_runner.h. * Update Java installation instructions. * Update comments. * Deallocate env, stmt, conn handles in functions when no longer needed. * Restructure perf test folder (lib, include, src sub directories created). * Rename 'it_odbc_helper.(h,cpp)' to 'performance_odbc_helper.(h,cpp)'. * Add new line at end of file. * Deallocate conn, env, stmt handles appropriately. Capitilize first letter of function names. * Update perf test documentation. * Use cmake latest for windows build. * Remove dsn_config.cpp from mac builds. * Attempt to fix mac build error. * Revert: Attempt to fix mac build error. * 2nd attempt to fix mac build error. * Attempt to fix macos build. * Attempt to fix macos build. * Attempt to fix macos build. * Attempt to fix macos build. * Include link to csv parser github repo in NOTICE file. * Add newline at EOF. * Remove try catch blocks for catching all errors and rethrowing same error. Replace NULL with nullptr. * Revert name change for CSV parser NOTICE file back to LICENSE file. * [AD-521] Updated JDBC driver version - part 2. (#20) ### Summary [AD-521] Updated JDBC driver version - part 2. ### Description Add update to 2 YAML files that it picks it up in GitHub workflow. ### Related Issue https://bitquill.atlassian.net/browse/AD-521 * Update CMakeLists.txt Removing changes from networklib * WIP - Add building jdbc connection string from config * [AD-521] refactor - change case of ssh to SSH for consistency * reverting dummy_test changing boost link on odbc_test * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-543] JNI wrapper code for DatabaseMetaDataGetColumns * [AD-543] unit test for DatabaseMetaData.getColumns looks at: * TABLE_CAT, TABLE_SCHEM, TABLE_NAME, COLUMN_NAME, ORDINAL_POSITION * [AD-523] Internal SSH tunnel tests passing again but more tests needed * Adjust tests - all tests passing again but need to add more * minor refactoring, added error handling integrated with ssh internal tunnel feature * [AD-543] implement ResultSetGetShort * JNI wrapper code for both getShortByIndex and getShortByName methods from resultSet class are implemented * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * fixing nits * removing unecessary changes extracting get ssh tunnel port to its own method * removing extra line * [AD-543] implement ResultSet.getRow() Jni wrapper code * this function is for getting the number of rows in the resultSet. The row number on the last row would be the size of the resultSet * unit test included by calling getRow in TestDatabaseMetaDataGetTables and TestDatabaseMetaDataGetColumns * [AD-543] implement unit test for getShort function * [AD-543] Define different enum types * changing parameters ordering * changing some names * Add tests * [AD-543] update clang format * [AD-543] change format for column_meta.h to comply with Google style * [AD-543] update draft code * change ReadColumnMetaVector function to receive a resultSet object instead of original ignite parameters * [AD-543] change format for column_meta.h to comply with Google style on more files * [AD-543] formatting change * [AD-543] adapt ColumnsMetaQuery to accept catalog as a parameter Functions affected: * ColumnMetadataQuery * ExecuteGetColumnsMetaQuery * InternalExecuteGetColumnsMetaQuery Reason for change: since the JNI call to getColumns accepts catalog as a parameter, it is required for those 3 functions to essentially pass catalog as a parameter as well, even though the JDBC driver doesn't actually deal with the value of catalog. JNI call is to be implemented in later commits. * [AD-543] format change on column_meta.cpp * [AD-543] remove JNI wrapper code for getShort and its unit test reason: getShort JNI wrapper method call was implemented with the intent to use it for column metadata value SOURCE_DATA_TYPE (for getting the column metadata from the resultSet returned by getColumns), which is a short. However, ODBC driver does not need SOURCE_DATA_TYPE, thus getShort is of no use to JDBC at this point and should be removed. * [AD-543] remove unneeded JDBC enum values * those values will not be needed in ODBC * [AD-543] update formatting of column_metadata_query.cpp * [AD-543] add skeleton code for getColumn * Remove unintended changes * Add additional tests * Revert "Merge branch 'affonsov/ad-516/mongocpp-tracercode' into andiem/ad-523/integrate_dsn_settings" This reverts commit 6d3fc50d8c74e10840fcae6ce60d5e0cddc89d08, reversing changes made to a399cdc7305083d1583d5ecb3c99505d5a7b8bf6. * [AD-543] add JDBC types to ODBC * the values are copied from the JdbcType Enum class in JdbcTye.java file in DocumentDB JDBC driver codebase * [AD-543] implement BinaryToSqlType function to switch on JDBC type values * Revert merge with mongocpp tracer code * [AD-543] build error fix: change JDBC type from int8_t to int16_t * some of the values of JDBC Type (e.g.,2009, 2012) would overflow if the value is int8_t. * return type for function SqlTypeToBinary (which returns JDBC type) is changed to int16_t as well * [AD-543] add catalog as parameter to ExecuteGetColumnsMetaQuery * Add ssh tunnel to github workflows * [AD-543] fix build errors on git remote * calls ReadColumnMetaVector with 2 arguments instead of 3 * define ReadColumnMetaVector function * [AD-543] make SqlTypeToBinary return int16_t instead * Update .clang-format change indent width and tab width back to 4 * Fix mac build errros * [AD-543] make ReadOnSuccess accept resultSet as a parameter * Fix mac build errors * [AD-543] make BinaryToSqlType accept int16_t as parameter because JDBC binary types are int16_t * [AD-543] construct resultSet global object in MakeRequestGetColumnsMeta * [AD-543] implement SqlToBinaryType function * default return type is Jdbc binary * make function return inside the switch statement to make it consistent with other functions in type_traits name space * [AD-543] in BinaryToSqlType, map Jdbc type ROWID to SQL binary * map JDBC numeric to SQL numeric * and refactor changes: remove white space * [AD-543] update IsSqlTypeSupported to align with SqlToBinaryType function * some reordering occurred to match the ordering of SqlToBinaryType function * SQL_REAL and SQL_NUMERIC become supported, but SQL_GUID is no longer supported * [AD-543] update BinaryTypeToSqlTypeName parameter type from int8_t to int16_t * [AD-543] implement BinaryTypeToSqlTypeName * [AD-543] map Jdbc type VARBINARY to SQL_BINARY in BinaryToSqlType * [AD-543] refactor: move comment to show ignite original code * [AD-543] define SqlTypeName constants * added constants: REAL, NUMERIC, LONGVARCHAR, LONGVARBINARY, SQL_NULL * [AD-543] update SqlTypeColumnSize * added case for SQL NULL type (return 1) * [AD-543] replace Ignite type constants with Documentdb Jdbc type constants in type_info_query.cpp * [AD-543] update SqlTypeTransferLength * added case for SQL NULL type (return 1) * [AD-543] remove redundant return statement in BinaryTypeToSqlTypeName * update SqlTypeDisplaySize * added case for SQL NULL type (return 1) * [AD-543] implement BinaryTypeColumnSize to adapt Jdbc column_size mapping * [AD-543] move using namespace statement to be global instead of inside local functions * [AD-543] mark sql tinyint type as unsigned * previously in Ignite, boolean False (which stands for the type being signed) is returned for SQL tinyint type. However, tinyint has value range (0,255), so it is in fact unsigned * [AD-543] add documentation warnings * warnings for syncing JDBC type values on the ODBC when any changes occur on the JDBC side. * [AD-543] update functions to match Bruce's (AD-594) changes * make ResultSetGetRow and ResultSetGetColumns return JniErrorCode instead of boolean * [AD-543] refactor ResultSetGetColumns function * [AD-543] update java_test to check JniErrorCode * [AD-543] adapt BinaryTypeColumnSize * SQL_DESC_LENGTH is returned for SQL character types * removed JDBC type mapping to column size because that was not needed * [AD-543] update SqlTypeColumnSize and SqlTypeTransferLength * group SQL_LONGVARCHAR with other character types * comment out the return of SQL_DESC_LENGTH in SqlTypeColumnSize because unsure what to return at this point. See comment. * comment out the return of SQL_DESC_OCTET_LENGTH in SqlTypeTransferLength because unsure what to return at this point. See comment. * [AD-543] return false for case SQL_TINYINT in SqlTypeUnsigned * [AD-543] update SqlTypeDisplaySize * group SQL_LONGVARCHAR with other character types * Improvements from code review * Remove unecessary change * [AD-543] change parameter type from int8_t to int16_t * Fix unit tests * Add ssh tunnel instructions to readme * [AD-543] remove comments * commented out code removed in type_traits namespace * [AD-543] change dataType parameter to int16_t * [AD-543] remove todo comments * [AD-543] remove or comment out code in message.cpp code that is removed/commented out: * ReadOnSuccess function. Reason: we don't have a reason to check if the read is successful with our current implementation. * QueryGetColumnsMetaResponse class. * [AD-543] adapt MakeRequestGetColumnsMeta * define GetColumn function * change the type of connection from SharedPointer object back to Connection object * [AD-543] remove comments in MakeRequestGetColumnsMeta * [AD-543] change connection object type in function header * Connection type should be the type for connection * [AD-543] replace Ignite type constants with DocDb type constants * [AD-543] add header files to include * [AD-543] remove columnsResultSet from statement.h * [AD-543] change parameter type in type_traits change parameter type from int8_t to int16_t for functions that accept the binary type, since DocDb Jdbc type constants are int16_t * [AD-543] implement NullabiltyToIsNullable * NullabiltyToIsNullable receives a nullablility value and returns a string. * call GetNullability in column_metadata_query because nullability would be saved * [AD-543] bugfix in MakeRequestGetColumnsMeta * call ReadColumnMetaVector instead of ReadTableMetaVector in MakeRequestGetColumnsMeta * implement ReadColumnMetaVector using ReadTableMetaVector as example * [AD-543] implement BinaryTypeCharOctetLength * for charOctetLength, the maximum length in bytes of a character or binary data type column. For all other data types, this column returns a NULL. * [AD-543] bugfix GetColumns * refactor: parameter name changed from column to coulmnNamePattern * fix typo * [AD-543] bugfix linking error * [AD-543] bugfix linking error * since the definition of the function is removed, the header file should also be gone * [AD-543] bugfix linking error * corrected function header to match the header in column_meta.h * [AD-543] implement getRemarks for column_meta * [AD-543] adapt Read function in column_meta * [AD-543] bugfix java.h header * change code to match header in java.cpp * [AD-543] bugfix: change data type update dataType to int16_t to match DocDb Jdbc Type constnats in binary_common.h * [AD-523] add using statement * add using statement for ignite::common::EncodeURIComponent. * [AD-543] add todo comment for datetime sub code * [AD-543] save ORDINAL_POSITION * GetOrdinalPosition implemented * meta::Read function is modified to accept previously recorded ordinal position as a parameter * Read function now reads ORDINAL_POSITION value from resultSet * [AD-543] add jira link for todo in comment * the link for implementing BinaryTypeDateTimeSub is added * [AD-543] refactor * [AD-543] update todo comments * added jira link for AD-615 * removed finished todo * [AD-543] save catalogName * GetCatalogName implemented * Read function now reads TABLE_CAT value from resultSet * [AD-543] add documentation for parameters in Read * [AD-543] save columnDef * GetColumnDef implemented * Read function now reads COLUMN_DEF value from resultSet * [AD-543] remove finished todo comment * [AD-543] save values in copy constructor and copy operator * add cataloName, columnDef, and ordinalPosition to be copied in the ColumnMeta copy constructor and copy operator * [AD-543] remove comments * removed commented out code * remove todo statement for making Jdbc type definition into a enum. That can be done in future tasks * [AD-543] remove comments * removed commented out code * [AD-543] replace Ignite type with Jdbc type * change occurred in table_metadata_query.cpp * [AD-543] * Added tests for getColumns and SQLColumns. * [AD-543] update columnsMeta * added COLUMN_DEF, SQL_DATA_TYPE, SQL_DATETIME_SUB, CHAR_OCTET_LENGTH, ORDINAL_POSITION to columnsMeta * reformatted push_back code calls for consistency * columnsMeta is a meta::ColumnMeta object that stores the metadata for the column metadata * [AD-543] add comments * the comments will be removed in later commits. However, I wanted to push it to keep a record * [AD-543] remove comments and commented out code * [AD-543] remove todo comments and code comment * [AD-543] implement unit tests * implement TestGetDataWithColumnsReturnsNone * implement TestGetDataWithColumnsReturnsMany * [AD-543] remove comments * [AD-543] refactor * [AD-543] * Improved test for SQLColumns. * [AD-543] * Improved test for SQLColumns. * [AD-543] remove unneeded comment * [AD-543] * Improved test for SQLColumns. * [AD-543] * Improved test for SQLColumns. * [AD-543] * Improved test for SQLColumns. * [AD-543] code review fix * replace DOCUMENTDB_JDBC_TYPE* with JDBC_TYPE_* * [AD-543] bugfix - copy dataType value * [AD-543] resolve NumPrecRadix test error * make SqlTypeNumPrecRadix return -1 on default, so that a null would be put in the buffer if num_prec_radix does not apply to the column, and the meta query test would pass. * [AD-543] reduce warning * initialize ordinalPosition variable * [AD-543] update meta_queries_test * SQL_NO_TOTAL is expected for column size, buffer length, and char octet length * [AD-543] Bugfix meta_queries_test * change buffer length type to SQL_INTEGER in the SQLBindCol function call * sql_data_type should have the same values as data_type * [AD-543] address code review comments * comment changes * typo fix * remove const as return type for NullabilityToIsNullable * [AD-543] code review change * add src/odbc/include/ignite/impl/binary/binary_common.h * modify include statements: replace include of ignite/impl/binary/binary_common.h with ignite/odbc/impl/binary/binary_common.h * [AD-543] add binary_common file under odbc and add include statements * [AD-543] copy impl/binary and impl/interop * some files are modified to be under ODBC namespace, and some files haven't been modified * [AD-543] remove odbc/binary folder * it was a mistake an unnecessary * [AD-543] refactor - format files in odbc/impl/binary * change the namespace from ignite::impl to ignite::odbc::impl * [AD-543] refactor - format files in odbc/impl/interop * change the namespace from ignite::impl to ignite::odbc::impl * [AD-543] remove binary_type_impl because it is not required * [AD-543] update files to look into ignite::odbc namespace * Revert "[AD-543] remove binary_type_impl because it is not required" This reverts commit 819a99b7d2e796dda99156fa6e254f3655a389f6. * [AD-543] remove include from jni_test * removed ignite::impl::binary namespace because it is not needed * [AD-543] copy binary_type file into odbc namespace * [AD-543] refactor include statements into odbc namespace * [AD-543] refactor namespace to be under odbc * [AD-543] refactor changes * [AD-543] refactor changes * [AD-543] refactor - copy files * copy binary/ files that are included in binary_reader_impl.h to odbc/ * [AD-543] refactor copied binary/ files * refactor the files to be under odbc namespace * [AD-543] refactor binary_reader_impl.h * [AD-543] refactor -> copy files * copy ignite/ files that are included in binary_reader_impl.h to ignite/odbc/ * [AD-543] refactor copied ignite/ files * refactor the files to be under odbc namespace * refactor document of odbc/binary/ files * [AD-543] update include statements to include files under odbc * [AD-543] copy ignite/binary/ files to ignite/odbc/binary/ * [AD-543] refactor copied ignite/binary/ files * refactor the files to be under odbc namespace * [AD-543] remove reference to namespace ignite::impl::binary * [AD-543] copy ignite/binary files to ignite/odbc/binary * [AD-543] refactor copied ignite/binary/ files * refactor the files to be under odbc namespace * [AD-543] code change from code review comment * [AD-543] change odbc files to use odbc namespace * [AD-543] refactor * update include statements to be in odbc namespace * [AD-543] refactor changes * [AD-543] copy .cpp files to odbc folder * [AD-543] refactor copied files * refactor the files to be under odbc namespace * [AD-543] refactor objects under odbc space * [AD-543] add using statement * reason: on GitHub Actions, errors show when the complier thinks ignite::IgniteError is used instead of ignite::odbc::IgniteError. * [AD-543] refactor include statements * refactored to include header files from odbc/binary_common.h * refactored ignite::impl to ignite:odbc::impl * [AD-543] refactor changes * add using odbc namespace statements * [AD-543] modify cmakelist * included newly copied .cpp files * [AD-543] refactor column_test * [AD-543] refactor changes * [AD-543] address code review comments * add new line at end of file * move { to be on the same line * [AD-543] fix typo in test names * [AD-543] address code review comments * [AD-543] address code review comment * simply to nullptr * [AD-543] improvement from code review * [AD-543] change SQL_FLOAT back to 4 bytes * [AD-543] simplify resultSet object creation * [AD-543] indicate nullability property * changed ColumnMeta constructor to include nullability as a parameter. * nullability property is implemented in column_metadata_query.cpp and table_metadata_query.cpp. * issue AD-626 created for indicating the nullability in files type_info_query.cpp, special_coulmns_query.cpp, primary_keys_query.cpp, and foreign_keys_query.cpp: https://bitquill.atlassian.net/browse/AD-626 * [AD-543] improvements from code review comments * change nullability to NO_NULL for TABLE_NAME and TABLE_TYPE * [AD-543] refactor from code review comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Affonso Vieira <[email protected]> Co-authored-by: Gary Atwal <[email protected]> * [AD-543] Adaption SQLColumns Return Columns metadata (#30) * [AD-522] resolve build errors after merge * fix bug for schema name not correctly loaded on the config window * removed unnecessary headers * [AD-427] Added ResultSet.next and ResultSet.GetString() * [AD-522] address code review comments * change to enum class type for read_preference.h and scan_method.h * change the way enum class objects are read * add static cast to enum types so SetSelection function can work with it * refactor - removed unnecessary comments * refactor - changes code doc in connection_string_parser.h * [AD-521] implement tests for JNI wrapper code * test for TestDocumentDbConnectionGetSshTunnelPortSshTunnelNotActive is not yet active, need to be enabled when we can get external SSH tunnel working. * bug fix: re-implemented DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. connection.Get()->GetRef() is passed as first parameter because jobject is required for CallIntMethod and CallBooleanMethod. * better JNI wrapper code is needed in the future so warnings/errors pop up when we pass jobject instead of jclass to the methods. * [AD-521] refactor - remove comments and commented out code * fixing connection uri and instance ptr * fixing merge connection string * refactoring fixing mongo instance happen more than once * [AD-589] implement JNI method call for GetDatabaseMetadata * define the method constant for DocumentDbConnection.getDatabaseMetadata() * create JNI wrapper function for DocumentDbConnection.getMetaData * [AD-589] implement unit test for DocumentDbConnection.getMetaData * fixing mac run test error * [AD-521] add calls to AutoCloseConnection in unit tests * pass & errInfo instead of * errInfo in DocumentDbConnectionGetSshLocalPort and DocumentDbConnectionIsSshTunnelActive. * [AD-521] remove unnecessary comment * [AD-589] fix merge issues * I missed this part of code when I was resolving the merge conflicts. Now they are corrected * [AD-589] update getMetaData JNI wrapper code to pass &errInfo * implement unit test for getMetaData * [AD-589] implement JNI wrapper for DocumentDbDatabaseSchemaMetadataGetSchemaName * implement Java class for * define constant for DocumentDbDatabaseSchemaMetadataGetSchemaName * add empty test function for TestDocumentDbDatabaseSchemaMetadataGetSchemaName * [AD-589] implement unit test for DbDatabaseSchemaMetadataGetSchemaName * cmakelist cleanup * [AD-521] Updated JDBC driver version. (#19) ### Summary [AD-521] Updated JDBC driver version. ### Description * Updated JDBC driver version to 1.1.1 ### Related Issue https://bitquill.atlassian.net/browse/AD-521 * [AD-490] Add performance test. (#15) * Add performance test. * Replace include header odbcinst.h with odbc_constants.h. * Revert header file odbc_constant.h to odbcinst.h. * Include odbcinst.h for windows only. * Revert: include odbcinst.h for windows only. * Update performance test cmake file to include ODBC_INCLUDE_DIRS. * Update performance test cmake file to find package ODBC REQUIRED. * Fix error in performance_test_runner.cpp. * Link to performance test to odbc library in cmake file. * Link performance test to odbc library for windows. * Update checks.yml to continue on error. * Change PerformanceTests to tests. * Change PerformanceTests to tests in file performance_test_runner.h. * Update Java installation instructions. * Update comments. * Deallocate env, stmt, conn handles in functions when no longer needed. * Restructure perf test folder (lib, include, src sub directories created). * Rename 'it_odbc_helper.(h,cpp)' to 'performance_odbc_helper.(h,cpp)'. * Add new line at end of file. * Deallocate conn, env, stmt handles appropriately. Capitilize first letter of function names. * Update perf test documentation. * Use cmake latest for windows build. * Remove dsn_config.cpp from mac builds. * Attempt to fix mac build error. * Revert: Attempt to fix mac build error. * 2nd attempt to fix mac build error. * Attempt to fix macos build. * Attempt to fix macos build. * Attempt to fix macos build. * Attempt to fix macos build. * Include link to csv parser github repo in NOTICE file. * Add newline at EOF. * Remove try catch blocks for catching all errors and rethrowing same error. Replace NULL with nullptr. * Revert name change for CSV parser NOTICE file back to LICENSE file. * [AD-521] Updated JDBC driver version - part 2. (#20) ### Summary [AD-521] Updated JDBC driver version - part 2. ### Description Add update to 2 YAML files that it picks it up in GitHub workflow. ### Related Issue https://bitquill.atlassian.net/browse/AD-521 * Update CMakeLists.txt Removing changes from networklib * WIP - Add building jdbc connection string from config * [AD-521] refactor - change case of ssh to SSH for consistency * reverting dummy_test changing boost link on odbc_test * [AD-589] address code review comments * rename DocumentDbConnectionGetMetaData to DocumentDbConnectionGetDatabaseMetaData * [AD-589] change case from MetaData to Metadata to match Java method name * [AD-543] JNI wrapper code for DatabaseMetaDataGetColumns * [AD-543] unit test for DatabaseMetaData.getColumns looks at: * TABLE_CAT, TABLE_SCHEM, TABLE_NAME, COLUMN_NAME, ORDINAL_POSITION * [AD-523] Internal SSH tunnel tests passing again but more tests needed * Adjust tests - all tests passing again but need to add more * minor refactoring, added error handling integrated with ssh internal tunnel feature * [AD-543] implement ResultSetGetShort * JNI wrapper code for both getShortByIndex and getShortByName methods from resultSet class are implemented * [AD-589] refactor: change from metaData to metadata changes occurred in: * DocumentDbConnectionGetDatabaseMetadata * DocumentDbDatabaseSchemaMetadataGetSchemaName * TestDocumentDbConnectionGetDatabaseMetadata * TestDocumentDbDatabaseSchemaMetadataGetSchemaName * fixing nits * removing unecessary changes extracting get ssh tunnel port to its own method * removing extra line * [AD-543] implement ResultSet.getRow() Jni wrapper code * this function is for getting the number of rows in the resultSet. The row number on the last row would be the size of the resultSet * unit test included by calling getRow in TestDatabaseMetaDataGetTables and TestDatabaseMetaDataGetColumns * [AD-543] implement unit test for getShort function * [AD-543] Define different enum types * changing parameters ordering * changing some names * Add tests * [AD-543] update clang format * [AD-543] change format for column_meta.h to comply with Google style * [AD-543] update draft code * change ReadColumnMetaVector function to receive a resultSet object instead of original ignite parameters * [AD-543] change format for column_meta.h to comply with Google style on more files * [AD-543] formatting change * [AD-543] adapt ColumnsMetaQuery to accept catalog as a parameter Functions affected: * ColumnMetadataQuery * ExecuteGetColumnsMetaQuery * InternalExecuteGetColumnsMetaQuery Reason for change: since the JNI call to getColumns accepts catalog as a parameter, it is required for those 3 functions to essentially pass catalog as a parameter as well, even though the JDBC driver doesn't actually deal with the value of catalog. JNI call is to be implemented in later commits. * [AD-543] format change on column_meta.cpp * [AD-543] remove JNI wrapper code for getShort and its unit test reason: getShort JNI wrapper method call was implemented with the intent to use it for column metadata value SOURCE_DATA_TYPE (for getting the column metadata from the resultSet returned by getColumns), which is a short. However, ODBC driver does not need SOURCE_DATA_TYPE, thus getShort is of no use to JDBC at this point and should be removed. * [AD-543] remove unneeded JDBC enum values * those values will not be needed in ODBC * [AD-543] update formatting of column_metadata_query.cpp * [AD-543] add skeleton code for getColumn * Remove unintended changes * Add additional tests * Revert "Merge branch 'affonsov/ad-516/mongocpp-tracercode' into andiem/ad-523/integrate_dsn_settings" This reverts commit 1976ecbd966834d0da26eb959af04f1b517d9894, reversing changes made to 398b1fb39dd4b277c0a124e01d96b5d5e65db3ac. * [AD-543] add JDBC types to ODBC * the values are copied from the JdbcType Enum class in JdbcTye.java file in DocumentDB JDBC driver codebase * [AD-543] implement BinaryToSqlType function to switch on JDBC type values * Revert merge with mongocpp tracer code * [AD-543] build error fix: change JDBC type from int8_t to int16_t * some of the values of JDBC Type (e.g.,2009, 2012) would overflow if the value is int8_t. * return type for function SqlTypeToBinary (which returns JDBC type) is changed to int16_t as well * [AD-543] add catalog as parameter to ExecuteGetColumnsMetaQuery * Add ssh tunnel to github workflows * [AD-543] fix build errors on git remote * calls ReadColumnMetaVector with 2 arguments instead of 3 * define ReadColumnMetaVector function * [AD-543] make SqlTypeToBinary return int16_t instead * Update .clang-format change indent width and tab width back to 4 * Fix mac build errros * [AD-543] make ReadOnSuccess accept resultSet as a parameter * Fix mac build errors * [AD-543] make BinaryToSqlType accept int16_t as parameter because JDBC binary types are int16_t * [AD-543] construct resultSet global object in MakeRequestGetColumnsMeta * [AD-543] implement SqlToBinaryType function * default return type is Jdbc binary * make function return inside the switch statement to make it consistent with other functions in type_traits name space * [AD-543] in BinaryToSqlType, map Jdbc type ROWID to SQL binary * map JDBC numeric to SQL numeric * and refactor changes: remove white space * [AD-543] update IsSqlTypeSupported to align with SqlToBinaryType function * some reordering occurred to match the ordering of SqlToBinaryType function * SQL_REAL and SQL_NUMERIC become supported, but SQL_GUID is no longer supported * [AD-543] update BinaryTypeToSqlTypeName parameter type from int8_t to int16_t * [AD-543] implement BinaryTypeToSqlTypeName * [AD-543] map Jdbc type VARBINARY to SQL_BINARY in BinaryToSqlType * [AD-543] refactor: move comment to show ignite original code * [AD-543] define SqlTypeName constants * added constants: REAL, NUMERIC, LONGVARCHAR, LONGVARBINARY, SQL_NULL * [AD-543] update SqlTypeColumnSize * added case for SQL NULL type (return 1) * [AD-543] replace Ignite type constants with Documentdb Jdbc type constants in type_info_query.cpp * [AD-543] update SqlTypeTransferLength * added case for SQL NULL type (return 1) * [AD-543] remove redundant return statement in BinaryTypeToSqlTypeName * update SqlTypeDisplaySize * added case for SQL NULL type (return 1) * [AD-543] implement BinaryTypeColumnSize to adapt Jdbc column_size mapping * [AD-543] move using namespace statement to be global instead of inside local functions * [AD-543] mark sql tinyint type as unsigned * previously in Ignite, boolean False (which stands for the type being signed) is returned for SQL tinyint type. However, tinyint has value range (0,255), so it is in fact unsigned * [AD-543] add documentation warnings * warnings for syncing JDBC type values on the ODBC when any changes occur on the JDBC side. * [AD-543] update functions to match Bruce's (AD-594) changes * make ResultSetGetRow and ResultSetGetColumns return JniErrorCode instead of boolean * [AD-543] refactor ResultSetGetColumns function * [AD-543] update java_test to check JniErrorCode * [AD-543] adapt BinaryTypeColumnSize * SQL_DESC_LENGTH is returned for SQL character types * removed JDBC type mapping to column size because that was not needed * [AD-543] update SqlTypeColumnSize and SqlTypeTransferLength * group SQL_LONGVARCHAR with other character types * comment out the return of SQL_DESC_LENGTH in SqlTypeColumnSize because unsure what to return at this point. See comment. * comment out the return of SQL_DESC_OCTET_LENGTH in SqlTypeTransferLength because unsure what to return at this point. See comment. * [AD-543] return false for case SQL_TINYINT in SqlTypeUnsigned * [AD-543] update SqlTypeDisplaySize * group SQL_LONGVARCHAR with other character types * Improvements from code review * Remove unecessary change * [AD-543] change parameter type from int8_t to int16_t * Fix unit tests * Add ssh tunnel instructions to readme * [AD-543] remove comments * commented out code removed in type_traits namespace * [AD-543] change dataType parameter to int16_t * [AD-543] remove todo comments * [AD-543] remove or comment out code in message.cpp code that is removed/commented out: * ReadOnSuccess function. Reason: we don't have a reason to check if the read is successful with our current implementation. * QueryGetColumnsMetaResponse class. * [AD-543] adapt MakeRequestGetColumnsMeta * define GetColumn function * change the type of connection from SharedPointer object back to Connection object * [AD-543] remove comments in MakeRequestGetColumnsMeta * [AD-543] change connection object type in function header * Connection type should be the type for connection * [AD-543] replace Ignite type constants with DocDb type constants * [AD-543] add header files to include * [AD-543] remove columnsResultSet from statement.h * [AD-543] change parameter type in type_traits change parameter type from int8_t to int16_t for functions that accept the binary type, since DocDb Jdbc type constants are int16_t * [AD-543] implement NullabiltyToIsNullable * NullabiltyToIsNullable receives a nullablility value and returns a string. * call GetNullability in column_metadata_query because nullability would be saved * [AD-543] bugfix in MakeRequestGetColumnsMeta * call ReadColumnMetaVector instead of ReadTableMetaVector in MakeRequestGetColumnsMeta * implement ReadColumnMetaVector using ReadTableMetaVector as example * [AD-543] implement BinaryTypeCharOctetLength * for charOctetLength, the maximum length in bytes of a character or binary data type column. For all other data types, this column returns a NULL. * [AD-543] bugfix GetColumns * refactor: parameter name changed from column to coulmnNamePattern * fix typo * [AD-543] bugfix linking error * [AD-543] bugfix linking error * since the definition of the function is removed, the header file should also be gone * [AD-543] bugfix linking error * corrected function header to match the header in column_meta.h * [AD-543] implement getRemarks for column_meta * [AD-543] adapt Read function in column_meta * [AD-543] bugfix java.h header * change code to match header in java.cpp * [AD-543] bugfix: change data type update dataType to int16_t to match DocDb Jdbc Type constnats in binary_common.h * [AD-523] add using statement * add using statement for ignite::common::EncodeURIComponent. * [AD-543] add todo comment for datetime sub code * [AD-543] save ORDINAL_POSITION * GetOrdinalPosition implemented * meta::Read function is modified to accept previously recorded ordinal position as a parameter * Read function now reads ORDINAL_POSITION value from resultSet * [AD-543] add jira link for todo in comment * the link for implementing BinaryTypeDateTimeSub is added * [AD-543] refactor * [AD-543] update todo comments * added jira link for AD-615 * removed finished todo * [AD-543] save catalogName * GetCatalogName implemented * Read function now reads TABLE_CAT value from resultSet * [AD-543] add documentation for parameters in Read * [AD-543] save columnDef * GetColumnDef implemented * Read function now reads COLUMN_DEF value from resultSet * [AD-543] remove finished todo comment * [AD-543] save values in copy constructor and copy operator * add cataloName, columnDef, and ordinalPosition to be copied in the ColumnMeta copy constructor and copy operator * [AD-543] remove comments * removed commented out code * remove todo statement for making Jdbc type definition into a enum. That can be done in future tasks * [AD-543] remove comments * removed commented out code * [AD-543] replace Ignite type with Jdbc type * change occurred in table_metadata_query.cpp * [AD-543] * Added tests for getColumns and SQLColumns. * [AD-543] update columnsMeta * added COLUMN_DEF, SQL_DATA_TYPE, SQL_DATETIME_SUB, CHAR_OCTET_LENGTH, ORDINAL_POSITION to columnsMeta * reformatted push_back code calls for consistency * columnsMeta is a meta::ColumnMeta object that stores the metadata for the column metadata * [AD-543] add comments * the comments will be removed in later commits. However, I wanted to push it to keep a record * [AD-543] remove comments and commented out code * [AD-543] remove todo comments and code comment * [AD-543] implement unit tests * implement TestGetDataWithColumnsReturnsNone * implement TestGetDataWithColumnsReturnsMany * [AD-543] remove comments * [AD-543] refactor * [AD-543] * Improved test for SQLColumns. * [AD-543] * Improved test for SQLColumns. * [AD-543] remove unneeded comment * [AD-543] * Improved test for SQLColumns. * [AD-543] * Improved test for SQLColumns. * [AD-543] * Improved test for SQLColumns. * [AD-543] code review fix * replace DOCUMENTDB_JDBC_TYPE* with JDBC_TYPE_* * [AD-543] bugfix - copy dataType value * [AD-543] resolve NumPrecRadix test error * make SqlTypeNumPrecRadix return -1 on default, so that a null would be put in the buffer if num_prec_radix does not apply to the column, and the meta query test would pass. * [AD-543] reduce warning * initialize ordinalPosition variable * [AD-543] update meta_queries_test * SQL_NO_TOTAL is expected for column size, buffer length, and char octet length * [AD-543] Bugfix meta_queries_test * change buffer length type to SQL_INTEGER in the SQLBindCol function call * sql_data_type should have the same values as data_type * [AD-543] address code review comments * comment changes * typo fix * remove const as return type for NullabilityToIsNullable * [AD-543] code review change * add src/odbc/include/ignite/impl/binary/binary_common.h * modify include statements: replace include of ignite/impl/binary/binary_common.h with ignite/odbc/impl/binary/binary_common.h * [AD-543] add binary_common file under odbc and add include statements * [AD-543] copy impl/binary and impl/interop * some files are modified to be under ODBC namespace, and some files haven't been modified * [AD-543] remove odbc/binary folder * it was a mistake an unnecessary * [AD-543] refactor - format files in odbc/impl/binary * change the namespace from ignite::impl to ignite::odbc::impl * [AD-543] refactor - format files in odbc/impl/interop * change the namespace from ignite::impl to ignite::odbc::impl * [AD-543] remove binary_type_impl because it is not required * [AD-543] update files to look into ignite::odbc namespace * Revert "[AD-543] remove binary_type_impl because it is not required" This reverts commit a36e52270b19198879a623e7036a236406326f45. * [AD-543] remove include from jni_test * removed ignite::impl::binary namespace because it is not needed * [AD-543] copy binary_type file into odbc namespace * [AD-543] refactor include statements into odbc namespace * [AD-543] refactor namespace to be under odbc * [AD-543] refactor changes * [AD-543] refactor changes * [AD-543] refactor - copy files * copy binary/ files that are included in binary_reader_impl.h to odbc/ * [AD-543] refactor copied binary/ files * refactor the files to be under odbc namespace * [AD-543] refactor binary_reader_impl.h * [AD-543] refactor -> copy files * copy ignite/ files that are included in binary_reader_impl.h to ignite/odbc/ * [AD-543] refactor copied ignite/ files * refactor the files to be under odbc namespace * refactor document of odbc/binary/ files * [AD-543] update include statements to include files under odbc * [AD-543] copy ignite/binary/ files to ignite/odbc/binary/ * [AD-543] refactor copied ignite/binary/ files * refactor the files to be under odbc namespace * [AD-543] remove reference to namespace ignite::impl::binary * [AD-543] copy ignite/binary files to ignite/odbc/binary * [AD-543] refactor copied ignite/binary/ files * refactor the files to be under odbc namespace * [AD-543] code change from code review comment * [AD-543] change odbc files to use odbc namespace * [AD-543] refactor * update include statements to be in odbc namespace * [AD-543] refactor changes * [AD-543] copy .cpp files to odbc folder * [AD-543] refactor copied files * refactor the files to be under odbc namespace * [AD-543] refactor objects under odbc space * [AD-543] add using statement * reason: on GitHub Actions, errors show when the complier thinks ignite::IgniteError is used instead of ignite::odbc::IgniteError. * [AD-543] refactor include statements * refactored to include header files from odbc/binary_common.h * refactored ignite::impl to ignite:odbc::impl * [AD-543] refactor changes * add using odbc namespace statements * [AD-543] modify cmakelist * included newly copied .cpp files * [AD-543] refactor column_test * [AD-543] refactor changes * [AD-543] address code review comments * add new line at end of file * move { to be on the same line * [AD-543] fix typo in test names * [AD-543] address code review comments * [AD-543] address code review comment * simply to nullptr * [AD-543] improvement from code review * [AD-543] change SQL_FLOAT back to 4 bytes * [AD-543] simplify resultSet object creation * [AD-543] indicate nullability property * changed ColumnMeta constructor to include nullability as a parameter. * nullability property is implemented in column_metadata_query.cpp and table_metadata_query.cpp. * issue AD-626 created for indicating the nullability in files type_info_query.cpp, special_coulmns_query.cpp, primary_keys_query.cpp, and foreign_keys_query.cpp: https://bitquill.atlassian.net/browse/AD-626 * [AD-543] improvements from code review comments * change nullability to NO_NULL for TABLE_NAME and TABLE_TYPE * [AD-543] refactor from code review comments Co-authored-by: Andie Montoya <[email protected]> Co-authored-by: Bruce Irschick <[email protected]> Co-authored-by: Affonso Vieira <[email protected]> Co-authored-by: Gary Atwal <[email protected]> * [AD-612] Publish/posting TestResults (#34) * [AD-612] uncomment code for posting test results * [AD-612] change to always upload test results * [AD-612] implement boost log * format of test results is set as JUnit * [AD-612] make macos build post test results with EnricoMi * [AD-612]make windows build post test results with EnricoMi * enable post results for win32 build * [AD-612] change keyword from path to files * files keyword is supported with EnricoMi, not path * [AD-612] change upload test result to composite action * [AD-612] modify action for win32 * modified publish unit test results from container action to composite action for win32 * [AD-612] generate test report inside /bin folder * moved code that generates test results file to odbc_test_suite.cpp, so that the code is not in a .h file. Now the test result is generated under the same folder when bin/Release/ignite-odbc-tests.exe or bin/Debug/ignite-odbc-tests.exe is called * [AD-612] modify path to test result * path to test result is set inside ODBC_BIN_PATH because that's where the file would be generated * comments added for historical records * [AD-612] refactor - remove comments * [AD-612] debug change path to test result .xml file * [AD-612] refactor * remove comments in win-build.yml * [AD-612] remove define boost_test_module * reason: the code is not reflected on the test result for unknown reasons. * [AD-612] refactor * remove empty lines and spaces * [AD-612] specify the test report filename * [AD-612] separate comments for different builds * [AD-612] separate comments for different builds * add value for check_name parameter as well * [AD-612] add OS version name to comments * [AD-612] specify environment version on Yaml * newest environments are used. Specify the version so we know what version we're working on * MacOS environment will be macOS Big Sur 11 * Windows environment will be Windows 2022 * [AD-612] Publish/posting TestResults (#34) * [AD-612] uncomment code for posting test results * [AD-612] change to always upload test results * [AD-612] implement boost log * format of test results is set as JUnit * [AD-612] make macos build post test results with EnricoMi * [AD-612]make windows build post test results with EnricoMi * enable post results for win32 build * [AD-612] change keyword from path to files * files keyword is supported with EnricoMi, not path * [AD-612] change upload test result to composite action * [AD-612] modify action for win32 * modified publish unit test results from container action to composite action for win32 * [AD-612] generate test report inside /bin folder * moved code that generates test results file to odbc_test_suite.cpp, so that the code is not in a .h file. Now the test result is generated under the same folder when bin/Release/ignite-odbc-tests.exe or bin/Debug/ignite-odbc-tests.exe is called * [AD-612] modify path to test result * path to test result is set inside ODBC_BIN_PATH because that's where the file would be generated * comments added for historical records * [AD-612] refactor - remove comments * [AD-612] debug change path to test result .xml file * [AD-612] refactor * remove comments in win-build.yml * [AD-612] remove define boost_test_module * reason: the code is not reflected on the test result for unknown reasons. * [AD-612] refactor * remove empty lines and spaces * [AD-612] specify the test report filename * [AD-612] separate comments for different builds * [AD-612] separate comments for different builds * add value for check_name parameter as well * [AD-612] add OS version name to comments * [AD-612] specify environment version on Yaml * newest environments are used. Specify the version so we know what version we're working on * MacOS environment will be macOS Big Sur 11 * Windows environment will be Windows 2022 * [AD-607] [ODBC] Create infrastructure for creating test data. (#35) ### Summary [AD-607] [ODBC] Create infrastructure for creating test data. ### Description Create environment for running test against an instance of MongoDB running in Docker container. - [x] Update to workflow yaml files to run local mongo server on each platform. - [x] Script to install data - [x] Modifications to connection handling to allow non-TLS connections - [x] Add simple test to prove that test can be run against MongoDB instance running in docker container. ### Related Issue https://bitquill.atlassian.net/browse/AD-607 * [AD-607] [ODBC] Create infrastructure for creating test data. * [AD-607] [ODBC] * Correct MacOS/Linux script. * [AD-607] [ODBC] * Add start and stop scripts. * [AD-607] [ODBC] * Add start/import/stop docker steps in Windows build. * [AD-607] [ODBC] * Add start/import/stop docker steps in MacOS build. * [AD-607] [ODBC] * Correct header declaration syntax. * [AD-607] [ODBC] * Correct docker scripts * [AD-607] [ODBC] * Correct docker scripts * [AD-607] [ODBC] * Correct docker scripts * [AD-607] [ODBC] * Correct docker scripts * [AD-607] [ODBC] * Correct docker scripts * [AD-607] [ODBC] * Correct docker scripts * [AD-607] [ODBC] * Correct docker scripts * [AD-607] [ODBC] * Correct docker scripts * [AD-607] [ODBC] * Replace docker with direct startup of MongoDB action. * [AD-607] [ODBC] * Replace docker with direct startup of MongoDB action. * [AD-607] [ODBC] * Test if mongosh and mongoimport are available. * [AD-607] [ODBC] * Test if mongosh and mongoimport are available. * [AD-607] [ODBC] * Test if mongosh connects using username and password. * [AD-607] [ODBC] * Test if mongosh connects using username and password. * [AD-607] [ODBC] * Test if mongosh connects using username and password. * [AD-607] [ODBC] * Test if mongosh connects using username and password. * [AD-607] [ODBC] * Install mongodb server via Chocolatey * [AD-607] [ODBC] * Install mongodb server via Chocolatey * [AD-607] [ODBC] * Try to get the path to config file. * [AD-607] [ODBC] * Refactor mongodb installation * [AD-607] [ODBC] * Work on MacOS MongoDB setup * [AD-607] [ODBC] * Rework on MacOS MongoDB setup * [AD-607] [ODBC] * Rework on MacOS MongoDB setup * [AD-607] [ODBC] * Rework on MacOS MongoDB setup * [AD-607] [ODBC] * Rework on MacOS MongoDB setup * [AD-607] [ODBC] * Correct line endings. * [AD-607] [ODBC] * Debug sed command. * [AD-607] [ODBC] * Change sed command. * [AD-607] [ODBC] * Change sed command. * [AD-607] [ODBC] * Fixed install script for MacOS. * [AD-607] [ODBC] * Clean-up yaml workflows. * [AD-607] [ODBC] * Clean-up yaml workflows. * [AD-607] [ODBC] * Correct DSN driver name. * [AD-607] [ODBC] * Correct test username and password. * [AD-607] [ODBC] * Improve C++ mongo connection. * [AD-607] [ODBC] * Improve java.cpp implementation of SharedPointer use. * [AD-607] [ODBC] * Improve connection.cpp implementation and README.md * Merge branch 'develop' into birschick-bq/ad-607/test_infrastructure * [AD-607] [ODBC] * Correct MacOS build by importing test data. * [AD-607] [ODBC] * Improvements from code review. * [AD-607] [ODBC] Create infrastructure for creating test data. (#35) ### Summary [AD-607] [ODBC] Create infrastructure for creating test data. ### Description Create environment for running test against an instance of MongoDB running in Docker container. - [x] Update to workflow yaml files to run local mongo server on each platform. - [x] Script to install data - [x] Modifications to connection handling to allow non-TLS connections - [x] Add simple test to prove that test can be run against MongoDB instance running in docker container. ### Related Issue https://bitquill.atlassian.net/browse/AD-607 * [AD-607] [ODBC] Create infrastructure for creating test data. * [AD-607] [ODBC] * Correct MacOS/Linux script. * [AD-607] [ODBC] * Add start and stop scripts. * [AD-607] [ODBC] * Add start/import/stop docker steps in Windows build. * [AD-607] [ODBC] * Add start/import/stop docker steps in MacOS build. * [AD-607] [ODBC] * Correct header declaration syntax. * [AD-607] [ODBC] * Correct docker scripts * [AD-607] [ODBC] * Correct docker scripts * [AD-607] [ODBC] * Correct docker scripts * [AD-607] [ODBC] * Correct docker scripts * [AD-607] [ODBC] * Correct docker scripts * [AD-607] [ODBC] * Correct docker scripts * [AD-607] [ODBC] * Correct docker scripts * [AD-607] [ODBC] * Correct docker scripts * [AD-607] [ODBC] * Replace docker with direct startup of MongoDB action. * [AD-607] [ODBC] * Replace docker with direct startup of MongoDB action. * [AD-607] [ODBC] * Test if mongosh and mongoimport are available. * [AD-607] [ODBC] * Test if mongosh and mongoimport are available. * [AD-607] [ODBC] * Test if mongosh connects using username and password. * [AD-607] [ODBC] * Test if mongosh connects using username and password. * [AD-607] [ODBC] * Test if mongosh connects using username and password. * [AD-607] [ODBC] * Test if mongosh connects using username and password. * [AD-607] [ODBC] * Install mongodb server via Chocolatey * [AD-607] [ODBC] * Install mongodb server via Chocolatey * [AD-607] [ODBC] * Try to get the path to config file. * [AD-607] [ODBC] * Refactor mongodb installation * [AD-607] [ODBC] * Work on MacOS MongoDB setup * [AD-607] [ODBC] * Rework on MacOS MongoDB setup * [AD-607] [ODBC] * Rework on MacOS MongoDB setup * [AD-607] [ODBC] * Rework on MacOS MongoDB setup * [AD-607] [ODBC] * Rework on MacOS MongoDB setup * [AD-607] [ODBC] * Correct line endings. * [AD-607] [ODBC] * Debug sed command. * [AD-607] [ODBC] * Change sed command. * [AD-607] [ODBC] * Change sed command. * [AD-607] [ODBC] * Fixed install script for MacOS. * [AD-607] [ODBC] * Clean-up yaml workflows. * [AD-607] [ODBC] * Clean-up yaml workflows. * [AD-607] [ODBC] * Correct DSN driver name. * [AD-607] [ODBC] * Correct test username and password. * [AD-607] [ODBC] * Improve C++ mongo connection. * [AD-607] [ODBC] * Improve java.cpp implementation of SharedPointer use. * [AD-607] [ODBC] * Improve connection.cpp implementation and README.md * Merge branch 'develop' into birschick-bq/ad-607/test_infrastructure * [AD-607] [ODBC] * Correct MacOS build by importing test data. * [AD-607] [ODBC] * Improvements from code review. * Code Clean Up (#37) * removing binary dependcy from odbc project * removing extra warnings * removing build warning, removing network project * removing dummy test * creating new define to handle ignite_error_macros * Code Clean Up (#37) * removing binary dependcy from odbc project * removing extra warnings * removing build warning, removing network project * removing dummy test * creating new define to handle ignite_error_macros * [AD-634] [ODBC] PowerBI not showing up Tables on the Navigator (#39) ### Summary [AD-634] [ODBC] PowerBI not showing up Tables on the Navigator ### Description Handle table types in call to `SQLTables` as * nullptr * empty string * single value * comma-separated values * quoted values ### Related Issue https://bitquill.atlassian.net/browse/AD-634 * [AD-634] [ODBC] PowerBI not showing up Tables on the Navigator * [AD-634] * Improve include location. * [AD-634] * Simplify 'dequote' function to eliminate use of regex. * [AD-634] * Correct spacing and formatting. * [AD-634] [ODBC] PowerBI not showing up Tables on the Navigator (#39) ### Summary [AD-634] [ODBC] PowerBI not showing up Tables on the Navigator ### Description Handle table types in call to `SQLTables` as * nullptr * empty string * single value * comma-separated values * quoted values ### Related Issue https://bitquill.atlassian.net/browse/AD-634 * [AD-634] [ODBC] PowerBI not showing up Tables on the Navigator * [AD-634] * Improve include location. * [AD-634] * Simplify 'dequote' function to eliminate use of regex. * [AD-634] * Correct spacing and formatting. * Update README.md (#40) * fix typos * Update README.md (#40) * fix typos * [AD-636] Enable Exec query to return stub/empty query (#41) ### Summary [AD-636] Enable Exec query to return stub/empty query ### Description Always return SQL_NO_DATA with zero metadata. ### Related Issue https://bitquill.atlassian.net/browse/AD-636 * [AD-636] Enable Exec query to return stub/empty query * [AD-636] * Simplified test query. * Update queries_test.cpp [AD-636] * Changed database name. * [AD-636] Enable Exec query to return stub/empty query (#41) ### Summary [AD-636] Enable Exec query to return stub/empty query ### Description Always return SQL_NO_DATA with zero metadata. ### Related Issue https://bitquill.atlassian.net/browse/AD-636 * [AD-636] Enable Exec query to return stub/empty query * [AD-636] * Simplified test query. * Update queries_test.cpp [AD-636] * Changed database name. * [AD-651] update ReadMe (#43) * [AD-651] update .gitignore to include *DS_Store * .DS_Store is a file generated on MacOS, and should not be uploaded to GitHub * [AD-651] update readme * update ReadMe to include instructions for downloading mongodb driver * [AD-651] add command to register the ODBC driver on MacOS * [AD-651] add instructions for setting DOCUMENTDB_HOME * [AD-651] add example for JAVA_HOME for clarity * [AD-651] resolve code review feedback * [AD-651] change command for downloading mongo cxx driver * [AD-651] update ReadMe (#43) * [AD-651] update .gitignore to include *DS_Store * .DS_Store is a file generated on MacOS, and should not be uploaded to GitHub * [AD-651] update readme * update ReadMe to include instructions for downloading mongodb driver * [AD-651] add command to register the ODBC driver on MacOS * [AD-651] add instructions for setting DOCUMENTDB_HOME * [AD-651] add example for JAVA_HOME for clarity * [AD-651] resolve code review feedback * [AD-651] change command for downloading mongo cxx driver * [FIX] Columns with JDBC_TYPE_BIGINT is being returned as having DATA_TYPE -2 (BINARY) instead of -5 in SqlColumns (#44) * ODBC was returing the wrong data_type type conversion from int8 to uint8 was causing the isse * adding schema and table name in SQLCOLUMNS test * changing int8 to int16 * [FIX] Columns with JDBC_TYPE_BIGINT is being returned as having DATA_TYPE -2 (BINARY) instead of -5 in SqlColumns (#44) * ODBC was returing the wrong data_type type conversion from int8 to uint8 was causing the isse * adding schema and table name in SQLCOLUMNS test * changing int8 to int16 * [AD-608] Add support for nullable data (#38) * [AD-608] refactor change * [AD-608] implement boost::optional for ResultSetGetString * both ResultSetGetString by index and by column name are modified * [AD-608] update java_test to accommodate boost::optional * if value should be null, checking for optional value being non-existent is enabled, and if value should not be null, checking for optional value being existent is enabled * (* operator) is use for boost::optional<std::string>. For details, see https://www.boost.org/doc/libs/1_78_0/libs/optional/doc/html/boost_optional/quick_start.html * [AD-608] update result_set GetString * update to accommodate boost::optional<std::string> * [AD-608] update jni_test to accommodate boost::optional * if value should be null, checking for optional value being non-existent is enabled, and if value should not be null, checking for optional value being existent is enabled * (* operator) is use for boost::optional<std::string>. For details, see https://www.boost.org/doc/libs/1_78_0/libs/optional/doc/html/boost_optional/quick_start.html * [AD-608] add include boost/optional for jni_test.cpp * [AD-608] implement boost::optional<std::string> in column_meta * catalogName, schemaName, tableName, columnName, remarks, columnDef are now boost::optional<std::string> * [AD-608] make ColumnMeta constructor accept std::string as parameters again * [AD-608] define PutOptString function in ApplicationDataBuffer namespace * [AD-608] add include headers for boost/optional * <boost/optional/optional_io.hpp> header is included because boost::optional<T> needs to be returned. * [AD-608] change std::string to boost::optional in table_meta.h * [AD-608] call PutOptString in metadata_query * replace PutString with PutOptString inside column_metatdata_query and table_metadata_query * [AD-608] update BOOST_CHECK * since nullable Strings are now supported, set BOOST_CHECK_EQUAL to true instead of false. * remove todo comments * [AD-608] bugfix include * [AD-608] implement nullable int in java.cpp * [AD-608] update java_test to support nullable int * [AD-608] update resultSet to support nullable int * [AD-608] refactor/format changes * [AD-608] add checks for nullable strings * [AD-608] remove empty string initialization * [AD-608] implement optional int in application_buffer * [AD-608] make type_traits accept optional parameters * [AD-608] change NullabilityToIsNullable to accept int32_t * [AD-608] make column_meta support nullable int * make column_metadata_query call putOptInt*. * change columnType from uint8_t to int16_t, because data_type could be a negative value. * replace currentColumn.GetDataType() with columnType in GetColumn * [AD-608] add check for optional values for log_msg * [AD-608] remove wasNull from JNI calls * remove wasNull parameter from JNI calls * remove wasNull parameter from resultSet calls * [AD-608] add if check for log_msg * add (*) operator for GetDataType, since dataType is a boost::optional variable * [AD-608] remove wasNull * wasNull is no longer required since we have nullable int/short/strings etc * remove references of wasNull in function calls * remove wasNull in DocumentDbDatabaseSchemaMetadataGetSchemaName * remove BOOST_CHECK / BOOST_REQUIRE for wasNull * add BOOST_CHECK for intValue in jni_test * [AD-608] bugfix make Nullability::ToSql always return * [AD-608] resolve build errors caused by boost::optional * add if statement checks that combine the initialization of the optional object and the test. * [AD-608] change decimalDigits to re…
Summary
Enable CodeCoverage
Description
Enabled github action to generate and publish the code coverage report
Related Issue
https://bitquill.atlassian.net/browse/AD-611
Additional Reviewers
@affonsoBQ
@alexey-temnikov
@andiem-bq
@birschick-bq