You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var db = SimpleDB.init("test.db")
let txt = """
Some rows
of text
end.""".dedent
db.put(%* {"id": "one@two", "cursor_line": 4, "text": txt}) # ok
let res = db.get("one@two")
echo res["text"].str #ok
db.remove("one@two") # error
[mw@stat nim-simpledb]$ nimble test
Verifying dependencies for [email protected]
Info: Dependency on classes@>= 0.2.13 already satisfied
Verifying dependencies for [email protected]
Compiling /home/mw/nim/WORK/nim-simpledb/tests/tests (from package simpledb) using c backend
/home/mw/.choosenim/toolchains/nim-1.6.12/lib/impure/db_sqlite.nim(184, 1) Warning: Circular dependency detected. codeReordering pragma may not be able to reorder some nodes properly [User]
/home/mw/nim/WORK/nim-simpledb/src/simpledb.nim(106, 7) template/generic instantiation of class from here
/home/mw/nim/WORK/nim-simpledb/src/simpledb.nim(171, 9) Warning: The bare except clause is deprecated; use except CatchableError: instead [BareExcept]
Cleanup
Remove existing database
Database tests
Open database
Add a document
Replace a document
Update a document
Batch updates
Close and reopen database
Fetch a document by ID
Complex queries
Iterator
Delete a single document
/home/mw/nim/WORK/nim-simpledb/tests/tests.nim(154) tests
/home/mw/nim/WORK/nim-simpledb/src/simpledb.nim(419) remove
/home/mw/nim/WORK/nim-simpledb/src/simpledb.nim(395) remove
/home/mw/.choosenim/toolchains/nim-1.6.12/lib/impure/db_sqlite.nim(727) execAffectedRows
/home/mw/.choosenim/toolchains/nim-1.6.12/lib/impure/db_sqlite.nim(271) exec
/home/mw/.choosenim/toolchains/nim-1.6.12/lib/impure/db_sqlite.nim(198) dbError
Error: unhandled exception: near "LIMIT": syntax error [DbError]
Error: execution of an external program failed: '/home/mw/nim/WORK/nim-simpledb/tests/tests '
Tip: 4 messages have been suppressed, use --verbose to show them.
Error: Execution failed with exit code 1
... Command: /home/mw/.nimble/bin/nim c --noNimblePath -d:NimblePkgVersion=0.1.0 --path:/home/mw/.nimble/pkgs/classes-0.3.17 --hints:off -r --path:. /home/mw/nim/WORK/nim-simpledb/tests/tests
import pkg/simpledb, json
import std/strutils
db.close()
db.remove("one@two") is not working.
but this is working:
db.query()
.where("id", "==", "one@two")
.remove()
v0.1.0
The text was updated successfully, but these errors were encountered: