mirror of
https://github.com/logos-storage/nim-datastore.git
synced 2026-01-07 08:03:13 +00:00
reorg
This commit is contained in:
parent
e945e30626
commit
61c14e487c
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
@ -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.
|
||||
##
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user