I created a [tiny wrapper](https://github.com/al6x/nim/blob/main/db/dbm.nim) 
that would allow to use convenient SQL queries, example (it will be similar 
with your original question about "update where ...").
    
    
     Nim
    db.exec sql"""insert into users (name, age) values ({"Jim"}, {30})"""
        
        let users = db.filter(sql"select name, age from users order by name", 
tuple[name: string, age: int])
        assert users == @[(name: "Jim", age: 30)]
        
        assert db.get_value(sql"select count(*) from users where age = {30}", 
int) == 1
    
    
    Run

It's not packaged properly, you may just copy/paste source code in your project.

Reply via email to