-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: parse query parameters in PostgreSQL query (#1732)
* fix: PostgreSQL supports newline in quoted literals and identifiers PostgreSQL supports newline characters in string literals and quoted identifiers. Trying to execute a statement with a string literal or quoted identifier that contained a newline character would cause an 'Unclosed string literal' error. Fixes #1730 * feat: parse query parameters in PostgreSQL query Adds a helper method to get the parameters from a PostgreSQL query. This is needed for DESCRIBE statement messages in PGAdapter, as it must return the data types of all query parameters in a query string. Even though this parser is not able to determine the parameter types, it is able to determine the number of parameters. This again makes it possible to PGAdapter to return Oid.UNSPECIFIED for each parameter in the query string, which is enough for most clients.
- Loading branch information
Showing
2 changed files
with
108 additions
and
27 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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