Skip to content

Conversation

bpintea
Copy link
Collaborator

@bpintea bpintea commented Aug 20, 2019

This PR adds an simple counter of the parameter markers within an
attached SQL statement.

While a correct and complete implementation would require in our case
sending the statement to the server for parameter analysis, this simple
implementation should work for most cases where the application simply
wants to validate the number of user-provided paramters number against
the number of markers in the statement.

This commit adds an simple counter of the parameter markers within an
attached SQL statement.

While a correct and complete implementation would require in our case
sending the statement to the server for parameter analysis, this simple
implementation should work for most cases where the application simply
wants to validate the number of user-provided paramters number against
the number of markers in the statement.
Copy link
Collaborator

@edsavage edsavage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bpintea bpintea merged commit cb5be6f into elastic:master Aug 29, 2019
@bpintea bpintea deleted the enh/param_marker_count branch August 29, 2019 10:29
bpintea added a commit that referenced this pull request Aug 29, 2019
This commit adds an simple counter of the parameter markers within an
attached SQL statement.

While a correct and complete implementation would require in our case
sending the statement to the server for parameter analysis, this simple
implementation should work for most cases where the application simply
wants to validate the number of user-provided paramters number against
the number of markers in the statement.

(cherry picked from commit cb5be6f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants