Skip to content

Conversation

@rscales
Copy link

@rscales rscales commented May 27, 2025

Updates for SQLGetDiagFieldW coming from comments to initial merged PR.

Addresses the following issues:

  • Add statement and descriptor cases now so we don't forget.
  • Use const std::string& to use copy by reference semantics to avoid copy.
  • Change to use dsn value retrieved from connection for SQL_DIAG_SERVER_NAME
  • Allow passing of diagInfoPtr if they just want the length
  • For GetStringAttribute calls set isLengthInBytes to true for calls with SQLPOINTER and to false for calls with SQLWCHAR
  • Return dummy values for unimplemented field types

Fixed bug in attribute_utils.h for GetAttributeSQLWCHAR to determine when truncation has been applied.

@rscales rscales changed the title Update to address changes from code review Updates for SQLGetDiagRecW May 27, 2025
@alinaliBQ
Copy link

We can ignore the cancelled check, it was invoked by accident

Copy link

@alinaliBQ alinaliBQ left a comment

Choose a reason for hiding this comment

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

I have went through the code with Rob during our huddle previously, lgtm

@alinaliBQ alinaliBQ changed the title Updates for SQLGetDiagRecW Updates for SQLGetDiagFieldW May 27, 2025
@rscales rscales force-pushed the sql-get-diag-field-updates branch from af6a96c to f33a81e Compare May 27, 2025 23:49
@rscales rscales force-pushed the sql-get-diag-field-updates branch from f33a81e to e13d61e Compare May 28, 2025 00:14
@rscales rscales marked this pull request as ready for review May 28, 2025 18:24
@alinaliBQ
Copy link

JFYI - I have cancelled the C++ workflows because they were invoked by accident; I had C++ workflows enabled briefly for testing and the sql-get-diag-field-updates branch got pushed at the same time.

alinaliBQ
alinaliBQ previously approved these changes Jun 2, 2025
Copy link

@alinaliBQ alinaliBQ left a comment

Choose a reason for hiding this comment

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

LGTM

@alinaliBQ alinaliBQ dismissed their stale review June 2, 2025 22:45

Working with Rob for bufferLen = SQL_NTS case

Copy link

@alinaliBQ alinaliBQ left a comment

Choose a reason for hiding this comment

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

LGTM, pls run the Dev workflow for linter

@rscales rscales merged this pull request into apache-odbc Jun 4, 2025
6 checks passed
@alinaliBQ alinaliBQ deleted the sql-get-diag-field-updates branch June 17, 2025 22:11
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