Use raw response mode for all driver queries to fix numResults crash#42
Open
mikhail-zhadanov wants to merge 4 commits intomainfrom
Open
Use raw response mode for all driver queries to fix numResults crash#42mikhail-zhadanov wants to merge 4 commits intomainfrom
mikhail-zhadanov wants to merge 4 commits intomainfrom
Conversation
The Exasol driver's default response mode crashes with "Cannot read properties of undefined (reading 'numResults')" when the database returns an error (responseData is undefined). Switch all driver.query()/driver.execute() calls to raw mode and handle response parsing via getRowsFromResult/getColumnsFromResult. - Add rawQuery()/rawExecute() wrappers in utils.ts - Add throwSqlError() for deduplicated error formatting with SQL codes - Remove dead code: isNonResultMetadataError, E-EDJS-11 fallback, safeQuery wrapper, no-op try/catch blocks Fixes #41
e2de959 to
c414019
Compare
Collaborator
Author
|
@mkcorneli , please review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #41
Summary
rawQuery()/rawExecute()wrappers inutils.tsthat always use the driver's'raw'response modedriver.query()/driver.execute()calls across 8 files to go through these wrappersthrowSqlError()helper to deduplicate error formatting and include SQL error codes (e.g.,SQL Error [42000]: object not found)isNonResultMetadataError,E-EDJS-11fallback,safeQuerywrapper, no-op try/catch blocksexecuteWithoutResultto a thin alias overrawQuery