Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[AD-427] Tracer Code - Limited Capability to load metadata #16

Merged
merged 30 commits into from
Feb 8, 2022

Conversation

birschick-bq
Copy link
Contributor

Summary

[AD-427] Tracer Code - Limited Capability to load metadata

Description

Create platform for retrieving metadata and result sets.

  • Connection.getMetaData()
  • DatabaseMetaData.getTables(...)
  • ResultSet
    • .next()
    • .getString(...)
    • .getInt(...)
  • Ensure long-lived Java objects are pinned and released appropriately.

Related Issue

Tracer Code - Limited Capability to load metadata

Additional Reviewers

@affonsoBQ
@alexey-temnikov
@andiem-bq
@birschick-bq
@garya-bitquill

Copy link
Contributor

@andiemontoyeah andiemontoyeah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@garya-bitquill garya-bitquill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm!

Bruce Irschick added 2 commits February 8, 2022 10:43
* Reference instead of pointer.
* autoCloseConnection to ensure closed connection.
* Ensure ResultSet close.
@birschick-bq birschick-bq merged commit 725862f into develop Feb 8, 2022
@birschick-bq birschick-bq deleted the birschick-bq/ad-427/metadata branch February 8, 2022 21:36
affonsov pushed a commit that referenced this pull request Nov 16, 2022
* Update comment, replace 'timestreamodbc.c' with 'odbc.c'.

* Remove 'TOKEN' from MYLOG when logging authentication information.

* Add user input fields 'Username' and 'Password' when setting up DSN configuration.

* Modify DBCommunication methods Validate, Connect, ExecDirect.

Validation is true if username = 'testuser' and password = 'password'.
Connect returns true if validation is true (fake connection established).
ExecDirect returns false with error message 'No data available to query'.

* Update unit tests for valid username and password default authentication.

* Revert changes made to test_conn.cpp.

* Change 'username' to 'UID'.

* Revert DBCommunication::Validate method.

* Use environment variable NOT_CONNECTED for fake connection implementation.

* Change log message for connection established.

* Revert test_conn.cpp.

* Change 'Username' to 'User ID'.

* Check env variables for DBCommunication Connect, Disconnect, ExecDirect).

* Update connection unit tests.

* Update it_odbc_helper.(h,cpp) file for default unit tests.

* Minor changes to DBCommunication class.

* Update unit tests for odbc connection.

* Remove printf statement from test_odbc_connection.cpp.

* Remove Tableau query unit tests.

* Remove NOT_CONNECTED check in class Fixture.

* Add NOT_CONNECTED check in derived test classes, remove from unit test functions.

* Update TestSQLDriverMultiConnection.

* Format documents google style.

* Update .yml files with FAKE_CONNECTION: 1.

* Remove NOT_CONNECTED from DBCommunication class.

* Move database connection check from unit test to unit test class.

Remove expected error check in unit tests for the case
NOT_CONNECTED = 0 and FAKE_CONNECTION = 0.

* Move database connection check from unit test to unit test class.

Remove expected error check in unit tests for the case
NOT_CONNECTED = 0 and FAKE_CONNECTION = 0.

* Comment out SQLDisconnect unit tests with reconnections due to memory dump.

* Update Github actions (macos, linux) to use cmake version 3.21.4.

* Update Github actions (macos, linux) to use cmake version 3.21.4.

* Update linux32 to use cmake 3.21.4.

* [AD-444] Set the password field on the DSN dialog to hide typed characters.
https:/bitquill.atlassian.net/browse/AD-444

* Revert "Remove Tableau query unit tests."

This reverts commit 876e29e13203463d35359513fe4788d286cb9da5.

* Fix memory leak for TestSQLDisconnect.

* [AD-477] add TODO comments for instructions on modifying connection string in future.

* Update github actions cmake to 3.21.4 using = and @ symbol.

* Revert "Update github actions cmake to 3.21.4 using = and @ symbol."

This reverts commit 4f1e7057472a3d81a6de025e397d267c2eebe781.

Co-authored-by: Bruce Irschick <[email protected]>
affonsov pushed a commit that referenced this pull request Nov 16, 2022
### Summary

[AD-427] Tracer Code - Limited Capability to load metadata

