🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@convex-dev/aggregate

Package Overview
Dependencies
Maintainers
0
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@convex-dev/aggregate - npm Package Compare versions

Comparing version

to
0.1.16-alpha.1

8

dist/commonjs/client/index.d.ts

@@ -66,2 +66,10 @@ import { DocumentByName, GenericDataModel, GenericMutationCtx, GenericQueryCtx, TableNamesInDataModel } from "convex/server";

/**
* @deprecated Use `indexOf` instead.
*/
offsetOf(ctx: RunQueryCtx, key: K, id?: ID, bounds?: Bounds<K, ID>): Promise<number>;
/**
* @deprecated Use `indexOf` instead.
*/
offsetUntil(ctx: RunQueryCtx, key: K, id?: ID, bounds?: Bounds<K, ID>): Promise<number>;
/**
* Gets the minimum item within the given bounds.

@@ -68,0 +76,0 @@ */

@@ -78,2 +78,14 @@ import { positionToKey, boundToPosition, keyToPosition, boundsToPositions, } from "./positions.js";

/**
* @deprecated Use `indexOf` instead.
*/
async offsetOf(ctx, key, id, bounds) {
return this.indexOf(ctx, key, { id, bounds });
}
/**
* @deprecated Use `indexOf` instead.
*/
async offsetUntil(ctx, key, id, bounds) {
return this.indexOf(ctx, key, { id, bounds, order: "desc" });
}
/**
* Gets the minimum item within the given bounds.

@@ -80,0 +92,0 @@ */

@@ -66,2 +66,10 @@ import { DocumentByName, GenericDataModel, GenericMutationCtx, GenericQueryCtx, TableNamesInDataModel } from "convex/server";

/**
* @deprecated Use `indexOf` instead.
*/
offsetOf(ctx: RunQueryCtx, key: K, id?: ID, bounds?: Bounds<K, ID>): Promise<number>;
/**
* @deprecated Use `indexOf` instead.
*/
offsetUntil(ctx: RunQueryCtx, key: K, id?: ID, bounds?: Bounds<K, ID>): Promise<number>;
/**
* Gets the minimum item within the given bounds.

@@ -68,0 +76,0 @@ */

@@ -78,2 +78,14 @@ import { positionToKey, boundToPosition, keyToPosition, boundsToPositions, } from "./positions.js";

/**
* @deprecated Use `indexOf` instead.
*/
async offsetOf(ctx, key, id, bounds) {
return this.indexOf(ctx, key, { id, bounds });
}
/**
* @deprecated Use `indexOf` instead.
*/
async offsetUntil(ctx, key, id, bounds) {
return this.indexOf(ctx, key, { id, bounds, order: "desc" });
}
/**
* Gets the minimum item within the given bounds.

@@ -80,0 +92,0 @@ */

2

package.json
{
"name": "@convex-dev/aggregate",
"description": "Convex component to calculate counts and sums of values for efficient aggregation.",
"version": "0.1.16-alpha.0",
"version": "0.1.16-alpha.1",
"keywords": [

@@ -6,0 +6,0 @@ "convex",

@@ -19,3 +19,3 @@ # Convex Component: Aggregate

4. Find the overall average score: `aggregate.sum(ctx) / aggregate.count(ctx)`
5. Find the ranking for a score of 65 in the leaderboard: `aggregate.offsetOf(ctx, 65)`
5. Find the ranking for a score of 65 in the leaderboard: `aggregate.indexOf(ctx, 65)`
6. Find the average score for an individual user. You can define another aggregate

@@ -22,0 +22,0 @@ partitioned by user and aggregate within each:

@@ -131,2 +131,25 @@ import {

/**
* @deprecated Use `indexOf` instead.
*/
async offsetOf(
ctx: RunQueryCtx,
key: K,
id?: ID,
bounds?: Bounds<K, ID>
): Promise<number> {
return this.indexOf(ctx, key, { id, bounds });
}
/**
* @deprecated Use `indexOf` instead.
*/
async offsetUntil(
ctx: RunQueryCtx,
key: K,
id?: ID,
bounds?: Bounds<K, ID>
): Promise<number> {
return this.indexOf(ctx, key, { id, bounds, order: "desc" });
}
/**
* Gets the minimum item within the given bounds.

@@ -133,0 +156,0 @@ */

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet