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
If I use the format function on a query that contains a literal ? this gets replaced, as per the documentation. How can I escape the ? character so it doesn't get replaced?
const{ format }=require('sqlstring')format(`select * from mytable where foo = 'https://example.com?a=b' and bar = ?`,['xyz'])
The resulting output from this would be
select*from mytable where foo ='https://example.com'xyz'a=b'and bar = ?
whereas I want
select*from mytable where foo ='https://example.com?a=b'and bar ='xyz'
The text was updated successfully, but these errors were encountered:
If I use the
format
function on a query that contains a literal?
this gets replaced, as per the documentation. How can I escape the?
character so it doesn't get replaced?The resulting output from this would be
whereas I want
The text was updated successfully, but these errors were encountered: