Conversation
- Updated SQL query construction to use template literals consistently. - Enhanced error handling and validation for input parameters. - Streamlined the process of handling JSON columns during row insertion.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors parts of the Oracle and IBM DB2 data access objects to harden SQL query construction, especially around search and autocomplete, and aligns formatting with the project’s style.
Changes:
- Oracle DAO: refines
getRowsFromTableautocomplete logic to validate column names against table structure and switches the raw SQL to fully parameterizedLIKEclauses. - IBM DB2 DAO: reworks
getRowsFromTable(and related query-building code) to use parameterized queries for search, filtering, and autocomplete, and adds validation for autocomplete, filter, and ordering fields. - Both DAOs: apply consistent indentation/style and minor cleanups without functional changes in other methods.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| shared-code/src/data-access-layer/data-access-objects/data-access-object-oracle.ts | Updates Oracle DAO autocomplete query to validate column names against the table’s structure and use bound parameters for LIKE filters; otherwise mostly formatting and structural reindent without behavior changes. |
| shared-code/src/data-access-layer/data-access-objects/data-access-object-ibmdb2.ts | Reworks IBM DB2 DAO query construction (search, filters, autocomplete, ordering) to be parameterized and validated, reducing injection risk and fixing composition of WHERE/AND clauses, plus consistent formatting across the file. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.