UNPKG

@convex-dev/aggregate

Version:

[![npm version](https://badge.fury.io/js/@convex-dev%2Faggregate.svg?)](https://badge.fury.io/js/@convex-dev%2Faggregate)

45 lines 1.89 kB
export declare const init: import("convex/server").RegisteredMutation<"public", { maxNodeSize?: number | undefined; rootLazy?: boolean | undefined; }, Promise<void>>; /** * Call this mutation to reduce contention at the expense of more reads. * This is useful if writes are frequent and serializing all writes is * detrimental. * Lazy roots are the default; use `clear` to revert to eager roots. */ export declare const makeRootLazy: import("convex/server").RegisteredMutation<"public", {}, Promise<void>>; export declare const insert: import("convex/server").RegisteredMutation<"public", { key: import("convex/values").Value; value: import("convex/values").Value; summand?: number | undefined; }, Promise<void>>; export declare const delete_: import("convex/server").RegisteredMutation<"public", { key: import("convex/values").Value; }, Promise<void>>; export declare const replace: import("convex/server").RegisteredMutation<"public", { summand?: number | undefined; value: any; currentKey: any; newKey: any; }, Promise<void>>; export declare const deleteIfExists: import("convex/server").RegisteredMutation<"public", { key: any; }, Promise<void>>; export declare const replaceOrInsert: import("convex/server").RegisteredMutation<"public", { summand?: number | undefined; value: any; currentKey: any; newKey: any; }, Promise<void>>; /** * Reinitialize the aggregate data structure, clearing all data. * maxNodeSize is the sharding coefficient for the underlying btree. * rootLazy is whether to compute aggregates at the root eagerly or lazily. * If either is not provided, the existing value is preserved. */ export declare const clear: import("convex/server").RegisteredMutation<"public", { maxNodeSize?: number | undefined; rootLazy?: boolean | undefined; }, Promise<void>>; //# sourceMappingURL=public.d.ts.map