etsdb_object:make_kv() not working as expected
mtourne opened this issue · comments
Matthieu Tourne commented
From what I gathered in the "doc", this is supposed to be the entry point if one were to use etsdb as a library.
However, this call will fail :
etsdb_object:make_kv(etsdb_tkb, {{foo, now_in_milliseconds()}, <<0.0/float>>}, round(now_in_milliseconds())).
The problem appears to be etsdb_tkb:serialize(Data, ForBackEnd)
returning a list instead of a tuple as expected here :
{UserKey,UserData} = Bucket:serialize(UserObject),```
Ilya Sidorov commented
To use it
- Implement
bucket
behaviour (while it seems buggy(#5) you can useetsdb_tkb
) as an example - Use
etsdb_put
,etsdb_scan
to write and read data
Ilya Sidorov commented
Or you can use etsdb_tkb
with etsdb_put
& etsdb_scan
Dreyk commented
etsdb_put:put(etsdb_tkb,[{{k,I},<<I/integer>>}||I<-lists:seq(1,1000)]).
etsdb_scan:scan(etsdb_tkb:read_spec(k,0,1000),6000)
Matthieu Tourne commented
ps. maybe this should make it into the readme ?