tagion_hibon_add_time

extern (C)
int
tagion_hibon_add_time
(,
const char* key
,
const size_t key_len
,
const(int64_t) time
)

Examples

HiBONT h;
int rt = tagion_hibon_create(&h);
assert(rt == ErrorCode.none, "could not create hibon");
string key = "some_key";
auto insert_time = sdt_t(12_345);

rt = tagion_hibon_add_time(&h, &key[0], key.length, cast(int64_t) insert_time);
assert(rt == ErrorCode.none, "could not add time");

HiBON result = cast(HiBON) h.hibon;
import tagion.hibon.HiBONBase : Type;

assert(result[key].type == Type.TIME);
assert(result[key].get!sdt_t == insert_time);