mirror of
https://github.com/logos-storage/nim-datastore.git
synced 2026-01-05 23:23:10 +00:00
initial take at making fsds synchronous
This commit is contained in:
parent
bb9e343e9f
commit
235232a84f
@ -184,7 +184,8 @@ proc query*(
|
||||
self: FSDatastore,
|
||||
query: DbQuery[KeyId]): ?!QueryIter =
|
||||
|
||||
without path =? self.path(query.key), error:
|
||||
let key = query.key.toKey()
|
||||
without path =? self.path(key), error:
|
||||
return failure error
|
||||
|
||||
let basePath =
|
||||
@ -236,7 +237,7 @@ proc query*(
|
||||
key = Key.init(keyPath).expect("should not fail")
|
||||
data =
|
||||
if query.value:
|
||||
self.readFile[DataBuffer]((basePath / path).absolutePath)
|
||||
readFile[DataBuffer](self, (basePath / path).absolutePath)
|
||||
.expect("Should read file")
|
||||
else:
|
||||
@[]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user