Oh, you're correct about the two instance of `db`. I can't get rid of the `var
db:DbConn` because of the scoping. `let db` is valid only in the `try` block.
I've removed the `let`. That also made me realize that `defer` is called at the
end of the `try` block... I've also removed `defer: db.clos
Hello, I'm having problems interacting with a Postgres DB with Nim
proc handleDbSync(dbParams: tuple[dbAddr: string, user: string, password:
string, db: string]) {.thread.} =
var logger = newConsoleLogger()
var db: DbConn
logger.log(lvlInfo, "DB: " & dbParams.user &
and @pietroppeter exactly what I needed. Thank you so much.
Hello,
I'd like to build a binary with a `staticRead` but I'd like to modify the path
of the file to be read compile time.
I have my config.nims
task build_that_binary, "...":
let sourceFile = paramStr(paramCount() -1 )
let firmwareFile = paramStr(paramCount())
#