### Description

Create platform for retrieving metadata and result sets.
* Connection.getMetaData()
* DatabaseMetaData.getTables(...)
* ResultSet
  * .next()
  * .getString(...)
  * .getInt(...)
* Ensure long-lived Java objects are pinned and released appropriately.

### Related Issue

[Tracer Code - Limited Capability to load metadata](https://bitquill.atlassian.net/browse/AD-427)

* [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-427] Fix Mac build.

* [AD-427] Fix Mac build.

* [AD-427] Fix Mac build.

* [AD-427] Fix Mac build.

* [AD-427] Fix Mac build.

* [AD-427] Fix Mac build.

* [AD-427] Fix Mac build.

* [AD-427] Fix Mac build.

* [AD-427] Fix Mac build.

* [AD-427] Fix Mac build.

* [AD-427] Fix Mac build.

* [AD-427] Fix Mac build.

* [AD-427] Fix Mac build.

* [AD-427] Added ResultSet.next and ResultSet.GetString()

* [AD-427] Updated JDBC driver version. Expanded tests.

* [AD-427] Use loop to iterate all results in ResultSet test.

* [AD-427] Changed from code review.
* Reference instead of pointer.
* autoCloseConnection to ensure closed connection.

* [AD-427] Changed from code review.
* Ensure ResultSet close.
affonsov pushed a commit that referenced this pull request Nov 17, 2022
* Update comment, replace 'timestreamodbc.c' with 'odbc.c'.

* Remove 'TOKEN' from MYLOG when logging authentication information.

* Add user input fields 'Username' and 'Password' when setting up DSN configuration.

* Modify DBCommunication methods Validate, Connect, ExecDirect.

Validation is true if username = 'testuser' and password = 'password'.
Connect returns true if validation is true (fake connection established).
ExecDirect returns false with error message 'No data available to query'.

* Update unit tests for valid username and password default authentication.

* Revert changes made to test_conn.cpp.

* Change 'username' to 'UID'.

* Revert DBCommunication::Validate method.

* Use environment variable NOT_CONNECTED for fake connection implementation.

* Change log message for connection established.

* Revert test_conn.cpp.

* Change 'Username' to 'User ID'.

* Check env variables for DBCommunication Connect, Disconnect, ExecDirect).

* Update connection unit tests.

* Update it_odbc_helper.(h,cpp) file for default unit tests.

* Minor changes to DBCommunication class.

* Update unit tests for odbc connection.

* Remove printf statement from test_odbc_connection.cpp.

* Remove Tableau query unit tests.

* Remove NOT_CONNECTED check in class Fixture.

* Add NOT_CONNECTED check in derived test classes, remove from unit test functions.

* Update TestSQLDriverMultiConnection.

* Format documents google style.

* Update .yml files with FAKE_CONNECTION: 1.

* Remove NOT_CONNECTED from DBCommunication class.

* Move database connection check from unit test to unit test class.

Remove expected error check in unit tests for the case
NOT_CONNECTED = 0 and FAKE_CONNECTION = 0.

* Move database connection check from unit test to unit test class.

Remove expected error check in unit tests for the case
NOT_CONNECTED = 0 and FAKE_CONNECTION = 0.

* Comment out SQLDisconnect unit tests with reconnections due to memory dump.

* Update Github actions (macos, linux) to use cmake version 3.21.4.

* Update Github actions (macos, linux) to use cmake version 3.21.4.

* Update linux32 to use cmake 3.21.4.

* [AD-444] Set the password field on the DSN dialog to hide typed characters.
https:/bitquill.atlassian.net/browse/AD-444

* Revert "Remove Tableau query unit tests."

This reverts commit 876e29e13203463d35359513fe4788d286cb9da5.

* Fix memory leak for TestSQLDisconnect.

* [AD-477] add TODO comments for instructions on modifying connection string in future.

* Update github actions cmake to 3.21.4 using = and @ symbol.

* Revert "Update github actions cmake to 3.21.4 using = and @ symbol."

This reverts commit 4f1e7057472a3d81a6de025e397d267c2eebe781.

Co-authored-by: Bruce Irschick <[email protected]>
affonsov pushed a commit that referenced this pull request Nov 17, 2022
### Summary

