nim-datastore/datastore/datastore2.nim
2023-09-19 19:50:55 -07:00

16 lines
504 B
Nim

import pkg/questionable/results
import pkg/upraises
import threads/databuffer
push: {.upraises: [].}
type
Datastore2* = object of RootObj
has*: proc(self: Datastore2, key: KeyBuffer): ?!bool {.nimcall.}
delete*: proc(self: Datastore2, key: KeyBuffer): ?!void {.nimcall.}
get*: proc(self: Datastore2, key: KeyBuffer): ?!ValueBuffer {.nimcall.}
put*: proc(self: Datastore2, key: KeyBuffer, data: ValueBuffer): ?!void {.nimcall.}
close*: proc(self: Datastore2): ?!void {.nimcall.}