char/avril
(wip) why'd you have to go and make things so complicaaaaated?
git clone https://git.t4t.associates/char/avril
78f4748
main
1declare module"ext:core/ops" { 2export function op_kv_open ( args :[ path :string , access :string , create :boolean ]) :Promise < number >; 3export function op_kv_close ( id :number ) :Promise < void >; 4export function op_kv_list_keyspaces ( id :number ) :Promise < string []>; 5export function op_kv_get_many ( 6args :[ db :number , keyspace :string , keys :Uint8Array []], 7) :Promise <([ value :Uint8Array , stamp :string ] | null )[]>; 8export function op_kv_set ( 9args :[ db :number , keyspace :string , key :Uint8Array , value :Uint8Array ], 10) :Promise < string >; 11export function op_kv_delete ( args :[ db :number , keyspace :string , key :Uint8Array ]) :Promise < void >; 12export function op_kv_list ( args :{ 13db :number ; 14keyspace :string ; 15start :Uint8Array | null ; 16end :Uint8Array | null ; 17prefix :Uint8Array | null ; 18limit :number ; 19reverse :boolean ; 20}) :Promise <[ key :Uint8Array , value :Uint8Array , stamp :string ][]>; 21export function op_kv_clear ( args :[ db :number , keyspace :string ]) :Promise < void >; 22export function op_kv_atomic ( 23args :[ 24db :number , 25ops :( 26| { t :"check" ; ks :string ; key :Uint8Array ; expected :string | null } 27| { t :"set" ; ks :string ; key :Uint8Array ; value :Uint8Array } 28| { t :"delete" ; ks :string ; key :Uint8Array } 29)[], 30], 31) :Promise <[ ok :boolean , stamp :string | null ]>; 32}