You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm tracking 15 different things for each org and often will increment or decrement multiple values within one mutation. The current use doesn't scale great, especially when you need sharding. A Stats like mode would be great.
In the ideal state this would be most helpful:
const statsForOrg = statsCounter.for("w57tj7fretc11ct91frbqwf2qh721exr");
await statsForOrg.inc(ctx, 'views'); // increment
await statsForOrg.dec(ctx, 'spentTokens'); // decrement
await statsForOrg.add(ctx, 'rank', 5); // add 5
await statsForOrg.subtract(ctx, 'tokens' , 2); // subtract 2
await statsForOrg.getAll(ctx)
await statsForOrg.estimateCounts(ctx, "w57tj7fretc11ct91frbqwf2qh721exr")
await statsForOrg.rebalance(ctx, "w57tj7fretc11ct91frbqwf2qh721exr");
however having the value support a string or v.any would allow for similar manual programming of this.
The text was updated successfully, but these errors were encountered:
I'm tracking 15 different things for each org and often will increment or decrement multiple values within one mutation. The current use doesn't scale great, especially when you need sharding. A Stats like mode would be great.
In the ideal state this would be most helpful:
const statsForOrg = statsCounter.for("w57tj7fretc11ct91frbqwf2qh721exr");
await statsForOrg.inc(ctx, 'views'); // increment
await statsForOrg.dec(ctx, 'spentTokens'); // decrement
await statsForOrg.add(ctx, 'rank', 5); // add 5
await statsForOrg.subtract(ctx, 'tokens' , 2); // subtract 2
await statsForOrg.getAll(ctx)
await statsForOrg.estimateCounts(ctx, "w57tj7fretc11ct91frbqwf2qh721exr")
await statsForOrg.rebalance(ctx, "w57tj7fretc11ct91frbqwf2qh721exr");
however having the value support a string or v.any would allow for similar manual programming of this.
The text was updated successfully, but these errors were encountered: