update fsds

This commit is contained in:
Jaremy Creechley 2023-09-27 17:26:23 -07:00
parent 2eb0ee6e4e
commit 131712071f
No known key found for this signature in database
GPG Key ID: 4E66FB67B21D3300
1 changed files with 7 additions and 4 deletions

View File

@ -211,15 +211,18 @@ iterator iter*[K, V](handle: var DbQueryHandle[K, V, DataBuffer]): ?!DbQueryResp
keyPath = keyPath.replace("\\", "/")
let
fl = (handle.env.basePath / path).absolutePath()
key = Key.init(keyPath).expect("should not fail")
data =
if query.value:
let fl = (handle.env.basePath / path).absolutePath()
readFile[DataBuffer](handle.env.self, fl).expect("Should read file")
let res = readFile[DataBuffer](handle.env.self, fl)
if res.isErr():
yield failure res.error()
res.get()
else:
DataBuffer.new(0)
DataBuffer.new()
return success (key.some, data)
yield success (key.some, data)
proc new*(
T: type FSDatastore,