88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
-
+
|
(db:initialize db))
;; Moving db:set-sync to a call in run.scm - it is a persistent value and only needs to be set once
;; (db:set-sync db)
db))
(define (open-in-mem-db)
(let* ((path (configf:lookup *configdat* "setup" "tmpdb"))
(fname (if path (conc path "/temp-megatest.db")))
(fname (if path (conc path "/temp-megatest.db") #f))
(exists (and path (file-exists? fname)))
(db (if path
(begin
(create-directory path #t)
(sqlite3:open-database fname))
(sqlite3:open-database ":memory:"))))
(if (not exists) (db:initialize db))
|