Could not reproduce, or didn't understand the problem:
db.exec(sql"""CREATE TABLE IF NOT EXISTS my_table (my_col text)"""
db.exec(sql"INSERT INTO my_table (my_col) values (?)", "my_string")
let myvar = "my?_string"
db.exec(sql"INSERT INTO my_table (my_col) values (?)", myvar)
echo db.getAllRows(sql"""SELECT * FROM my_table""")
Run
Output: @[@["my_string"], @["my?_string"]]
Run
sqlite> SELECT * FROM my_table;
my_string
my?_string
Run
- Any way to avoid the SQL bugs and execute raw strings? JohnLuck
- Any way to avoid the SQL bugs and execute raw strings? martin_2
- Any way to avoid the SQL bugs and execute raw string... Araq
- Any way to avoid the SQL bugs and execute raw st... Clonk
- Any way to avoid the SQL bugs and execute ra... JohnLuck
- Any way to avoid the SQL bugs and execu... JohnLuck
- Any way to avoid the SQL bugs and e... xbello
- Any way to avoid the SQL bugs a... JohnLuck
- Any way to avoid the SQL bugs a... shirleyquirk
- Any way to avoid the SQL bugs a... xbello
- Any way to avoid the SQL bugs a... Araq
- Any way to avoid the SQL bugs a... martin_2
- Any way to avoid the SQL bugs a... Araq
- Any way to avoid the SQL bugs a... martin_2
- Any way to avoid the SQL bugs a... Araq
- Any way to avoid the SQL bugs a... JohnLuck
- Any way to avoid the SQL bugs a... JohnLuck
