The way this library currently uses preg_replace on the statement, there is no way to use a question mark within a string literal in a query due to it being replaced by a named parameter in the prepare function.
Given a query like select 'http://www.test.com/?id=' || usr.id url from users usr the question mark would be replaced with a named parameter like ":p0".
Would it not be best to only match on question marks that are not contained within single quotes?
The way this library currently uses preg_replace on the statement, there is no way to use a question mark within a string literal in a query due to it being replaced by a named parameter in the prepare function.
Given a query like
select 'http://www.test.com/?id=' || usr.id url from users usr
the question mark would be replaced with a named parameter like ":p0".Would it not be best to only match on question marks that are not contained within single quotes?