Example document setup at ./test/hero.mo
import Hero "./hero";
stable let hero_store = Hero.init();
let hero = Hero.use(hero_store);
hero.db.insert({
id=123;
updatedAt= 1;
score= 3;
name= "B";
level= 1;
skills= ["Fireball","Blizzard","Thunder"];
deleted= true
});
hero.db.delete(123);
hero.score.findIdx(0, ^0, #fwd, 10);
// [(idxkey, 1),(idxkey, 2),(idxkey, 3)]
hero.score.find(0, ^0, #fwd, 10);
// [{id=123; name="B" ...}, ...]
hero.pk.get(123);
// {id=123; name="B" ...}
hero.pk.getIdx(123);
// 1