I just released version 0.7.0 of nim-qt5_qtsqlto GitHub. It's a binding for Qt 5's Qt SQL library that also implements some Nim-isms to make it easier to use. It implements everything one would expect of a production-grade SQL library, such as one API for multiple database engines, transactions, prepared statements, etc. I welcome any comments or pull requests!
Nice work. But subject of your posting may promise a bit too much -- my first idea was to find a full library coded in Nim. But it seems to be "only"a fine wrapper. Looking at your code, I saw a lot of
if status != true:
raise newQSqlError(self.lastError())
else:
return true
Is there a good reason for that verbose code? Maybe I would have written plain
if status: return true
raise newQSqlError(self.lastError())
Sorry, I can see how the title can be confusing. The code doesn't need to be that verbose, it's just a stylistic habit I have. I find that having if conditionals and their code blocks on the same line makes skimming the code harder.