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
import db_sqlite
var db =Open(connection="foo.db", user="rumpf", password="fpmur", database="mydb")
procgetFromWhere*(id, row, table: string): TRow=result= db.getRow(sql"select 1 from ? where ? = ?", table, row, id)
templategetFrom*(id, table: string): expr =getFromWhere(id, "id", table)
## foo! this line causes errordiscard"4".getFrom("users") # Should raise exception (because table users dosen't \# exist and neither does user 4) but doesn't compile