type CursorExpressions = object;
type CursorExpressions = object;
Defined in: packages/db/src/types.ts:263
Cursor expressions for pagination, passed separately from the main where clause. The sync layer can choose to use cursor-based pagination (combining these with the where) or offset-based pagination (ignoring these and using the offset parameter).
Neither expression includes the main where clause - they are cursor-specific only.
optional lastKey: string | number;
optional lastKey: string | number;
Defined in: packages/db/src/types.ts:281
The key of the last item that was loaded. Can be used by sync layers for tracking or deduplication.
whereCurrent: BasicExpression<boolean>;
whereCurrent: BasicExpression<boolean>;
Defined in: packages/db/src/types.ts:276
Expression for rows equal to the current cursor value (first orderBy column only). Used to handle tie-breaking/duplicates at the boundary. Example: eq(col1, v1) or for Dates: and(gte(col1, v1), lt(col1, v1+1ms))
whereFrom: BasicExpression<boolean>;
whereFrom: BasicExpression<boolean>;
Defined in: packages/db/src/types.ts:270
Expression for rows greater than (after) the cursor value. For multi-column orderBy, this is a composite cursor using OR of conditions. Example for [col1 ASC, col2 DESC] with values [v1, v2]: or(gt(col1, v1), and(eq(col1, v1), lt(col2, v2)))
