@spooky-sync/query-builder 0.0.1-canary.21 → 0.0.1-canary.211
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/AGENTS.md +63 -0
- package/dist/index.d.mts +149 -8
- package/dist/index.d.mts.map +1 -1
- package/dist/index.d.ts +149 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +208 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +207 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/skills/{spooky-query-builder → sp00ky-query-builder}/SKILL.md +9 -9
- package/src/index.ts +11 -0
- package/src/query-builder.test.ts +213 -4
- package/src/query-builder.ts +343 -20
- package/src/repro_relationship.test.ts +1 -1
- package/src/table-schema.ts +38 -3
- package/src/types.ts +110 -5
- /package/skills/{spooky-query-builder → sp00ky-query-builder}/references/type-helpers.md +0 -0
package/AGENTS.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# `@spooky-sync/query-builder` — agent guide
|
|
2
|
+
|
|
3
|
+
## What this package is
|
|
4
|
+
|
|
5
|
+
The type-safe SurrealQL query builder used by `@spooky-sync/core` and `@spooky-sync/client-solid`. It encodes the user's `.surql` schema as a TypeScript type and rejects invalid table names, fields, and relationship traversals at compile time. It also serializes builder chains into SurQL strings for execution.
|
|
6
|
+
|
|
7
|
+
You usually don't import this directly — `db.query('thread')` returns a `QueryBuilder` and the package's types are re-exported from `@spooky-sync/client-solid`. Reach for it when writing generic helpers, type utilities, or non-Solid bindings.
|
|
8
|
+
|
|
9
|
+
## DSL overview
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
db.query('thread') // QueryBuilder<Schema, 'thread', ...>
|
|
13
|
+
.where({ active: true }) // partial-equality filter
|
|
14
|
+
.select('id', 'title', 'created_at') // omit for SELECT *
|
|
15
|
+
.related('author') // follow a record-link relationship
|
|
16
|
+
.related('comments', { orderBy: { created_at: 'desc' } })
|
|
17
|
+
.orderBy('created_at', 'desc')
|
|
18
|
+
.limit(20)
|
|
19
|
+
.offset(0)
|
|
20
|
+
.build(); // → FinalQuery (call .run() or hand to useQuery)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
`build()` returns a `FinalQuery`. `useQuery(() => ...build())` calls `.run()` for you and tracks the factory reactively. Standalone consumers call `.run()` themselves; the executor returns whatever the binding configures (in client-solid: a `Sp00kyQueryResultPromise`).
|
|
24
|
+
|
|
25
|
+
## Key exports (`src/index.ts`)
|
|
26
|
+
|
|
27
|
+
- **Builders**: `QueryBuilder`, `InnerQuery`, `FinalQuery`, `Executor`, `buildQueryFromOptions`, `cyrb53` (hash function used to dedupe queries).
|
|
28
|
+
- **Schema type helpers** (load-bearing — these power the type-safety in every consumer):
|
|
29
|
+
- `SchemaStructure` — the shape of the generated `schema` object.
|
|
30
|
+
- `TableNames<S>` — union of valid table name literals.
|
|
31
|
+
- `GetTable<S, T>` / `TableModel<T>` — row type for table `T`.
|
|
32
|
+
- `TableRelationships<S, T>` / `RelationshipFieldsFromSchema<S, T>` — the typed relationship surface.
|
|
33
|
+
- `BackendNames<S>` / `BackendRoutes<S, B>` / `RoutePayload<S, B, R>` — for `db.run(...)`.
|
|
34
|
+
- `BucketNames<S>` / `BucketConfig<S, B>` / `BucketDefinitionSchema`.
|
|
35
|
+
- `AccessDefinition`, `TypeNameToTypeMap`.
|
|
36
|
+
- **Query result types**: `QueryResult`, `RelatedFieldsMap`, `BuildResultModelOne`, `BuildResultModelMany`, `WithRelated`, `GetCardinality`.
|
|
37
|
+
- **Modifier helpers**: `QueryModifier`, `QueryModifierBuilder`, `SchemaAwareQueryModifier`, `SchemaAwareQueryModifierBuilder`.
|
|
38
|
+
|
|
39
|
+
## Builder method surface
|
|
40
|
+
|
|
41
|
+
- `.where(partial)` — equality filters; `partial` is `Partial<TableModel<...>>`.
|
|
42
|
+
- `.select(...fields)` — narrow returned columns. Calling twice throws.
|
|
43
|
+
- `.orderBy(field, 'asc' | 'desc')`.
|
|
44
|
+
- `.limit(n)`, `.offset(n)`.
|
|
45
|
+
- `.related(field, modifier?)` — pull in a related record (or array) by field name. `modifier` is a builder callback for nested filters / selects on the related table. Three signatures: `(field)`, `(field, modifier)`, `(field, cardinality, modifier)`.
|
|
46
|
+
- `.build()` — produces a `FinalQuery`.
|
|
47
|
+
- `FinalQuery.run()` — executes via the configured executor.
|
|
48
|
+
- `FinalQuery.selectLive()` — returns the LIVE SELECT `QueryInfo` for subscriptions.
|
|
49
|
+
- `FinalQuery.buildUpdateQuery(patches)` / `buildDeleteQuery()` — used by `db.update` / `db.delete` internally.
|
|
50
|
+
|
|
51
|
+
## Common gotchas
|
|
52
|
+
|
|
53
|
+
- **`select()` is exclusive.** Either select specific fields or omit the call for `*` — don't chain `.select(...)` more than once.
|
|
54
|
+
- **Relationships must exist in the schema.** `related('foo')` is a type error if `foo` isn't a relationship column. Run `spky generate` after editing the `.surql` to refresh the type.
|
|
55
|
+
- **`where` is equality-only.** For `>`, `<`, `IN`, free-form predicates, use `db.useRemote(s => s.query(...))` and write SurQL directly.
|
|
56
|
+
- **Record-ID strings are auto-parsed.** Passing `"thread:abc"` into a `where` matches a `RecordId('thread', 'abc')`. Don't double-wrap.
|
|
57
|
+
- **The serialized SurQL is hashable.** `cyrb53` over the query string drives cache keys — two builders that produce identical SurQL share a cache entry.
|
|
58
|
+
|
|
59
|
+
## Pointers
|
|
60
|
+
|
|
61
|
+
- Sync engine (executor implementation): `node_modules/@spooky-sync/core/AGENTS.md`
|
|
62
|
+
- Reactive consumption: `node_modules/@spooky-sync/client-solid/AGENTS.md`
|
|
63
|
+
- Schema authoring: `node_modules/@spooky-sync/cli/AGENTS.md`
|
package/dist/index.d.mts
CHANGED
|
@@ -4,15 +4,40 @@ import { RecordId } from "surrealdb";
|
|
|
4
4
|
/**
|
|
5
5
|
* Supported value types in the schema
|
|
6
6
|
*/
|
|
7
|
-
type ValueType = 'string' | 'number' | 'boolean' | 'null' | 'json';
|
|
7
|
+
type ValueType = 'string' | 'number' | 'boolean' | 'null' | 'json' | 'Uint8Array';
|
|
8
8
|
/**
|
|
9
9
|
* Column metadata defining the type and optionality of a field
|
|
10
10
|
*/
|
|
11
|
+
/**
|
|
12
|
+
* CRDT types supported by Sp00ky's Loro integration
|
|
13
|
+
*/
|
|
14
|
+
type CrdtType = 'text' | 'map' | 'list' | 'counter';
|
|
11
15
|
interface ColumnSchema {
|
|
12
16
|
readonly type: ValueType;
|
|
13
17
|
readonly optional: boolean;
|
|
14
18
|
readonly dateTime?: boolean;
|
|
15
19
|
readonly recordId?: boolean;
|
|
20
|
+
readonly crdt?: CrdtType;
|
|
21
|
+
readonly cursor?: boolean;
|
|
22
|
+
/** True for `TYPE bytes` columns. Runtime values are `Uint8Array`. */
|
|
23
|
+
readonly bytes?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* True for `TYPE array<...>` columns. `type` then names the ELEMENT type, so
|
|
26
|
+
* the runtime value is `ElementType[]` (e.g. `array<string>` → `string[]`).
|
|
27
|
+
*/
|
|
28
|
+
readonly array?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* True for `-- @opaque` columns: the value IS synced to the client and can be
|
|
31
|
+
* read from a query result, but the sync engine never stores it server-side.
|
|
32
|
+
*
|
|
33
|
+
* That makes it unusable for anything the server has to evaluate — `where`,
|
|
34
|
+
* `orderBy`, joins, aggregates, table permissions — because the SSP has no
|
|
35
|
+
* value to evaluate against. A predicate on such a column would appear to work
|
|
36
|
+
* locally (the local cache does hold the value) while matching nothing
|
|
37
|
+
* server-side, so the query builder rejects it outright instead of letting the
|
|
38
|
+
* two diverge silently.
|
|
39
|
+
*/
|
|
40
|
+
readonly opaque?: boolean;
|
|
16
41
|
}
|
|
17
42
|
/**
|
|
18
43
|
* Table metadata containing columns and primary key information
|
|
@@ -59,13 +84,21 @@ type TypeNameToTypeMap = {
|
|
|
59
84
|
boolean: boolean;
|
|
60
85
|
null: null;
|
|
61
86
|
json: unknown;
|
|
87
|
+
Uint8Array: Uint8Array;
|
|
62
88
|
};
|
|
89
|
+
/**
|
|
90
|
+
* The element/base TS type of a column, wrapping in an array for `array: true`
|
|
91
|
+
* columns (where `type` names the element type).
|
|
92
|
+
*/
|
|
93
|
+
type ColumnBaseTSType<T extends ColumnSchema> = T extends {
|
|
94
|
+
array: true;
|
|
95
|
+
} ? TypeNameToTypeMap[T['type']][] : TypeNameToTypeMap[T['type']];
|
|
63
96
|
/**
|
|
64
97
|
* Convert a column type to its TypeScript type
|
|
65
98
|
*/
|
|
66
99
|
type ColumnToTSType<T extends ColumnSchema> = T extends {
|
|
67
100
|
optional: true;
|
|
68
|
-
} ?
|
|
101
|
+
} ? ColumnBaseTSType<T> | null : ColumnBaseTSType<T>;
|
|
69
102
|
/**
|
|
70
103
|
* Helper to extract relationship field names for a table
|
|
71
104
|
*/
|
|
@@ -197,6 +230,74 @@ interface QueryInfo {
|
|
|
197
230
|
query: string;
|
|
198
231
|
hash: number;
|
|
199
232
|
vars?: Record<string, unknown>;
|
|
233
|
+
/**
|
|
234
|
+
* Engine-neutral description of the same SELECT, used by non-SurrealQL local
|
|
235
|
+
* cache backends (e.g. SQLite) that cannot parse the `query` string. Only
|
|
236
|
+
* populated for `SELECT` (undefined for LIVE/UPDATE/DELETE). See `QueryPlan`.
|
|
237
|
+
*/
|
|
238
|
+
plan?: QueryPlan;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* A single WHERE comparison. `value` is the resolved value (string IDs already
|
|
242
|
+
* converted to `RecordId`); when `paramRef` is set the condition references an
|
|
243
|
+
* existing query param verbatim (`$name`) instead of an inline value. `swap`
|
|
244
|
+
* flips the operands (`value op field`), mirroring `ComparisonOp._swap`.
|
|
245
|
+
*/
|
|
246
|
+
interface WhereComparison {
|
|
247
|
+
field: string;
|
|
248
|
+
op: ComparisonOp['_op'];
|
|
249
|
+
value: unknown;
|
|
250
|
+
paramRef?: string;
|
|
251
|
+
swap?: boolean;
|
|
252
|
+
}
|
|
253
|
+
/** A parenthesised `(c1 OR c2 …)` group, from a `_or` fragment. */
|
|
254
|
+
interface WhereOr {
|
|
255
|
+
or: WhereComparison[];
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Engine-neutral WHERE: a top-level conjunction (AND) of comparisons and/or
|
|
259
|
+
* OR-groups. Mirrors `buildQueryFromOptions`'s condition assembly exactly.
|
|
260
|
+
*/
|
|
261
|
+
type WhereNode = WhereComparison | WhereOr;
|
|
262
|
+
/**
|
|
263
|
+
* Engine-neutral description of a SELECT query. Backends render it to their own
|
|
264
|
+
* dialect (SurrealQL, SQLite, …). Relations are resolved by the caller via
|
|
265
|
+
* level-ordered decomposition rather than nested projection, so `relations`
|
|
266
|
+
* carries the tree rather than a flattened subquery string.
|
|
267
|
+
*/
|
|
268
|
+
interface QueryPlan {
|
|
269
|
+
table: string;
|
|
270
|
+
/** Projection field names; undefined means all (`*`). */
|
|
271
|
+
select?: string[];
|
|
272
|
+
where?: WhereNode[];
|
|
273
|
+
orderBy?: [field: string, direction: 'asc' | 'desc'][];
|
|
274
|
+
limit?: number;
|
|
275
|
+
offset?: number;
|
|
276
|
+
relations?: RelationPlan[];
|
|
277
|
+
/**
|
|
278
|
+
* Window materialization: when set, the base rows are EXACTLY these record
|
|
279
|
+
* ids (the window the SSP already computed), ignoring `where`/`limit`/
|
|
280
|
+
* `offset`. `orderBy`, `select` and `relations` still apply. Set by
|
|
281
|
+
* {@link buildWindowMaterializationPlan}; see `window-query.ts`.
|
|
282
|
+
*/
|
|
283
|
+
ids?: unknown[];
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* One `.related()` edge in a {@link QueryPlan}. Correlation:
|
|
287
|
+
* - `one` → parent[`foreignKeyField`] = child.id (attach `bucket[0] ?? null`)
|
|
288
|
+
* - `many` → child[`foreignKeyField`] = parent.id (attach `bucket`)
|
|
289
|
+
* `limit`/`orderBy` are applied PER PARENT during decomposition.
|
|
290
|
+
*/
|
|
291
|
+
interface RelationPlan {
|
|
292
|
+
alias: string;
|
|
293
|
+
table: string;
|
|
294
|
+
cardinality: 'one' | 'many';
|
|
295
|
+
foreignKeyField: string;
|
|
296
|
+
select?: string[];
|
|
297
|
+
where?: WhereNode[];
|
|
298
|
+
orderBy?: [field: string, direction: 'asc' | 'desc'][];
|
|
299
|
+
limit?: number;
|
|
300
|
+
relations?: RelationPlan[];
|
|
200
301
|
}
|
|
201
302
|
interface RelatedQuery {
|
|
202
303
|
/** The name of the related table to query */
|
|
@@ -208,9 +309,34 @@ interface RelatedQuery {
|
|
|
208
309
|
/** The cardinality of the relationship */
|
|
209
310
|
cardinality: 'one' | 'many';
|
|
210
311
|
}
|
|
312
|
+
/**
|
|
313
|
+
* Comparison-operator descriptor for a single WHERE field, e.g.
|
|
314
|
+
* `{ _op: '<=', _val: 5 }` → `field <= $field`. A `$`-prefixed string `_val`
|
|
315
|
+
* references an existing query param verbatim; `_swap: true` flips the operands
|
|
316
|
+
* (`$val _op field`). Plain values still mean equality (`field = $field`).
|
|
317
|
+
*/
|
|
318
|
+
interface ComparisonOp {
|
|
319
|
+
_op: '=' | '!=' | '>' | '>=' | '<' | '<=' | (string & {});
|
|
320
|
+
_val: unknown;
|
|
321
|
+
_swap?: boolean;
|
|
322
|
+
}
|
|
323
|
+
/** A single WHERE field value: an equality value or a comparison descriptor. */
|
|
324
|
+
type WhereFieldValue<V> = V | ComparisonOp;
|
|
325
|
+
/** A flat conjunction of field conditions (equality or comparison). */
|
|
326
|
+
type WhereConditions<TModel extends GenericModel> = { [K in keyof TModel]?: WhereFieldValue<TModel[K]> };
|
|
327
|
+
/**
|
|
328
|
+
* WHERE input for `.where()`. Supports equality (`{ field: value }`), comparison
|
|
329
|
+
* operators (`{ field: { _op, _val } }`), and a single top-level `_or` group of
|
|
330
|
+
* condition fragments that compile to a parenthesised `(... OR ...)` conjunct —
|
|
331
|
+
* e.g. `{ _or: [{ white: x }, { black: x }] }` → `(white = $white__or0 OR black = $black__or1)`.
|
|
332
|
+
* Backward-compatible with plain `Partial<TModel>` equality objects.
|
|
333
|
+
*/
|
|
334
|
+
type WhereInput<TModel extends GenericModel> = WhereConditions<TModel> & {
|
|
335
|
+
_or?: WhereConditions<TModel>[];
|
|
336
|
+
};
|
|
211
337
|
interface QueryOptions<TModel extends GenericModel, IsOne extends boolean> {
|
|
212
338
|
select?: ((keyof TModel & string) | '*')[];
|
|
213
|
-
where?:
|
|
339
|
+
where?: WhereInput<TModel>;
|
|
214
340
|
limit?: number;
|
|
215
341
|
offset?: number;
|
|
216
342
|
orderBy?: Partial<Record<keyof TModel, 'asc' | 'desc'>>;
|
|
@@ -218,11 +344,11 @@ interface QueryOptions<TModel extends GenericModel, IsOne extends boolean> {
|
|
|
218
344
|
related?: RelatedQuery[];
|
|
219
345
|
isOne?: IsOne;
|
|
220
346
|
}
|
|
221
|
-
|
|
347
|
+
type LiveQueryOptions<TModel extends GenericModel> = Omit<QueryOptions<TModel, boolean>, 'orderBy'>;
|
|
222
348
|
type QueryModifier<TModel extends GenericModel> = (builder: QueryModifierBuilder<TModel>) => QueryModifierBuilder<TModel>;
|
|
223
349
|
type SchemaAwareQueryModifier<S extends SchemaStructure, TableName extends TableNames<S>, RelatedFields extends Record<string, any> = {}> = (builder: SchemaAwareQueryModifierBuilder<S, TableName, {}>) => SchemaAwareQueryModifierBuilder<S, TableName, RelatedFields>;
|
|
224
350
|
interface QueryModifierBuilder<TModel extends GenericModel> {
|
|
225
|
-
where(conditions:
|
|
351
|
+
where(conditions: WhereInput<TModel>): this;
|
|
226
352
|
select(...fields: ((keyof TModel & string) | '*')[]): this;
|
|
227
353
|
limit(count: number): this;
|
|
228
354
|
offset(count: number): this;
|
|
@@ -231,7 +357,7 @@ interface QueryModifierBuilder<TModel extends GenericModel> {
|
|
|
231
357
|
_getOptions(): QueryOptions<TModel, boolean>;
|
|
232
358
|
}
|
|
233
359
|
interface SchemaAwareQueryModifierBuilder<S extends SchemaStructure, TableName extends TableNames<S>, RelatedFields extends Record<string, any> = {}> {
|
|
234
|
-
where(conditions:
|
|
360
|
+
where(conditions: WhereInput<TableModel<GetTable<S, TableName>>>): this;
|
|
235
361
|
select(...fields: ((keyof TableModel<GetTable<S, TableName>> & string) | '*')[]): this;
|
|
236
362
|
limit(count: number): this;
|
|
237
363
|
offset(count: number): this;
|
|
@@ -371,7 +497,7 @@ declare class QueryBuilder<const S extends SchemaStructure, const TableName exte
|
|
|
371
497
|
/**
|
|
372
498
|
* Add additional where conditions
|
|
373
499
|
*/
|
|
374
|
-
where(conditions:
|
|
500
|
+
where(conditions: WhereInput<TableModel<GetTable<S, TableName>>>): QueryBuilder<S, TableName, R, RelatedFields, IsOne>;
|
|
375
501
|
/**
|
|
376
502
|
* Specify fields to select
|
|
377
503
|
*/
|
|
@@ -409,6 +535,21 @@ declare class QueryBuilder<const S extends SchemaStructure, const TableName exte
|
|
|
409
535
|
*/
|
|
410
536
|
build(): FinalQuery<S, TableName, GetTable<S, TableName>, RelatedFields, IsOne, R>;
|
|
411
537
|
}
|
|
538
|
+
/**
|
|
539
|
+
* The surql param name an `_or` branch condition binds under: the branch FIELD,
|
|
540
|
+
* a `__or` marker and the branch's position. The position alone makes it unique
|
|
541
|
+
* within the query; the field prefix is what lets a consumer type the value by
|
|
542
|
+
* looking the column up (see {@link baseFieldOfParam}). Non-identifier
|
|
543
|
+
* characters (a nested path like `database.owner`) are folded to `_` so the
|
|
544
|
+
* result is a legal param name.
|
|
545
|
+
*/
|
|
546
|
+
declare function orParamName(field: string, index: number): string;
|
|
547
|
+
/**
|
|
548
|
+
* Inverse of {@link orParamName}: the field a param name was built from, or the
|
|
549
|
+
* name itself when it is a plain top-level param (`field = $field`). Lets a
|
|
550
|
+
* consumer resolve `white__or0` back to the `white` column.
|
|
551
|
+
*/
|
|
552
|
+
declare function baseFieldOfParam(name: string): string;
|
|
412
553
|
declare function cyrb53(str: string, seed?: number): number;
|
|
413
554
|
/**
|
|
414
555
|
* Build a query string from query options
|
|
@@ -422,5 +563,5 @@ declare function buildQueryFromOptions<TModel extends GenericModel, IsOne extend
|
|
|
422
563
|
//# sourceMappingURL=query-builder.d.ts.map
|
|
423
564
|
|
|
424
565
|
//#endregion
|
|
425
|
-
export { type AccessDefinition, type BackendNames, type BackendRoutes, type BucketConfig, type BucketDefinitionSchema, type BucketNames, type BuildRelatedFields, type BuildResultModelMany, type BuildResultModelOne, type Cardinality, type ColumnSchema, type Executor, type ExtractFieldNames, FinalQuery, type GenericModel, type GenericSchema, type GetCardinality, type GetRelationship, type GetRelationshipFields, type GetTable, type InferRelatedModelFromMetadata, InnerQuery, type LiveQueryOptions, QueryBuilder, type QueryInfo, type QueryModifier, type QueryModifierBuilder, type QueryOptions, type QueryResult, RecordId, type RelatedField, type RelatedFieldMapEntry, type RelatedFieldsMap, type RelatedQuery, type RelationshipDefinition, type RelationshipFields, type RelationshipFields$1 as RelationshipFieldsFromSchema, type RelationshipMetadata, type RelationshipsMetadata, type RoutePayload, type SchemaAwareQueryModifier, type SchemaAwareQueryModifierBuilder, type SchemaMetadataStructure, type SchemaStructure, type SchemaToIndexed, type TableModel, type TableNames, type TableRelationships, type TableSchemaMetadata, type TypeNameToTypeMap, type ValueType, type WithRelated, buildQueryFromOptions, cyrb53 };
|
|
566
|
+
export { type AccessDefinition, type BackendNames, type BackendRoutes, type BucketConfig, type BucketDefinitionSchema, type BucketNames, type BuildRelatedFields, type BuildResultModelMany, type BuildResultModelOne, type Cardinality, type ColumnSchema, type ComparisonOp, type Executor, type ExtractFieldNames, FinalQuery, type GenericModel, type GenericSchema, type GetCardinality, type GetRelationship, type GetRelationshipFields, type GetTable, type InferRelatedModelFromMetadata, InnerQuery, type LiveQueryOptions, QueryBuilder, type QueryInfo, type QueryModifier, type QueryModifierBuilder, type QueryOptions, type QueryPlan, type QueryResult, RecordId, type RelatedField, type RelatedFieldMapEntry, type RelatedFieldsMap, type RelatedQuery, type RelationPlan, type RelationshipDefinition, type RelationshipFields, type RelationshipFields$1 as RelationshipFieldsFromSchema, type RelationshipMetadata, type RelationshipsMetadata, type RoutePayload, type SchemaAwareQueryModifier, type SchemaAwareQueryModifierBuilder, type SchemaMetadataStructure, type SchemaStructure, type SchemaToIndexed, type TableModel, type TableNames, type TableRelationships, type TableSchemaMetadata, type TypeNameToTypeMap, type ValueType, type WhereComparison, type WhereConditions, type WhereFieldValue, type WhereInput, type WhereNode, type WhereOr, type WithRelated, baseFieldOfParam, buildQueryFromOptions, cyrb53, orParamName };
|
|
426
567
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/table-schema.ts","../src/types.ts","../src/query-builder.ts"],"sourcesContent":[],"mappings":";;;;;;AAGY,KAAA,SAAA,GAAS,QAAA,GAAA,QAAA,GAAA,SAAA,GAAA,MAAA,GAAA,MAAA;AAKrB;AAUA;AAWA;AAKiB,UA1BA,YAAA,CA0BoB;EAUpB,SAAA,IAAA,EAnCA,SAmCA;EAAuB,SAAA,QAAA,EAAA,OAAA;WAEN,QAAA,CAAA,EAAA,OAAA;WAIE,QAAA,CAAA,EAAA,OAAA;;AAQpC;AAWA;;AAAqC,UAnDpB,mBAAA,CAmDoB;WAAgB,IAAA,EAAA,MAAA;WAGjD,OAAA,EAAA;IAAkB,UAAA,UAAA,EAAA,MAAA,CAAA,EAnDa,YAmDb;;WACA,UAAA,EAAA,SAAA,MAAA,EAAA;;AAgCtB;;;AAEqB,KA9ET,WAAA,GA8ES,KAAA,GAAA,MAAA;;;;AAWJ,UApFA,oBAAA,CAoFsB;EActB,SAAA,KAAA,EAAA,MAAe;EAAA,SAAA,KAAA,EAAA,MAAA;WAGK,WAAA,EAlGb,WAkGa;;;;;;AAUjB,UArGH,uBAAA,CAqGG;WACU,MAAA,EAAA;IAAsB,UAAA,SAAA,EAAA,MAAA,CAAA,EApGlB,mBAoGkB;EAGnC,CAAA;EAA2B,SAAA,aAAA,EAAA;IAEV,UAAA,SAAA,EAAA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EkcnB,CFlcmB,EEkchB,SFlcgB,EEkcL,QFlcK,CEkcI,CFlcJ,EEkcO,SFlcP,CAAA,EEkcmB,aFlcnB,EEkckC,KFlclC,EEkcyC,CFlczC,CAAA;;;;;;;;;;AAGpC,iBEidW,WAAA,CFjdC,KAAA,EAAA,MAAA,EAAA,KAAA,EAAA,MAAA,CAAA,EAAA,MAAA;;;;;;AAGY,iBEudb,gBAAA,CFvda,IAAA,EAAA,MAAA,CAAA,EAAA,MAAA;AAAjB,iBE4dI,MAAA,CF5dJ,GAAA,EAAA,MAAA,EAAA,IAAA,CAAA,EAAA,MAAA,CAAA,EAAA,MAAA;;;;;;;;;AAQkB,iBE0jBd,qBF1jBc,CAAA,eE0jBuB,YF1jBvB,EAAA,cAAA,OAAA,CAAA,CAAA,MAAA,EAAA,QAAA,GAAA,aAAA,GAAA,kBAAA,GAAA,QAAA,GAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,OAAA,EE6jBnB,YF7jBmB,CE6jBN,MF7jBM,EE6jBE,KF7jBF,CAAA,EAAA,MAAA,EE8jBpB,eF9jBoB,EAAA,OAAA,CAAA,EAAA,GAAA,EAAA,CAAA,EEgkB3B,SFhkB2B"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,15 +4,40 @@ import { RecordId } from "surrealdb";
|
|
|
4
4
|
/**
|
|
5
5
|
* Supported value types in the schema
|
|
6
6
|
*/
|
|
7
|
-
type ValueType = 'string' | 'number' | 'boolean' | 'null' | 'json';
|
|
7
|
+
type ValueType = 'string' | 'number' | 'boolean' | 'null' | 'json' | 'Uint8Array';
|
|
8
8
|
/**
|
|
9
9
|
* Column metadata defining the type and optionality of a field
|
|
10
10
|
*/
|
|
11
|
+
/**
|
|
12
|
+
* CRDT types supported by Sp00ky's Loro integration
|
|
13
|
+
*/
|
|
14
|
+
type CrdtType = 'text' | 'map' | 'list' | 'counter';
|
|
11
15
|
interface ColumnSchema {
|
|
12
16
|
readonly type: ValueType;
|
|
13
17
|
readonly optional: boolean;
|
|
14
18
|
readonly dateTime?: boolean;
|
|
15
19
|
readonly recordId?: boolean;
|
|
20
|
+
readonly crdt?: CrdtType;
|
|
21
|
+
readonly cursor?: boolean;
|
|
22
|
+
/** True for `TYPE bytes` columns. Runtime values are `Uint8Array`. */
|
|
23
|
+
readonly bytes?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* True for `TYPE array<...>` columns. `type` then names the ELEMENT type, so
|
|
26
|
+
* the runtime value is `ElementType[]` (e.g. `array<string>` → `string[]`).
|
|
27
|
+
*/
|
|
28
|
+
readonly array?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* True for `-- @opaque` columns: the value IS synced to the client and can be
|
|
31
|
+
* read from a query result, but the sync engine never stores it server-side.
|
|
32
|
+
*
|
|
33
|
+
* That makes it unusable for anything the server has to evaluate — `where`,
|
|
34
|
+
* `orderBy`, joins, aggregates, table permissions — because the SSP has no
|
|
35
|
+
* value to evaluate against. A predicate on such a column would appear to work
|
|
36
|
+
* locally (the local cache does hold the value) while matching nothing
|
|
37
|
+
* server-side, so the query builder rejects it outright instead of letting the
|
|
38
|
+
* two diverge silently.
|
|
39
|
+
*/
|
|
40
|
+
readonly opaque?: boolean;
|
|
16
41
|
}
|
|
17
42
|
/**
|
|
18
43
|
* Table metadata containing columns and primary key information
|
|
@@ -59,13 +84,21 @@ type TypeNameToTypeMap = {
|
|
|
59
84
|
boolean: boolean;
|
|
60
85
|
null: null;
|
|
61
86
|
json: unknown;
|
|
87
|
+
Uint8Array: Uint8Array;
|
|
62
88
|
};
|
|
89
|
+
/**
|
|
90
|
+
* The element/base TS type of a column, wrapping in an array for `array: true`
|
|
91
|
+
* columns (where `type` names the element type).
|
|
92
|
+
*/
|
|
93
|
+
type ColumnBaseTSType<T extends ColumnSchema> = T extends {
|
|
94
|
+
array: true;
|
|
95
|
+
} ? TypeNameToTypeMap[T['type']][] : TypeNameToTypeMap[T['type']];
|
|
63
96
|
/**
|
|
64
97
|
* Convert a column type to its TypeScript type
|
|
65
98
|
*/
|
|
66
99
|
type ColumnToTSType<T extends ColumnSchema> = T extends {
|
|
67
100
|
optional: true;
|
|
68
|
-
} ?
|
|
101
|
+
} ? ColumnBaseTSType<T> | null : ColumnBaseTSType<T>;
|
|
69
102
|
/**
|
|
70
103
|
* Helper to extract relationship field names for a table
|
|
71
104
|
*/
|
|
@@ -197,6 +230,74 @@ interface QueryInfo {
|
|
|
197
230
|
query: string;
|
|
198
231
|
hash: number;
|
|
199
232
|
vars?: Record<string, unknown>;
|
|
233
|
+
/**
|
|
234
|
+
* Engine-neutral description of the same SELECT, used by non-SurrealQL local
|
|
235
|
+
* cache backends (e.g. SQLite) that cannot parse the `query` string. Only
|
|
236
|
+
* populated for `SELECT` (undefined for LIVE/UPDATE/DELETE). See `QueryPlan`.
|
|
237
|
+
*/
|
|
238
|
+
plan?: QueryPlan;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* A single WHERE comparison. `value` is the resolved value (string IDs already
|
|
242
|
+
* converted to `RecordId`); when `paramRef` is set the condition references an
|
|
243
|
+
* existing query param verbatim (`$name`) instead of an inline value. `swap`
|
|
244
|
+
* flips the operands (`value op field`), mirroring `ComparisonOp._swap`.
|
|
245
|
+
*/
|
|
246
|
+
interface WhereComparison {
|
|
247
|
+
field: string;
|
|
248
|
+
op: ComparisonOp['_op'];
|
|
249
|
+
value: unknown;
|
|
250
|
+
paramRef?: string;
|
|
251
|
+
swap?: boolean;
|
|
252
|
+
}
|
|
253
|
+
/** A parenthesised `(c1 OR c2 …)` group, from a `_or` fragment. */
|
|
254
|
+
interface WhereOr {
|
|
255
|
+
or: WhereComparison[];
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Engine-neutral WHERE: a top-level conjunction (AND) of comparisons and/or
|
|
259
|
+
* OR-groups. Mirrors `buildQueryFromOptions`'s condition assembly exactly.
|
|
260
|
+
*/
|
|
261
|
+
type WhereNode = WhereComparison | WhereOr;
|
|
262
|
+
/**
|
|
263
|
+
* Engine-neutral description of a SELECT query. Backends render it to their own
|
|
264
|
+
* dialect (SurrealQL, SQLite, …). Relations are resolved by the caller via
|
|
265
|
+
* level-ordered decomposition rather than nested projection, so `relations`
|
|
266
|
+
* carries the tree rather than a flattened subquery string.
|
|
267
|
+
*/
|
|
268
|
+
interface QueryPlan {
|
|
269
|
+
table: string;
|
|
270
|
+
/** Projection field names; undefined means all (`*`). */
|
|
271
|
+
select?: string[];
|
|
272
|
+
where?: WhereNode[];
|
|
273
|
+
orderBy?: [field: string, direction: 'asc' | 'desc'][];
|
|
274
|
+
limit?: number;
|
|
275
|
+
offset?: number;
|
|
276
|
+
relations?: RelationPlan[];
|
|
277
|
+
/**
|
|
278
|
+
* Window materialization: when set, the base rows are EXACTLY these record
|
|
279
|
+
* ids (the window the SSP already computed), ignoring `where`/`limit`/
|
|
280
|
+
* `offset`. `orderBy`, `select` and `relations` still apply. Set by
|
|
281
|
+
* {@link buildWindowMaterializationPlan}; see `window-query.ts`.
|
|
282
|
+
*/
|
|
283
|
+
ids?: unknown[];
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* One `.related()` edge in a {@link QueryPlan}. Correlation:
|
|
287
|
+
* - `one` → parent[`foreignKeyField`] = child.id (attach `bucket[0] ?? null`)
|
|
288
|
+
* - `many` → child[`foreignKeyField`] = parent.id (attach `bucket`)
|
|
289
|
+
* `limit`/`orderBy` are applied PER PARENT during decomposition.
|
|
290
|
+
*/
|
|
291
|
+
interface RelationPlan {
|
|
292
|
+
alias: string;
|
|
293
|
+
table: string;
|
|
294
|
+
cardinality: 'one' | 'many';
|
|
295
|
+
foreignKeyField: string;
|
|
296
|
+
select?: string[];
|
|
297
|
+
where?: WhereNode[];
|
|
298
|
+
orderBy?: [field: string, direction: 'asc' | 'desc'][];
|
|
299
|
+
limit?: number;
|
|
300
|
+
relations?: RelationPlan[];
|
|
200
301
|
}
|
|
201
302
|
interface RelatedQuery {
|
|
202
303
|
/** The name of the related table to query */
|
|
@@ -208,9 +309,34 @@ interface RelatedQuery {
|
|
|
208
309
|
/** The cardinality of the relationship */
|
|
209
310
|
cardinality: 'one' | 'many';
|
|
210
311
|
}
|
|
312
|
+
/**
|
|
313
|
+
* Comparison-operator descriptor for a single WHERE field, e.g.
|
|
314
|
+
* `{ _op: '<=', _val: 5 }` → `field <= $field`. A `$`-prefixed string `_val`
|
|
315
|
+
* references an existing query param verbatim; `_swap: true` flips the operands
|
|
316
|
+
* (`$val _op field`). Plain values still mean equality (`field = $field`).
|
|
317
|
+
*/
|
|
318
|
+
interface ComparisonOp {
|
|
319
|
+
_op: '=' | '!=' | '>' | '>=' | '<' | '<=' | (string & {});
|
|
320
|
+
_val: unknown;
|
|
321
|
+
_swap?: boolean;
|
|
322
|
+
}
|
|
323
|
+
/** A single WHERE field value: an equality value or a comparison descriptor. */
|
|
324
|
+
type WhereFieldValue<V> = V | ComparisonOp;
|
|
325
|
+
/** A flat conjunction of field conditions (equality or comparison). */
|
|
326
|
+
type WhereConditions<TModel extends GenericModel> = { [K in keyof TModel]?: WhereFieldValue<TModel[K]> };
|
|
327
|
+
/**
|
|
328
|
+
* WHERE input for `.where()`. Supports equality (`{ field: value }`), comparison
|
|
329
|
+
* operators (`{ field: { _op, _val } }`), and a single top-level `_or` group of
|
|
330
|
+
* condition fragments that compile to a parenthesised `(... OR ...)` conjunct —
|
|
331
|
+
* e.g. `{ _or: [{ white: x }, { black: x }] }` → `(white = $white__or0 OR black = $black__or1)`.
|
|
332
|
+
* Backward-compatible with plain `Partial<TModel>` equality objects.
|
|
333
|
+
*/
|
|
334
|
+
type WhereInput<TModel extends GenericModel> = WhereConditions<TModel> & {
|
|
335
|
+
_or?: WhereConditions<TModel>[];
|
|
336
|
+
};
|
|
211
337
|
interface QueryOptions<TModel extends GenericModel, IsOne extends boolean> {
|
|
212
338
|
select?: ((keyof TModel & string) | '*')[];
|
|
213
|
-
where?:
|
|
339
|
+
where?: WhereInput<TModel>;
|
|
214
340
|
limit?: number;
|
|
215
341
|
offset?: number;
|
|
216
342
|
orderBy?: Partial<Record<keyof TModel, 'asc' | 'desc'>>;
|
|
@@ -218,11 +344,11 @@ interface QueryOptions<TModel extends GenericModel, IsOne extends boolean> {
|
|
|
218
344
|
related?: RelatedQuery[];
|
|
219
345
|
isOne?: IsOne;
|
|
220
346
|
}
|
|
221
|
-
|
|
347
|
+
type LiveQueryOptions<TModel extends GenericModel> = Omit<QueryOptions<TModel, boolean>, 'orderBy'>;
|
|
222
348
|
type QueryModifier<TModel extends GenericModel> = (builder: QueryModifierBuilder<TModel>) => QueryModifierBuilder<TModel>;
|
|
223
349
|
type SchemaAwareQueryModifier<S extends SchemaStructure, TableName extends TableNames<S>, RelatedFields extends Record<string, any> = {}> = (builder: SchemaAwareQueryModifierBuilder<S, TableName, {}>) => SchemaAwareQueryModifierBuilder<S, TableName, RelatedFields>;
|
|
224
350
|
interface QueryModifierBuilder<TModel extends GenericModel> {
|
|
225
|
-
where(conditions:
|
|
351
|
+
where(conditions: WhereInput<TModel>): this;
|
|
226
352
|
select(...fields: ((keyof TModel & string) | '*')[]): this;
|
|
227
353
|
limit(count: number): this;
|
|
228
354
|
offset(count: number): this;
|
|
@@ -231,7 +357,7 @@ interface QueryModifierBuilder<TModel extends GenericModel> {
|
|
|
231
357
|
_getOptions(): QueryOptions<TModel, boolean>;
|
|
232
358
|
}
|
|
233
359
|
interface SchemaAwareQueryModifierBuilder<S extends SchemaStructure, TableName extends TableNames<S>, RelatedFields extends Record<string, any> = {}> {
|
|
234
|
-
where(conditions:
|
|
360
|
+
where(conditions: WhereInput<TableModel<GetTable<S, TableName>>>): this;
|
|
235
361
|
select(...fields: ((keyof TableModel<GetTable<S, TableName>> & string) | '*')[]): this;
|
|
236
362
|
limit(count: number): this;
|
|
237
363
|
offset(count: number): this;
|
|
@@ -371,7 +497,7 @@ declare class QueryBuilder<const S extends SchemaStructure, const TableName exte
|
|
|
371
497
|
/**
|
|
372
498
|
* Add additional where conditions
|
|
373
499
|
*/
|
|
374
|
-
where(conditions:
|
|
500
|
+
where(conditions: WhereInput<TableModel<GetTable<S, TableName>>>): QueryBuilder<S, TableName, R, RelatedFields, IsOne>;
|
|
375
501
|
/**
|
|
376
502
|
* Specify fields to select
|
|
377
503
|
*/
|
|
@@ -409,6 +535,21 @@ declare class QueryBuilder<const S extends SchemaStructure, const TableName exte
|
|
|
409
535
|
*/
|
|
410
536
|
build(): FinalQuery<S, TableName, GetTable<S, TableName>, RelatedFields, IsOne, R>;
|
|
411
537
|
}
|
|
538
|
+
/**
|
|
539
|
+
* The surql param name an `_or` branch condition binds under: the branch FIELD,
|
|
540
|
+
* a `__or` marker and the branch's position. The position alone makes it unique
|
|
541
|
+
* within the query; the field prefix is what lets a consumer type the value by
|
|
542
|
+
* looking the column up (see {@link baseFieldOfParam}). Non-identifier
|
|
543
|
+
* characters (a nested path like `database.owner`) are folded to `_` so the
|
|
544
|
+
* result is a legal param name.
|
|
545
|
+
*/
|
|
546
|
+
declare function orParamName(field: string, index: number): string;
|
|
547
|
+
/**
|
|
548
|
+
* Inverse of {@link orParamName}: the field a param name was built from, or the
|
|
549
|
+
* name itself when it is a plain top-level param (`field = $field`). Lets a
|
|
550
|
+
* consumer resolve `white__or0` back to the `white` column.
|
|
551
|
+
*/
|
|
552
|
+
declare function baseFieldOfParam(name: string): string;
|
|
412
553
|
declare function cyrb53(str: string, seed?: number): number;
|
|
413
554
|
/**
|
|
414
555
|
* Build a query string from query options
|
|
@@ -422,5 +563,5 @@ declare function buildQueryFromOptions<TModel extends GenericModel, IsOne extend
|
|
|
422
563
|
//# sourceMappingURL=query-builder.d.ts.map
|
|
423
564
|
|
|
424
565
|
//#endregion
|
|
425
|
-
export { type AccessDefinition, type BackendNames, type BackendRoutes, type BucketConfig, type BucketDefinitionSchema, type BucketNames, type BuildRelatedFields, type BuildResultModelMany, type BuildResultModelOne, type Cardinality, type ColumnSchema, type Executor, type ExtractFieldNames, FinalQuery, type GenericModel, type GenericSchema, type GetCardinality, type GetRelationship, type GetRelationshipFields, type GetTable, type InferRelatedModelFromMetadata, InnerQuery, type LiveQueryOptions, QueryBuilder, type QueryInfo, type QueryModifier, type QueryModifierBuilder, type QueryOptions, type QueryResult, RecordId, type RelatedField, type RelatedFieldMapEntry, type RelatedFieldsMap, type RelatedQuery, type RelationshipDefinition, type RelationshipFields, type RelationshipFields$1 as RelationshipFieldsFromSchema, type RelationshipMetadata, type RelationshipsMetadata, type RoutePayload, type SchemaAwareQueryModifier, type SchemaAwareQueryModifierBuilder, type SchemaMetadataStructure, type SchemaStructure, type SchemaToIndexed, type TableModel, type TableNames, type TableRelationships, type TableSchemaMetadata, type TypeNameToTypeMap, type ValueType, type WithRelated, buildQueryFromOptions, cyrb53 };
|
|
566
|
+
export { type AccessDefinition, type BackendNames, type BackendRoutes, type BucketConfig, type BucketDefinitionSchema, type BucketNames, type BuildRelatedFields, type BuildResultModelMany, type BuildResultModelOne, type Cardinality, type ColumnSchema, type ComparisonOp, type Executor, type ExtractFieldNames, FinalQuery, type GenericModel, type GenericSchema, type GetCardinality, type GetRelationship, type GetRelationshipFields, type GetTable, type InferRelatedModelFromMetadata, InnerQuery, type LiveQueryOptions, QueryBuilder, type QueryInfo, type QueryModifier, type QueryModifierBuilder, type QueryOptions, type QueryPlan, type QueryResult, RecordId, type RelatedField, type RelatedFieldMapEntry, type RelatedFieldsMap, type RelatedQuery, type RelationPlan, type RelationshipDefinition, type RelationshipFields, type RelationshipFields$1 as RelationshipFieldsFromSchema, type RelationshipMetadata, type RelationshipsMetadata, type RoutePayload, type SchemaAwareQueryModifier, type SchemaAwareQueryModifierBuilder, type SchemaMetadataStructure, type SchemaStructure, type SchemaToIndexed, type TableModel, type TableNames, type TableRelationships, type TableSchemaMetadata, type TypeNameToTypeMap, type ValueType, type WhereComparison, type WhereConditions, type WhereFieldValue, type WhereInput, type WhereNode, type WhereOr, type WithRelated, baseFieldOfParam, buildQueryFromOptions, cyrb53, orParamName };
|
|
426
567
|
//# sourceMappingURL=index.d.ts.map
|