mirror of
https://github.com/logos-storage/nim-datastore.git
synced 2026-01-04 22:53:08 +00:00
19 lines
241 B
Nim
19 lines
241 B
Nim
import ./key
|
|
|
|
type
|
|
Query* = object
|
|
key: QueryKey
|
|
|
|
QueryKey* = Key
|
|
|
|
QueryResponse* = tuple[key: Key, data: seq[byte]]
|
|
|
|
proc init*(
|
|
T: type Query,
|
|
key: QueryKey): T =
|
|
|
|
T(key: key)
|
|
|
|
proc key*(self: Query): QueryKey =
|
|
self.key
|