Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
escape pgsql field and values generated by buildGetCondition (#577)
## Description SQL column names and values should be escaped. Go does not offer a generic function for this (as it tends to be SQL dialect specific). The "pq" library, which we are using as a Postgresql interface, does provide helpers for this purpose. https://pkg.go.dev/github.com/lib/pq#QuoteIdentifier Alternatively, `buildGetCondition` is only used by one caller. It should be possible to remove `buildGetCondition` and have `GetTemplate` build a parameterized query with a parameterized list (some SQLs or client libraries don't allow for field names to be parameters, I don't know if that is the case here). ## Why is this needed Fixes: #574 ## How Has This Been Tested? ## How are existing users impacted? What migration steps/scripts do we need? ## Checklist: I have: - [ ] updated the documentation and/or roadmap (if required) - [ ] added unit or e2e tests - [ ] provided instructions on how to upgrade
- Loading branch information