From c7284b3b6fc9a950b04598a6a68eb2d015a4a690 Mon Sep 17 00:00:00 2001 From: Jaremy Creechley Date: Tue, 26 Sep 2023 20:34:47 -0700 Subject: [PATCH] cleanup --- datastore/backend.nim | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/datastore/backend.nim b/datastore/backend.nim index f6af983..01bae10 100644 --- a/datastore/backend.nim +++ b/datastore/backend.nim @@ -8,6 +8,12 @@ import ./types export databuffer, types, SortOrder +## Backend type for Datastores. +## +## These should be syncrhonous and work with both GC types +## and DataBuffer's. This makes it easier to make them threadsafe. +## + type DbQueryResponse*[K, V] = tuple[key: Option[K], data: V] @@ -22,6 +28,7 @@ type ## serialized Key ID, equivalent to `key.id()` data*: DataBuffer + ## Accepted backend key and value types DbKey* = string | KeyId DbVal* = seq[byte] | DataBuffer