diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index de0cbe6..d44106c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -23,7 +23,7 @@ jobs: os: windows, shell: msys2 } - nim: [1.6.18, 2.0.14] + nim: [2.0.14] name: ${{ matrix.platform.icon }} ${{ matrix.platform.label }} - Nim v${{ matrix.nim }} runs-on: ${{ matrix.platform.os }}-latest steps: diff --git a/datastore.nimble b/datastore.nimble index d9e0fa5..cc57207 100644 --- a/datastore.nimble +++ b/datastore.nimble @@ -6,14 +6,14 @@ author = "Status Research & Development GmbH" description = "Simple, unified API for multiple data stores" license = "Apache License 2.0 or MIT" -requires "nim >= 1.2.0", +requires "nim >= 2.0.14", "asynctest >= 0.5.2 & < 0.6.0", "chronos >= 4.0.3 & < 5.0.0", "questionable >= 0.10.15 & < 0.11.0", - "sqlite3_abi == 3.47.0.0", + "sqlite3_abi >= 3.47.0.0 & < 4.0.0.0", "leveldbstatic >= 0.2.0 & < 1.0.0", - "stew >= 0.2.0", - "unittest2 >= 0.2.3" + "stew >= 0.2.0 & < 0.3.0", + "unittest2 >= 0.2.3 & < 0.3.0" task coverage, "generates code coverage report": var (output, exitCode) = gorgeEx("which lcov") diff --git a/datastore/sql/sqliteutils.nim b/datastore/sql/sqliteutils.nim index 2103e53..7426238 100644 --- a/datastore/sql/sqliteutils.nim +++ b/datastore/sql/sqliteutils.nim @@ -19,7 +19,7 @@ type AutoDisposed*[T: ptr|ref] = object val*: T - DataProc* = proc(s: RawStmtPtr) {.closure, gcsafe.} + DataProc* = proc(s: RawStmtPtr) {.closure, gcsafe, raises: [].} NoParams* = tuple # empty tuple @@ -241,10 +241,7 @@ proc query*[P]( case v of SQLITE_ROW: - try: - onData(s) - except Exception as err: - return failure("sqliteutils.query (stmt) exception: " & $err.msg) + onData(s) res = success true of SQLITE_DONE: break