mirror of https://github.com/status-im/nim-eth.git
WAL pragma setting for in-memory databases results in "memory", not "wal"
This commit is contained in:
parent
e2ccbbb418
commit
9c9b9d5e2e
|
@ -145,10 +145,11 @@ proc init*(
|
||||||
discard sqlite3_close(env)
|
discard sqlite3_close(env)
|
||||||
return err($sqlite3_errstr(x))
|
return err($sqlite3_errstr(x))
|
||||||
|
|
||||||
if (let x = sqlite3_column_text(journalModePragma, 0); x != "wal"):
|
if (let x = sqlite3_column_text(journalModePragma, 0);
|
||||||
|
x != "memory" and x != "wal"):
|
||||||
discard sqlite3_finalize(journalModePragma)
|
discard sqlite3_finalize(journalModePragma)
|
||||||
discard sqlite3_close(env)
|
discard sqlite3_close(env)
|
||||||
return err("Invalid result from pramga")
|
return err("Invalid result from pragma: " & $x)
|
||||||
|
|
||||||
# TODO: check current version and implement schema versioning
|
# TODO: check current version and implement schema versioning
|
||||||
checkExec "PRAGMA user_version = 1;"
|
checkExec "PRAGMA user_version = 1;"
|
||||||
|
|
Loading…
Reference in New Issue