@pipeline-builder/pipeline-data 4.1.2 → 4.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/lib/api/crud-service.d.ts +9 -7
- package/lib/api/crud-service.js +85 -50
- package/lib/api/reporting-service.js +34 -20
- package/lib/database/index.d.ts +0 -1
- package/lib/database/index.js +1 -2
- package/package.json +2 -2
- package/lib/database/migrator.d.ts +0 -20
- package/lib/database/migrator.js +0 -80
package/README.md
CHANGED
|
@@ -22,7 +22,6 @@ Database layer for [Pipeline Builder](https://mwashburn160.github.io/pipeline-bu
|
|
|
22
22
|
| `db` | Shared Drizzle database instance |
|
|
23
23
|
| `getConnection`, `closeConnection` | PostgreSQL connection lifecycle (with retry strategy) |
|
|
24
24
|
| `schema` | All Drizzle table definitions and their `*Insert` / `*Update` types |
|
|
25
|
-
| `runMigrations` (`MigrateOptions`) | Drizzle migration runner |
|
|
26
25
|
| `tenantContext`, `runWithTenantContext`, `getTenantContext`, `withTenantTx` | Tenant-context primitives for scoped/RLS transactions |
|
|
27
26
|
|
|
28
27
|
### Services
|
|
@@ -40,7 +40,10 @@ export interface QueryOptions {
|
|
|
40
40
|
sortOrder?: 'asc' | 'desc';
|
|
41
41
|
/** When true, runs a separate COUNT(*) query to include exact total. Default: false. */
|
|
42
42
|
includeTotal?: boolean;
|
|
43
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* Keyset pagination: the opaque `nextCursor` of the previous page. Continues
|
|
45
|
+
* strictly after that row in (sortBy, id) order; takes precedence over `offset`.
|
|
46
|
+
*/
|
|
44
47
|
cursor?: string;
|
|
45
48
|
/** Sparse fieldset: column names to select. Returns all columns when omitted. */
|
|
46
49
|
fields?: string[];
|
|
@@ -55,7 +58,7 @@ export interface PaginatedResult<T> {
|
|
|
55
58
|
limit: number;
|
|
56
59
|
offset: number;
|
|
57
60
|
hasMore: boolean;
|
|
58
|
-
/**
|
|
61
|
+
/** Opaque cursor for the next page. Present only when `hasMore`. */
|
|
59
62
|
nextCursor?: string;
|
|
60
63
|
}
|
|
61
64
|
/** The shared soft-delete retention window in ms (`SOFT_DELETE_RETENTION_DAYS`,
|
|
@@ -184,12 +187,11 @@ export declare abstract class CrudService<TEntity extends BaseEntity, TFilter, T
|
|
|
184
187
|
findPaginated(filter: Partial<TFilter>, orgId?: string, options?: QueryOptions, parentOrgId?: string): Promise<PaginatedResult<TEntity>>;
|
|
185
188
|
/**
|
|
186
189
|
* Build a column selection map for sparse fieldsets.
|
|
187
|
-
* Falls back to full select if no
|
|
190
|
+
* Falls back to full select if no fields are requested.
|
|
188
191
|
*
|
|
189
|
-
* `
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
* undefined cursor and stall paging. Included the same way `id` always is.
|
|
192
|
+
* `id` is always included — it is the entity identity AND the keyset cursor's
|
|
193
|
+
* tie-breaker. The sort value for the cursor is projected separately (as text)
|
|
194
|
+
* by `findPaginated`, so the fieldset need not carry the sort column.
|
|
193
195
|
*/
|
|
194
196
|
private buildFieldSelect;
|
|
195
197
|
/**
|