Skip to content

Instantly share code, notes, and snippets.

@Igaryu
Last active April 16, 2023 09:32
Show Gist options
  • Save Igaryu/e38945bc50887083397293af4ccc753b to your computer and use it in GitHub Desktop.
Save Igaryu/e38945bc50887083397293af4ccc753b to your computer and use it in GitHub Desktop.
NIM - Sqlite3 Connect
'''
Having recently approached Nim's language, I'm bringing back some 'goodies' that I will surely need in the future.
The first is the `connect` function of the `std/db_sqlite` library
If you try to open a sqlite3 database file with:
var dbase = open("DBase/IChing.db")
you will have a lot of problems. For Nim the correct way to open a sqlite3 database file is:
var dbase = open("DBase/IChing.db", "", "", "")
... and no: this information IS NOT mentioned in the `std/db_sqlite` nim module documentation !!!
'''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment