This commit is contained in:
Jaremy Creechley 2023-09-28 18:24:31 -07:00
parent e945e30626
commit 61c14e487c
No known key found for this signature in database
GPG Key ID: 4E66FB67B21D3300
5 changed files with 5 additions and 7 deletions

View File

@ -56,7 +56,7 @@ method close*(self: FSDatastore): Future[?!void] {.async.} =
proc new*(
T: type FSDatastore,
root: string,
tp: Taskpool,
tp: Taskpool = Taskpool.new(4),
depth = 2,
caseSensitive = true,
ignoreProtected = false

View File

@ -14,7 +14,7 @@ import ./threads/sqlbackend
import ./threads/threadproxy
import ./datastore
export datastore, keys, query, Taskpool, Memory
export datastore, keys, query, Taskpool, Memory, DbExt
push: {.upraises: [].}
@ -63,11 +63,10 @@ method query*(self: SQLiteDatastore,
proc new*(
T: type SQLiteDatastore,
path: string,
tp: Taskpool,
tp: Taskpool = Taskpool.new(4),
readOnly = false): ?!SQLiteDatastore =
let
backend = ? newSQLiteBackend[KeyId, DataBuffer](path, readOnly)
db = ? ThreadProxy.new(backend, tp = tp)
success SQLiteDatastore(db: db)

View File

@ -5,8 +5,9 @@ import pkg/questionable/results
import ./databuffer
import ../types
import ../key
export databuffer, types, SortOrder
export databuffer, types, key, SortOrder
## Types for datastore backends.
##

View File

@ -25,7 +25,6 @@ suite "Test Basic SQLiteDatastore":
basicStoreTests(ds, key, bytes, otherBytes)
suite "Test Read Only SQLiteDatastore":
let
path = currentSourcePath() # get this file's name

View File

@ -33,7 +33,6 @@ var
for i in 1..N:
suite "Test Basic ThreadDatastore with SQLite " & $i:
var
ds: SQLiteDatastore
key = Key.init("/a/b").tryGet()