Araq / ormin

Ormin -- An ORM for Nim.
MIT License
153 stars 18 forks source link

Binding string type parameter query does not work correctly with sqlite3 #53

Closed huaxk closed 4 years ago

huaxk commented 4 years ago

database schema:

create table if not exists tb_varchar(
  typvarchar text not null
);

code:

let v = "one"
db.exec(sql"insert into tb_varchar(typvarchar) values (?)", v)
let res = query:
  select tb_varchar(typvarchar)
  where typvarchar == ?v
echo res

I got res: @[], no matching data. ormin_sqlite.nim line 37: bind_blob maybe replaced with bind_text when using string type parameter.