-
Notifications
You must be signed in to change notification settings - Fork 3.9k
GH-47710: [C++][FlightRPC] Statement attribute Support in ODBC #47773
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
base: main
Are you sure you want to change the base?
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.
Same general comments as the other PRs.
42f4f14 to
1e025c7
Compare
|
we worked on:
|
Co-Authored-By: rscales <[email protected]>
Add tests for setting and getting statement attributes Co-Authored-By: rscales <[email protected]>
- use `platform.h` - move `connect/disconnect` to `setup/teardown` - in-progress on subclassing test fixture Co-authored-by: justing-bq <[email protected]> Co-authored-by: alinalibq <[email protected]>
- remove `using List = std::list<T>;`
1e025c7 to
be51a05
Compare
|
Rebased on top of |
| namespace { | ||
| // Helper Functions | ||
|
|
||
| // Validate SQLULEN return value | ||
| void ValidateGetStmtAttr(SQLHSTMT statement, SQLINTEGER attribute, | ||
| SQLULEN expected_value) { | ||
| SQLULEN value = 0; | ||
| SQLINTEGER string_length = 0; | ||
|
|
||
| ASSERT_EQ(SQL_SUCCESS, | ||
| SQLGetStmtAttr(statement, attribute, &value, sizeof(value), &string_length)); | ||
|
|
||
| EXPECT_EQ(expected_value, value); | ||
| } |
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.
Instead of having variants for each type of comparison (equal, greater than, etc.) wouldn't it be better to just have a getter for each type, and keep the assertion in the tests themselves? (It could throw on failure, for instance, to keep the signature simple.)
Rationale for this change
Support for getting and setting statement attributes in ODBC is added.
What changes are included in this PR?
SQLGetStmtAttrandSQLSetStmtAttrto get and set statement attributes.Are these changes tested?
Will be tested in CI when PR is ready for review
Are there any user-facing changes?
No