[AD-427] Tracer Code - Limited Capability to load metadata

### Description

Create platform for retrieving metadata and result sets.
* Connection.getMetaData()
* DatabaseMetaData.getTables(...)
* ResultSet
  * .next()
  * .getString(...)
  * .getInt(...)
* Ensure long-lived Java objects are pinned and released appropriately.

### Related Issue

[Tracer Code - Limited Capability to load metadata](https://bitquill.atlassian.net/browse/AD-427)

* [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-427] Fix Mac build.

* [AD-427] Fix Mac build.

* [AD-427] Fix Mac build.

* [AD-427] Fix Mac build.

* [AD-427] Fix Mac build.

* [AD-427] Fix Mac build.

* [AD-427] Fix Mac build.

* [AD-427] Fix Mac build.

* [AD-427] Fix Mac build.

* [AD-427] Fix Mac build.

* [AD-427] Fix Mac build.

* [AD-427] Fix Mac build.

* [AD-427] Fix Mac build.

* [AD-427] Added ResultSet.next and ResultSet.GetString()

* [AD-427] Updated JDBC driver version. Expanded tests.

* [AD-427] Use loop to iterate all results in ResultSet test.

* [AD-427] Changed from code review.
* Reference instead of pointer.
* autoCloseConnection to ensure closed connection.

* [AD-427] Changed from code review.
* Ensure ResultSet close.
alexey-temnikov pushed a commit that referenced this pull request Jan 14, 2023
* Update comment, replace 'timestreamodbc.c' with 'odbc.c'.

* Remove 'TOKEN' from MYLOG when logging authentication information.

* Add user input fields 'Username' and 'Password' when setting up DSN configuration.

* Modify DBCommunication methods Validate, Connect, ExecDirect.

Validation is true if username = 'testuser' and password = 'password'.
Connect returns true if validation is true (fake connection established).
ExecDirect returns false with error message 'No data available to query'.

* Update unit tests for valid username and password default authentication.

* Revert changes made to test_conn.cpp.

* Change 'username' to 'UID'.

* Revert DBCommunication::Validate method.

* Use environment variable NOT_CONNECTED for fake connection implementation.

* Change log message for connection established.

* Revert test_conn.cpp.

* Change 'Username' to 'User ID'.

* Check env variables for DBCommunication Connect, Disconnect, ExecDirect).

* Update connection unit tests.

* Update it_odbc_helper.(h,cpp) file for default unit tests.

* Minor changes to DBCommunication class.

* Update unit tests for odbc connection.

* Remove printf statement from test_odbc_connection.cpp.

* Remove Tableau query unit tests.

* Remove NOT_CONNECTED check in class Fixture.

* Add NOT_CONNECTED check in derived test classes, remove from unit test functions.

* Update TestSQLDriverMultiConnection.

* Format documents google style.

* Update .yml files with FAKE_CONNECTION: 1.

* Remove NOT_CONNECTED from DBCommunication class.

* Move database connection check from unit test to unit test class.

Remove expected error check in unit tests for the case
NOT_CONNECTED = 0 and FAKE_CONNECTION = 0.

* Move database connection check from unit test to unit test class.

Remove expected error check in unit tests for the case
NOT_CONNECTED = 0 and FAKE_CONNECTION = 0.

* Comment out SQLDisconnect unit tests with reconnections due to memory dump.

* Update Github actions (macos, linux) to use cmake version 3.21.4.

* Update Github actions (macos, linux) to use cmake version 3.21.4.

* Update linux32 to use cmake 3.21.4.

* [AD-444] Set the password field on the DSN dialog to hide typed characters.
https:/bitquill.atlassian.net/browse/AD-444

* Revert "Remove Tableau query unit tests."

This reverts commit 876e29e13203463d35359513fe4788d286cb9da5.

* Fix memory leak for TestSQLDisconnect.

* [AD-477] add TODO comments for instructions on modifying connection string in future.

* Update github actions cmake to 3.21.4 using = and @ symbol.

* Revert "Update github actions cmake to 3.21.4 using = and @ symbol."

This reverts commit 4f1e7057472a3d81a6de025e397d267c2eebe781.

Co-authored-by: Bruce Irschick <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants