* fixes #20153; do not escape `_` for mysql * add a test * Update db_mysql.nim * Update tdb_mysql.nim Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
This commit is contained in:
parent
3fef2fd52c
commit
3bd935f331
2 changed files with 5 additions and 2 deletions
4
tests/stdlib/tdb_mysql.nim
Normal file
4
tests/stdlib/tdb_mysql.nim
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import std/db_mysql
|
||||
|
||||
doAssert dbQuote("SELECT * FROM foo WHERE col1 = 'bar_baz'") == "'SELECT * FROM foo WHERE col1 = \\'bar_baz\\''"
|
||||
doAssert dbQuote("SELECT * FROM foo WHERE col1 LIKE '%bar_baz%'") == "'SELECT * FROM foo WHERE col1 LIKE \\'%bar_baz%\\''"
|
||||
Loading…
Add table
Add a link
Reference in a new issue