You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These function will parse Query and replace all occurrences of :nameOfTheParameter with ? and rearrange arguments in [NamedParam] list according to their occurrence in the Query. And then these functions just delegate their arguments to query and execute functions.
Regarding parsing of Query: I propose that after : only alphanumeric characters and underscores are allowed. I hope that : is not used anywhere in MySQL...
Any thoughts on this?
The text was updated successfully, but these errors were encountered:
MySQL doesn't support named parameters on the protocol level. So the only possible way to implement named parameters in our library is the following:
data NamedParam = NamedParam Text Param
(whereText
is the name of the parameter).executeNamed
andqueryNamed
with types:These function will parse
Query
and replace all occurrences of:nameOfTheParameter
with?
and rearrange arguments in[NamedParam]
list according to their occurrence in theQuery
. And then these functions just delegate their arguments toquery
andexecute
functions.Regarding parsing of
Query
: I propose that after:
only alphanumeric characters and underscores are allowed. I hope that:
is not used anywhere in MySQL...Any thoughts on this?
The text was updated successfully, but these errors were encountered: