This commit is contained in:
Jaremy Creechley 2023-09-26 20:34:47 -07:00
parent 76590d4207
commit c7284b3b6f
No known key found for this signature in database
GPG Key ID: 4E66FB67B21D3300

View File

@ -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