Update GCZ Provider Where Clause Parsing Logic
Type of change
-
Bug Fix -
Feature
Please provide link to gitlab issue or ADR(Architecture Decision Record)
Does this introduce a change in the core logic?
- [YES/NO]
Does this introduce a change in the cloud provider implementation, if so which cloud?
-
AWS -
Azure -
GCP -
IBM
Does this introduce a breaking change?
- [YES/NO]
What is the current behavior?
where
clause parsing restricted to only one operator =
, and only against one column at a time.
What is the new/expected behavior?
- Incoming
where
clause is converted to an Abstract Syntax Tree (AST) with the open source Apache-2.0 licensed node-sql-parser library - AST is recursively analyzed against a predefined list of operators and types to dynamically construct a parameterized (e.g.
name = ?
) query from the incoming where string, restoring support for multi-conditional and parentheses-nestedwhere
clauses.
Have you added/updated Unit Tests and Integration Tests?
N/A. Confirmed Postman Collection regarding Provider tests execute successfully where they were breaking before.
Any other useful information
Linting/Formatting has been done in a separate commit. For only new changes, please see ec9ad95b and 3767b3f6
Edited by Levi Remington