foldkit-entity 0.9.0 → 0.11.0
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 +137 -4
- package/dist/conformance/index.d.mts +1 -1
- package/dist/conformance/index.mjs +1 -1
- package/dist/{index-BzdK89FC.d.mts → index-BhI_DA2S.d.mts} +303 -77
- package/dist/index-BhI_DA2S.d.mts.map +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{src-5avJ3IkP.mjs → src-DwKdHZDu.mjs} +414 -95
- package/dist/src-DwKdHZDu.mjs.map +1 -0
- package/package.json +2 -2
- package/dist/index-BzdK89FC.d.mts.map +0 -1
- package/dist/src-5avJ3IkP.mjs.map +0 -1
|
@@ -58,8 +58,17 @@ interface InputExpr<T> {
|
|
|
58
58
|
readonly key: string;
|
|
59
59
|
readonly schema: Schema.Codec<T, unknown>;
|
|
60
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* A field as the row a write would leave holds it: what an invariant reads
|
|
63
|
+
* (`after.status`, beside `before.status` over a change). An interpreter that judges stored
|
|
64
|
+
* rows alone refuses it, as the operation `next`.
|
|
65
|
+
*/
|
|
66
|
+
interface NextExpr<T> {
|
|
67
|
+
readonly _tag: 'Next';
|
|
68
|
+
readonly field: FieldExpr<T>;
|
|
69
|
+
}
|
|
61
70
|
/** A typed scalar: what a comparison compares. */
|
|
62
|
-
type Expr<T> = LiteralExpr<T> | FieldExpr<T> | InputExpr<T>;
|
|
71
|
+
type Expr<T> = LiteralExpr<T> | FieldExpr<T> | InputExpr<T> | NextExpr<T>;
|
|
63
72
|
/** Any scalar, for the places that hold operands without caring what they are. */
|
|
64
73
|
type AnyExpr = Expr<unknown>;
|
|
65
74
|
/**
|
|
@@ -154,6 +163,36 @@ interface ComparePredicate {
|
|
|
154
163
|
type Operandish = AnyExpr | Predicate;
|
|
155
164
|
/** A field, a scalar already built from one, or a predicate used as a boolean. */
|
|
156
165
|
type Operand<T> = EntityField<string, string, Schema.Constraint> | Expr<T> | Predicate;
|
|
166
|
+
/**
|
|
167
|
+
* Type-only: the Entities a predicate's fields belong to, by name, so
|
|
168
|
+
* `Query.where` can refuse one over another Entity where it is written. Never
|
|
169
|
+
* set at run time; a predicate built without it (typed plain `Predicate`)
|
|
170
|
+
* reads as unknown and is checked at run time only.
|
|
171
|
+
*/
|
|
172
|
+
interface Reads<Names extends string> {
|
|
173
|
+
readonly '~reads'?: Names;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* The Entity names an operand reads: a field's own, a marked node's, none for
|
|
177
|
+
* a value or an input. A node with no marker (a `Predicate` typed plainly)
|
|
178
|
+
* reads as `string`, unknown.
|
|
179
|
+
*/
|
|
180
|
+
type ReadsOf<X> = X extends EntityField<infer Name, string, Schema.Constraint> ? Name : X extends PlainValue | {
|
|
181
|
+
readonly _tag: 'Literal' | 'Input';
|
|
182
|
+
} ? never : X extends {
|
|
183
|
+
readonly '~reads'?: infer Names;
|
|
184
|
+
} ? unknown extends Names ? string : Names extends string ? Names : never : never;
|
|
185
|
+
/**
|
|
186
|
+
* Nothing when a query's predicates read its own Entity, none, or one unknown
|
|
187
|
+
* to the type (checked at run time instead); else a failure naming both.
|
|
188
|
+
*/
|
|
189
|
+
type OverEntity<Names extends string, Name extends string, What extends string> = string extends Names ? unknown : [Names] extends [Name] ? unknown : Invalid<`foldkit-entity: ${What} reads ${Exclude<Names, Name>}, but the query is from ${Name}`>;
|
|
190
|
+
/** A plain value, which `Expr.eq` takes on the right only. */
|
|
191
|
+
type PlainValue = string | number | boolean | bigint | null;
|
|
192
|
+
/** A compile-time failure whose type is the sentence that says what to do. */
|
|
193
|
+
interface Invalid<Message extends string> {
|
|
194
|
+
readonly '~invalid': Message;
|
|
195
|
+
}
|
|
157
196
|
/** What an operand is worth, so a comparison's other side is checked against it. */
|
|
158
197
|
type ValueOf<E> = E extends EntityField<string, string, infer S> ? Schema.Schema.Type<S> : E extends Predicate ? boolean : E extends Expr<infer T> ? T : never;
|
|
159
198
|
/**
|
|
@@ -185,7 +224,7 @@ declare const isPredicate: (value: unknown) => value is Predicate;
|
|
|
185
224
|
* runs, and a body needing one it does not is refused rather than answered
|
|
186
225
|
* wrongly — see `Query.unsupported`.
|
|
187
226
|
*/
|
|
188
|
-
type Operation = 'eq' | 'isNull' | 'isNotNull' | 'contains' | 'in' | 'and' | 'or' | 'not' | 'compare';
|
|
227
|
+
type Operation = 'eq' | 'isNull' | 'isNotNull' | 'contains' | 'in' | 'and' | 'or' | 'not' | 'compare' | 'next';
|
|
189
228
|
/** One field an expression reads: its Entity's name and key, and the identity that owns it. */
|
|
190
229
|
interface FieldDependency {
|
|
191
230
|
/** The owning Entity's name, for display; two Entities may share one. */
|
|
@@ -198,6 +237,8 @@ interface FieldDependency {
|
|
|
198
237
|
interface Dependencies {
|
|
199
238
|
/** One entry per distinct field of each Entity identity. */
|
|
200
239
|
readonly fields: ReadonlyArray<FieldDependency>;
|
|
240
|
+
/** Each field read as the row a write would leave holds it (`Next`), one entry each. */
|
|
241
|
+
readonly next: ReadonlyArray<FieldDependency>;
|
|
201
242
|
/** One entry per distinct input key. */
|
|
202
243
|
readonly inputs: ReadonlyArray<string>;
|
|
203
244
|
/** One entry per distinct operation, so an interpreter can refuse what it cannot run. */
|
|
@@ -222,7 +263,7 @@ type OrderedOperand = EntityField<string, string, Schema.Constraint & Schema.Cod
|
|
|
222
263
|
/** `Expr.and` and `Expr.or`: one operand is that operand, and two or more are one node. */
|
|
223
264
|
interface Connective<Node extends Predicate> {
|
|
224
265
|
<P extends Predicate>(only: P): P;
|
|
225
|
-
(first:
|
|
266
|
+
<A extends Predicate, B extends Predicate, Rest extends ReadonlyArray<Predicate>>(first: A, second: B, ...rest: Rest): Node & Reads<ReadsOf<A> | ReadsOf<B> | ReadsOf<Rest[number]>>;
|
|
226
267
|
(...operands: Array.NonEmptyReadonlyArray<Predicate>): Predicate;
|
|
227
268
|
}
|
|
228
269
|
declare const Expr: {
|
|
@@ -233,10 +274,16 @@ declare const Expr: {
|
|
|
233
274
|
* `Input` schema; written by hand only when constructing a body directly.
|
|
234
275
|
*/
|
|
235
276
|
input: <T>(key: string, schema: Schema.Codec<T, unknown>) => InputExpr<T>;
|
|
277
|
+
/**
|
|
278
|
+
* A field as the row a write would leave holds it: what `Entity.invariant`'s
|
|
279
|
+
* builder hands out as `after`.
|
|
280
|
+
*/
|
|
281
|
+
next: <Name extends string, Key extends string, S extends Schema.Constraint>(field: EntityField<Name, Key, S>) => NextExpr<Schema.Schema.Type<S>> & Reads<Name>;
|
|
236
282
|
/** One field of one Entity, as a scalar. */
|
|
237
|
-
field: <Name extends string, Key extends string, S extends Schema.Constraint>(field: EntityField<Name, Key, S>) => FieldExpr<Schema.Schema.Type<S
|
|
283
|
+
field: <Name extends string, Key extends string, S extends Schema.Constraint>(field: EntityField<Name, Key, S>) => FieldExpr<Schema.Schema.Type<S>> & Reads<Name>;
|
|
238
284
|
/**
|
|
239
|
-
* Two scalars are the same value
|
|
285
|
+
* Two scalars are the same value: a field (or an expression) on the left,
|
|
286
|
+
* and the value on the right, typed from it. Fields and plain values are
|
|
240
287
|
* coerced, so the common form reads as it means:
|
|
241
288
|
*
|
|
242
289
|
* ```ts
|
|
@@ -244,15 +291,15 @@ declare const Expr: {
|
|
|
244
291
|
* Expr.eq(Post.fields.status, 'active')
|
|
245
292
|
* ```
|
|
246
293
|
*/
|
|
247
|
-
eq: <L extends Operand<any
|
|
294
|
+
eq: <L extends Operand<any> | PlainValue, R extends (L extends PlainValue ? Invalid<'foldkit-entity: Expr.eq takes the field on the left and the value on the right'> : ValueOf<L> | Expr<ValueOf<L>> | (boolean extends ValueOf<L> ? Predicate : never))>(left: L, right: R) => EqPredicate & Reads<ReadsOf<L> | ReadsOf<R>>;
|
|
248
295
|
/**
|
|
249
296
|
* Whether a field holds no value. Its opposite is `isNotNull`; both are the
|
|
250
297
|
* one node, since a query asks which of the two it means, and `is not null`
|
|
251
298
|
* has no unknown for a `not` to keep.
|
|
252
299
|
*/
|
|
253
|
-
isNull: <L extends Operand<any>>(operand: L) => NullPredicate
|
|
300
|
+
isNull: <L extends Operand<any>>(operand: L) => NullPredicate & Reads<ReadsOf<L>>;
|
|
254
301
|
/** Whether a field holds a value. */
|
|
255
|
-
isNotNull: <L extends Operand<any>>(operand: L) => NullPredicate
|
|
302
|
+
isNotNull: <L extends Operand<any>>(operand: L) => NullPredicate & Reads<ReadsOf<L>>;
|
|
256
303
|
/**
|
|
257
304
|
* Whether a text value contains `search`, anywhere in it. Containing the
|
|
258
305
|
* empty string is everything, so a search box with nothing typed in it is the
|
|
@@ -269,7 +316,7 @@ declare const Expr: {
|
|
|
269
316
|
* nullable column that should match everything on an empty search says so:
|
|
270
317
|
* `Expr.or(Expr.isNull(field), Expr.contains(field, input.search))`.
|
|
271
318
|
*/
|
|
272
|
-
contains: <L extends TextOperand>(value: L, search: string | Expr<string>) => ContainsPredicate
|
|
319
|
+
contains: <L extends TextOperand>(value: L, search: string | Expr<string>) => ContainsPredicate & Reads<ReadsOf<L>>;
|
|
273
320
|
/**
|
|
274
321
|
* Whether a value is one of `among`: a list written out, or an input whose
|
|
275
322
|
* value is one. Each element is compared as `eq` compares.
|
|
@@ -283,7 +330,7 @@ declare const Expr: {
|
|
|
283
330
|
* holding a null, and an empty list matches no row. A list written out is
|
|
284
331
|
* copied, so changing the array afterwards does not change the query.
|
|
285
332
|
*/
|
|
286
|
-
in: <L extends Operand<any>>(value: L, among: ReadonlyArray<ValueOf<L>> | Expr<ReadonlyArray<ValueOf<L>>>) => InPredicate
|
|
333
|
+
in: <L extends Operand<any>>(value: L, among: ReadonlyArray<ValueOf<L>> | Expr<ReadonlyArray<ValueOf<L>>>) => InPredicate & Reads<ReadsOf<L>>;
|
|
287
334
|
/**
|
|
288
335
|
* `left` orders before `right`. Numbers compare as numbers; text compares
|
|
289
336
|
* under a collation, the one given or the field's declared one, which must be
|
|
@@ -297,21 +344,21 @@ declare const Expr: {
|
|
|
297
344
|
* Expr.and(Expr.gte(fields.at, input.from), Expr.lt(fields.at, input.until))
|
|
298
345
|
* ```
|
|
299
346
|
*/
|
|
300
|
-
lt: <L extends OrderedOperand
|
|
347
|
+
lt: <L extends OrderedOperand, R extends ValueOf<L> | Expr<ValueOf<L>>>(left: L, right: R, options?: {
|
|
301
348
|
readonly collation?: Collation | undefined;
|
|
302
|
-
}) => ComparePredicate
|
|
349
|
+
}) => ComparePredicate & Reads<ReadsOf<L> | ReadsOf<R>>;
|
|
303
350
|
/** `left` orders before `right`, or with it; see `Expr.lt`. */
|
|
304
|
-
lte: <L extends OrderedOperand
|
|
351
|
+
lte: <L extends OrderedOperand, R extends ValueOf<L> | Expr<ValueOf<L>>>(left: L, right: R, options?: {
|
|
305
352
|
readonly collation?: Collation | undefined;
|
|
306
|
-
}) => ComparePredicate
|
|
353
|
+
}) => ComparePredicate & Reads<ReadsOf<L> | ReadsOf<R>>;
|
|
307
354
|
/** `left` orders after `right`; see `Expr.lt`. */
|
|
308
|
-
gt: <L extends OrderedOperand
|
|
355
|
+
gt: <L extends OrderedOperand, R extends ValueOf<L> | Expr<ValueOf<L>>>(left: L, right: R, options?: {
|
|
309
356
|
readonly collation?: Collation | undefined;
|
|
310
|
-
}) => ComparePredicate
|
|
357
|
+
}) => ComparePredicate & Reads<ReadsOf<L> | ReadsOf<R>>;
|
|
311
358
|
/** `left` orders after `right`, or with it; see `Expr.lt`. */
|
|
312
|
-
gte: <L extends OrderedOperand
|
|
359
|
+
gte: <L extends OrderedOperand, R extends ValueOf<L> | Expr<ValueOf<L>>>(left: L, right: R, options?: {
|
|
313
360
|
readonly collation?: Collation | undefined;
|
|
314
|
-
}) => ComparePredicate
|
|
361
|
+
}) => ComparePredicate & Reads<ReadsOf<L> | ReadsOf<R>>;
|
|
315
362
|
/**
|
|
316
363
|
* Every operand holds, as one predicate to place inside another: `where`'s
|
|
317
364
|
* list is already a conjunction, so this is for `or(and(a, b), c)`.
|
|
@@ -338,7 +385,7 @@ declare const Expr: {
|
|
|
338
385
|
* but drafts" over a nullable column is
|
|
339
386
|
* `Expr.or(Expr.isNull(status), Expr.not(Expr.eq(status, 'draft')))`.
|
|
340
387
|
*/
|
|
341
|
-
not: (operand:
|
|
388
|
+
not: <P extends Predicate>(operand: P) => NotPredicate & Reads<ReadsOf<P>>;
|
|
342
389
|
/**
|
|
343
390
|
* A filter that applies only when its input is given: `or(isNull($x), …)`,
|
|
344
391
|
* with the predicate built from the input as never null.
|
|
@@ -352,9 +399,16 @@ declare const Expr: {
|
|
|
352
399
|
* `isNull($x)` before writing SQL, so this compiles to `true`, which filters
|
|
353
400
|
* nothing, or to the predicate alone.
|
|
354
401
|
*/
|
|
355
|
-
whenGiven: <T>(input: InputExpr<T>, build: (given: InputExpr<NonNullable<T>>) =>
|
|
402
|
+
whenGiven: <T, P extends Predicate>(input: InputExpr<T>, build: (given: InputExpr<NonNullable<T>>) => P) => Predicate & Reads<ReadsOf<P>>;
|
|
356
403
|
/** An expression as readable text; see `showExpr` for what it is and is not. */
|
|
357
404
|
show: (node: Operandish) => string;
|
|
405
|
+
/**
|
|
406
|
+
* The predicate with each field after a write (`Next`) that `values` names,
|
|
407
|
+
* by key, read as that value: how an invariant is judged where the
|
|
408
|
+
* write's new values are known. A field it does not name stays `Next`, for
|
|
409
|
+
* the interpreter to read as the row after holds it.
|
|
410
|
+
*/
|
|
411
|
+
substituteNext: (predicate: Predicate, values: Readonly<Record<string, unknown>>) => Predicate;
|
|
358
412
|
};
|
|
359
413
|
/** One term of an ordering: a scalar and the direction to read it in. */
|
|
360
414
|
interface OrderTerm {
|
|
@@ -399,9 +453,9 @@ interface ChosenOrder {
|
|
|
399
453
|
type Ordering = OrderTerm | ChosenOrder;
|
|
400
454
|
declare const Order: {
|
|
401
455
|
/** Smallest first; rows without a value last, unless `nulls` says first. */
|
|
402
|
-
asc: <E extends Operand<any>>(expr: E, options?: TermOptions) => OrderTerm
|
|
456
|
+
asc: <E extends Operand<any>>(expr: E, options?: TermOptions) => OrderTerm & Reads<ReadsOf<E>>;
|
|
403
457
|
/** Largest first; rows without a value first, unless `nulls` says last. */
|
|
404
|
-
desc: <E extends Operand<any>>(expr: E, options?: TermOptions) => OrderTerm
|
|
458
|
+
desc: <E extends Operand<any>>(expr: E, options?: TermOptions) => OrderTerm & Reads<ReadsOf<E>>;
|
|
405
459
|
/**
|
|
406
460
|
* The order the input names, among `choices`: every name the sort can hold
|
|
407
461
|
* maps to a field, so a name left out is a type error here, not a query that
|
|
@@ -412,7 +466,7 @@ declare const Order: {
|
|
|
412
466
|
* Query.orderBy(Order.chosen(input.sort, { title: Post.fields.title }))
|
|
413
467
|
* ```
|
|
414
468
|
*/
|
|
415
|
-
chosen: <By extends string
|
|
469
|
+
chosen: <By extends string, const Choices extends { readonly [K in By]: Operand<any>; }>(sort: InputExpr<ChosenSort<By>>, choices: Choices) => ChosenOrder & Reads<ReadsOf<Choices[keyof Choices]>>;
|
|
416
470
|
};
|
|
417
471
|
/**
|
|
418
472
|
* Whether a client can order rows the way the server does, for one input: the
|
|
@@ -477,13 +531,13 @@ declare const Query: {
|
|
|
477
531
|
* Query.from(Post).pipe(published, Query.where(byTitle))
|
|
478
532
|
* ```
|
|
479
533
|
*/
|
|
480
|
-
where: (...predicates:
|
|
534
|
+
where: <const P extends ReadonlyArray<Predicate>>(...predicates: P) => <E extends AnyEntity>(self: Query<E> & OverEntity<ReadsOf<P[number]>, E['name'], 'a predicate'>) => Query<E>;
|
|
481
535
|
/**
|
|
482
536
|
* Reads the rows in this order. Two `orderBy`s append, so an earlier term
|
|
483
537
|
* stays the more significant one and a later call adds a tie-breaker rather
|
|
484
538
|
* than silently winning.
|
|
485
539
|
*/
|
|
486
|
-
orderBy: (...terms:
|
|
540
|
+
orderBy: <const T extends ReadonlyArray<Ordering>>(...terms: T) => <E extends AnyEntity>(self: Query<E> & OverEntity<ReadsOf<T[number]>, E['name'], 'an ordering term'>) => Query<E>;
|
|
487
541
|
/**
|
|
488
542
|
* The fixed terms this query orders by for one input: each chosen order
|
|
489
543
|
* resolved to the field its input names, or to nothing for a `null` sort,
|
|
@@ -540,47 +594,6 @@ declare const Query: {
|
|
|
540
594
|
show: (self: AnyQuery) => string;
|
|
541
595
|
};
|
|
542
596
|
//#endregion
|
|
543
|
-
//#region src/readFilter.d.ts
|
|
544
|
-
declare const ReadFilter: {
|
|
545
|
-
/** Entity metadata: the rows the server lists depend on these members. */
|
|
546
|
-
of: (members: ReadonlyArray<string>) => Metadata;
|
|
547
|
-
/** The members an Entity's metadata names, every attachment's together. */
|
|
548
|
-
members: (metadata: Metadata) => ReadonlyArray<string>;
|
|
549
|
-
};
|
|
550
|
-
//#endregion
|
|
551
|
-
//#region src/words.d.ts
|
|
552
|
-
/** What a schema says of itself to a person: its `title` and `description`. */
|
|
553
|
-
interface SchemaWords {
|
|
554
|
-
readonly title: Option.Option<string>;
|
|
555
|
-
readonly description: Option.Option<string>;
|
|
556
|
-
}
|
|
557
|
-
declare const Words: {
|
|
558
|
-
/**
|
|
559
|
-
* A schema's words, as a label and its help text. Under Effect 4 a checked
|
|
560
|
-
* schema resolves to its last check's annotations, which say what the check
|
|
561
|
-
* expects and carry no `title`, so a title given before the check is read from
|
|
562
|
-
* the schema's own annotations. Read words through this, never through
|
|
563
|
-
* `Schema.resolveAnnotations` directly.
|
|
564
|
-
*/
|
|
565
|
-
of: (schema: Schema.Top) => SchemaWords;
|
|
566
|
-
};
|
|
567
|
-
//#endregion
|
|
568
|
-
//#region src/shape.d.ts
|
|
569
|
-
declare const isNullish: (ast: SchemaAST.AST) => boolean;
|
|
570
|
-
declare const isText: (ast: SchemaAST.AST) => boolean;
|
|
571
|
-
/** What a schema's AST holds, read through Effect's own guards. */
|
|
572
|
-
declare const SchemaShape: {
|
|
573
|
-
/** True for the `null` and `undefined` members that make a schema optional. */
|
|
574
|
-
isNullish: typeof isNullish;
|
|
575
|
-
/**
|
|
576
|
-
* The members of a schema with `null` and `undefined` set aside, so optional
|
|
577
|
-
* text is still text; a schema that is not a union is its one member.
|
|
578
|
-
*/
|
|
579
|
-
present: (ast: SchemaAST.AST) => ReadonlyArray<SchemaAST.AST>;
|
|
580
|
-
/** True when every value the schema admits is a string. */
|
|
581
|
-
isText: typeof isText;
|
|
582
|
-
};
|
|
583
|
-
//#endregion
|
|
584
597
|
//#region src/evaluate.d.ts
|
|
585
598
|
/** A row as this interpreter reads one: values by field key. */
|
|
586
599
|
type Row = Readonly<Record<string, unknown>>;
|
|
@@ -598,6 +611,8 @@ type PredicateTruth = Truth;
|
|
|
598
611
|
* Refuses what `evaluate` refuses (text holding a NUL).
|
|
599
612
|
*/
|
|
600
613
|
declare const decided: (node: Predicate, input: Row) => Option.Option<PredicateTruth>;
|
|
614
|
+
/** A predicate's truth over one row (and, for an invariant, the row after a write): SQL's three values. */
|
|
615
|
+
declare const truthOver: (node: Predicate, row: Row, input?: Row, next?: Row) => PredicateTruth;
|
|
601
616
|
/**
|
|
602
617
|
* Where `left` sorts against `right` under these terms (`Query.orderFor`'s),
|
|
603
618
|
* as `evaluate` sorts: negative when it comes first. Refuses what `evaluate`
|
|
@@ -629,6 +644,128 @@ declare const assertSupported: (body: AnyQuery) => void;
|
|
|
629
644
|
*/
|
|
630
645
|
declare const evaluate: (body: AnyQuery, input: Row, rows: ReadonlyArray<Row>) => ReadonlyArray<Row>;
|
|
631
646
|
//#endregion
|
|
647
|
+
//#region src/invariant.d.ts
|
|
648
|
+
/** One invariant of an Entity, as its interpreters read it. */
|
|
649
|
+
interface Invariant {
|
|
650
|
+
/** Stable, unique within its Entity: what a refusal names, and forms and logs key on. */
|
|
651
|
+
readonly id: string;
|
|
652
|
+
readonly predicate: Predicate;
|
|
653
|
+
/** What someone the rules let write is told when a write would break it. */
|
|
654
|
+
readonly message: string;
|
|
655
|
+
/** The fields a form shows the failure beside. */
|
|
656
|
+
readonly path: ReadonlyArray<string>;
|
|
657
|
+
/** The fields it reads of the row before a write; none for a state invariant. */
|
|
658
|
+
readonly before: ReadonlyArray<string>;
|
|
659
|
+
/** The fields it reads of the row after. */
|
|
660
|
+
readonly after: ReadonlyArray<string>;
|
|
661
|
+
}
|
|
662
|
+
/** Each field as the row before a write holds it: what an invariant reads as `before`. */
|
|
663
|
+
type BeforeRow<E extends AnyEntity> = { readonly [K in keyof E['fields'] & string]: FieldExpr<Schema.Schema.Type<E['fields'][K]['schema']>> & Reads<E['name']>; };
|
|
664
|
+
/** Each field as the row after a write holds it: what an invariant reads as `after`. */
|
|
665
|
+
type AfterRow<E extends AnyEntity> = { readonly [K in keyof E['fields'] & string]: NextExpr<Schema.Schema.Type<E['fields'][K]['schema']>> & Reads<E['name']>; };
|
|
666
|
+
/** A row, or a change from one row to another, as an invariant is judged over it. */
|
|
667
|
+
interface Change {
|
|
668
|
+
readonly after: Row;
|
|
669
|
+
/** The row before an update; none for a create, which judges no transition invariant. */
|
|
670
|
+
readonly before?: Row;
|
|
671
|
+
}
|
|
672
|
+
/** What a row, or a change, comes to under an Entity's invariants. */
|
|
673
|
+
type Judgement = {
|
|
674
|
+
readonly _tag: 'Valid';
|
|
675
|
+
} | {
|
|
676
|
+
readonly _tag: 'Invalid';
|
|
677
|
+
readonly failures: ReadonlyArray<Invariant>;
|
|
678
|
+
} |
|
|
679
|
+
/** Some invariant reads a field a row does not have, so validity is not known. */
|
|
680
|
+
{
|
|
681
|
+
readonly _tag: 'Undecided';
|
|
682
|
+
readonly fields: ReadonlyArray<string>;
|
|
683
|
+
};
|
|
684
|
+
/** Whether an invariant reads the row before, and so is judged only where there is one. */
|
|
685
|
+
declare const readsBefore: (held: Invariant) => boolean;
|
|
686
|
+
/**
|
|
687
|
+
* An invariant as declared: the step that attaches it to its Entity, carrying
|
|
688
|
+
* its id, so a refusal is matched against the declaration rather than a
|
|
689
|
+
* string spelled again (`Refusal.isInvalidBy(refusal, reservedWithinQuantity)`).
|
|
690
|
+
*/
|
|
691
|
+
interface DeclaredInvariant<E extends AnyEntity> {
|
|
692
|
+
(entity: E): E;
|
|
693
|
+
readonly id: string;
|
|
694
|
+
}
|
|
695
|
+
declare const invariant: <E extends AnyEntity>(id: string, build: (rows: {
|
|
696
|
+
readonly before: BeforeRow<E>;
|
|
697
|
+
readonly after: AfterRow<E>;
|
|
698
|
+
}) => Predicate & Reads<E['name']>, options: {
|
|
699
|
+
readonly message: string;
|
|
700
|
+
readonly path?: ReadonlyArray<keyof E['fields'] & string>;
|
|
701
|
+
}) => DeclaredInvariant<E>;
|
|
702
|
+
declare const invariantsOf: (entity: AnyEntity) => ReadonlyArray<Invariant>;
|
|
703
|
+
/** `judge` with the invariants given, as a binding that keeps them holds them. */
|
|
704
|
+
declare const judgeAgainst: (invariants: ReadonlyArray<Invariant>, change: Change) => Judgement;
|
|
705
|
+
/**
|
|
706
|
+
* A row, or a change, under every invariant (each row as the store holds it,
|
|
707
|
+
* encoded): valid only when each is true. SQL's unknown, from a null, fails
|
|
708
|
+
* one, as a `WHERE` drops the row; a field a row does not have leaves it
|
|
709
|
+
* undecided, never valid. Without `before` (a create), transition invariants
|
|
710
|
+
* are not judged.
|
|
711
|
+
*/
|
|
712
|
+
declare const judge: (entity: AnyEntity, change: Change) => Judgement;
|
|
713
|
+
/**
|
|
714
|
+
* The row an input's value describes, judged under its Entity's state
|
|
715
|
+
* invariants: each key mapped to a field, encoded as the store holds it. An
|
|
716
|
+
* invariant over a field the input does not set (an `Option` holding nothing, a
|
|
717
|
+
* key left out) is undecided, so a partial input is never called valid on its
|
|
718
|
+
* account. It has no row before, so it judges no transition.
|
|
719
|
+
*/
|
|
720
|
+
declare const judgeInput: (input: EntityInput<AnyEntity, any, any>, value: Readonly<Record<string, unknown>>) => Judgement;
|
|
721
|
+
/**
|
|
722
|
+
* The Entity's state invariants as an Effect Schema check over its row type:
|
|
723
|
+
* each failure at its path, with its message. The value is encoded first,
|
|
724
|
+
* field by field, so it is judged as the store would hold it.
|
|
725
|
+
*/
|
|
726
|
+
declare const check: <E extends AnyEntity>(entity: E) => SchemaAST.Filter<Schema.Schema.Type<E['schema']>>;
|
|
727
|
+
//#endregion
|
|
728
|
+
//#region src/readFilter.d.ts
|
|
729
|
+
declare const ReadFilter: {
|
|
730
|
+
/** Entity metadata: the rows the server lists depend on these members. */
|
|
731
|
+
of: (members: ReadonlyArray<string>) => Metadata;
|
|
732
|
+
/** The members an Entity's metadata names, every attachment's together. */
|
|
733
|
+
members: (metadata: Metadata) => ReadonlyArray<string>;
|
|
734
|
+
};
|
|
735
|
+
//#endregion
|
|
736
|
+
//#region src/words.d.ts
|
|
737
|
+
/** What a schema says of itself to a person: its `title` and `description`. */
|
|
738
|
+
interface SchemaWords {
|
|
739
|
+
readonly title: Option.Option<string>;
|
|
740
|
+
readonly description: Option.Option<string>;
|
|
741
|
+
}
|
|
742
|
+
declare const Words: {
|
|
743
|
+
/**
|
|
744
|
+
* A schema's words, as a label and its help text. Under Effect 4 a checked
|
|
745
|
+
* schema resolves to its last check's annotations, which say what the check
|
|
746
|
+
* expects and carry no `title`, so a title given before the check is read from
|
|
747
|
+
* the schema's own annotations. Read words through this, never through
|
|
748
|
+
* `Schema.resolveAnnotations` directly.
|
|
749
|
+
*/
|
|
750
|
+
of: (schema: Schema.Top) => SchemaWords;
|
|
751
|
+
};
|
|
752
|
+
//#endregion
|
|
753
|
+
//#region src/shape.d.ts
|
|
754
|
+
declare const isNullish: (ast: SchemaAST.AST) => boolean;
|
|
755
|
+
declare const isText: (ast: SchemaAST.AST) => boolean;
|
|
756
|
+
/** What a schema's AST holds, read through Effect's own guards. */
|
|
757
|
+
declare const SchemaShape: {
|
|
758
|
+
/** True for the `null` and `undefined` members that make a schema optional. */
|
|
759
|
+
isNullish: typeof isNullish;
|
|
760
|
+
/**
|
|
761
|
+
* The members of a schema with `null` and `undefined` set aside, so optional
|
|
762
|
+
* text is still text; a schema that is not a union is its one member.
|
|
763
|
+
*/
|
|
764
|
+
present: (ast: SchemaAST.AST) => ReadonlyArray<SchemaAST.AST>;
|
|
765
|
+
/** True when every value the schema admits is a string. */
|
|
766
|
+
isText: typeof isText;
|
|
767
|
+
};
|
|
768
|
+
//#endregion
|
|
632
769
|
//#region src/write.d.ts
|
|
633
770
|
type AnyField = EntityField<string, string, Schema.Constraint>;
|
|
634
771
|
type OneRelation = EntityRelation<string, string, AnyEntity, 'one', boolean>;
|
|
@@ -660,12 +797,65 @@ interface Write<E extends AnyEntity, Fields extends Schema.Struct.Fields> {
|
|
|
660
797
|
readonly expect: (WriteSet & {
|
|
661
798
|
readonly key: keyof Fields & string;
|
|
662
799
|
}) | undefined;
|
|
800
|
+
/**
|
|
801
|
+
* What the row must hold for the write to land, over the Entity, read
|
|
802
|
+
* before the write and checked where it commits: an interpreter writes only
|
|
803
|
+
* a row it holds of, and refuses the rest as unmet.
|
|
804
|
+
*/
|
|
805
|
+
readonly when: Option.Option<AnyQuery>;
|
|
663
806
|
/** The keys it sets, in the input's order. */
|
|
664
807
|
readonly sets: ReadonlyArray<WriteSet>;
|
|
808
|
+
/**
|
|
809
|
+
* The fields it moves by an amount the input holds (`stock + quantity`),
|
|
810
|
+
* computed where the write commits: the input key, and the field it moves.
|
|
811
|
+
*/
|
|
812
|
+
readonly increments: ReadonlyArray<WriteSet>;
|
|
665
813
|
/** The `one` relations it points elsewhere, in the input's order. */
|
|
666
814
|
readonly links: ReadonlyArray<WriteLink>;
|
|
667
815
|
}
|
|
668
816
|
type AnyWrite = Write<AnyEntity, any>;
|
|
817
|
+
/** A write declared with a precondition, so it may be refused as unmet. */
|
|
818
|
+
type ConditionedWrite<E extends AnyEntity, Fields extends Schema.Struct.Fields> = Write<E, Fields> & {
|
|
819
|
+
readonly when: Option.Some<AnyQuery>;
|
|
820
|
+
};
|
|
821
|
+
interface RowOptions<Fields extends Schema.Struct.Fields> {
|
|
822
|
+
readonly id: keyof Fields & string;
|
|
823
|
+
readonly expect?: keyof Fields & string;
|
|
824
|
+
}
|
|
825
|
+
/** The keys of `Fields` whose values are numbers. */
|
|
826
|
+
type NumberKeys<Fields> = { [K in keyof Fields & string]: Fields[K] extends Schema.Top ? Schema.Schema.Type<Fields[K]> extends number ? K : never : never; }[keyof Fields & string];
|
|
827
|
+
/** An update's increments: a number field of the Entity, by the input key holding the amount. */
|
|
828
|
+
type WriteIncrements<E extends AnyEntity, Fields extends Schema.Struct.Fields> = { readonly [K in NumberKeys<{ [F in keyof E['fields']]: E['fields'][F]['schema']; }>]?: NumberKeys<Fields>; };
|
|
829
|
+
/** An update's options: a row's, and what it moves by an amount. */
|
|
830
|
+
type UpdateOptions<E extends AnyEntity, Fields extends Schema.Struct.Fields> = RowOptions<Fields> & {
|
|
831
|
+
readonly increment?: WriteIncrements<E, Fields>;
|
|
832
|
+
};
|
|
833
|
+
/** `update`: conditioned when given `when`, which the overloads tell apart. */
|
|
834
|
+
interface UpdateWrite {
|
|
835
|
+
<E extends AnyEntity, Fields extends Schema.Struct.Fields>(input: EntityInput<E, Fields, any>, options: UpdateOptions<E, Fields> & {
|
|
836
|
+
readonly when: WriteCondition<E, Fields>;
|
|
837
|
+
}): ConditionedWrite<E, Fields>;
|
|
838
|
+
<E extends AnyEntity, Fields extends Schema.Struct.Fields>(input: EntityInput<E, Fields, any>, options: UpdateOptions<E, Fields> & {
|
|
839
|
+
readonly when?: undefined;
|
|
840
|
+
}): Write<E, Fields>;
|
|
841
|
+
}
|
|
842
|
+
/** `delete`: conditioned when given `when`, as an update is. */
|
|
843
|
+
interface DeleteWrite {
|
|
844
|
+
<E extends AnyEntity, Fields extends Schema.Struct.Fields>(input: EntityInput<E, Fields, any>, options: RowOptions<Fields> & {
|
|
845
|
+
readonly when: WriteCondition<E, Fields>;
|
|
846
|
+
}): ConditionedWrite<E, Fields>;
|
|
847
|
+
<E extends AnyEntity, Fields extends Schema.Struct.Fields>(input: EntityInput<E, Fields, any>, options: RowOptions<Fields> & {
|
|
848
|
+
readonly when?: undefined;
|
|
849
|
+
}): Write<E, Fields>;
|
|
850
|
+
}
|
|
851
|
+
/**
|
|
852
|
+
* A write's precondition: a predicate over its Entity's row, given one
|
|
853
|
+
* placeholder per input key, as a `Query.define` body is. It is built once,
|
|
854
|
+
* so `input` stands for what the write will be given.
|
|
855
|
+
*/
|
|
856
|
+
type WriteCondition<E extends AnyEntity, Fields extends Schema.Struct.Fields> = (context: {
|
|
857
|
+
readonly input: { readonly [K in keyof Fields & string]: InputExpr<Schema.Schema.Type<Fields[K]>>; };
|
|
858
|
+
}) => Predicate & Reads<E['name']>;
|
|
669
859
|
/** One row's new values, in the store's wire shape: what a client patches and a server writes. */
|
|
670
860
|
interface BoundWrite {
|
|
671
861
|
readonly entity: string;
|
|
@@ -677,6 +867,8 @@ interface BoundWrite {
|
|
|
677
867
|
* key on the wire, a foreign key in a table) is each interpreter's.
|
|
678
868
|
*/
|
|
679
869
|
readonly links: Readonly<Record<string, Option.Option<EntityRef>>>;
|
|
870
|
+
/** Each field it moves, by the amount, encoded: added by the server, and predicted over what a client holds. */
|
|
871
|
+
readonly increments: Readonly<Record<string, number>>;
|
|
680
872
|
}
|
|
681
873
|
declare const Write: {
|
|
682
874
|
/**
|
|
@@ -692,11 +884,12 @@ declare const Write: {
|
|
|
692
884
|
* id it holds. Refused where it is written: an `id` that is not the Entity's
|
|
693
885
|
* `id` field, a `many` relation or a nested key (not written by an update
|
|
694
886
|
* yet), or nothing to set.
|
|
887
|
+
*
|
|
888
|
+
* `when` is what the row must hold for the update to land, checked where it
|
|
889
|
+
* commits (`({ input }) => Expr.eq(Post.fields.status, 'draft')`); a row it
|
|
890
|
+
* does not hold of is refused as unmet.
|
|
695
891
|
*/
|
|
696
|
-
update:
|
|
697
|
-
readonly id: keyof Fields & string;
|
|
698
|
-
readonly expect?: keyof Fields & string;
|
|
699
|
-
}) => Write<E, Fields>;
|
|
892
|
+
update: UpdateWrite;
|
|
700
893
|
/**
|
|
701
894
|
* Inserts the row whose id is the input's `id` key, an id the client chose,
|
|
702
895
|
* with every field and `one` relation the input maps a key to. An insert
|
|
@@ -710,12 +903,9 @@ declare const Write: {
|
|
|
710
903
|
* Deletes the row whose id is the input's `id` key, only while it is still at
|
|
711
904
|
* the revision `expect` names, when it names one. It sets nothing, so a key
|
|
712
905
|
* mapped to a member is refused where it is written. A row already gone (a
|
|
713
|
-
* retry) is gone.
|
|
906
|
+
* retry) is gone. `when`, as an update's, is what the row must hold.
|
|
714
907
|
*/
|
|
715
|
-
delete:
|
|
716
|
-
readonly id: keyof Fields & string;
|
|
717
|
-
readonly expect?: keyof Fields & string;
|
|
718
|
-
}) => Write<E, Fields>;
|
|
908
|
+
delete: DeleteWrite;
|
|
719
909
|
/**
|
|
720
910
|
* The revision this input says the row was read at, encoded, with its field:
|
|
721
911
|
* what an interpreter writes only a row still at. None for a write that
|
|
@@ -727,6 +917,12 @@ declare const Write: {
|
|
|
727
917
|
}>;
|
|
728
918
|
/** The members any invocation may write: what a query reading none of them cannot be changed by. */
|
|
729
919
|
writes: (write: AnyWrite) => ReadonlyArray<AnyField | OneRelation>;
|
|
920
|
+
/**
|
|
921
|
+
* The fields a write reads from the row it writes: those its `when` reads,
|
|
922
|
+
* each it increments, and the revision it expects. What an interpreter
|
|
923
|
+
* must read, and what a startup check judges it could disclose.
|
|
924
|
+
*/
|
|
925
|
+
reads: (write: AnyWrite) => ReadonlyArray<AnyField>;
|
|
730
926
|
/**
|
|
731
927
|
* The row this input writes and its new values, encoded as the store holds
|
|
732
928
|
* them: the patch a client shows before the server answers. `keys`, when
|
|
@@ -996,6 +1192,36 @@ declare const Entity: {
|
|
|
996
1192
|
derived: <const New extends DerivedSpecs>(specs: New) => <E extends AnyEntity>(entity: E & Free<E, New>) => WithDerived<E, New>;
|
|
997
1193
|
/** Attaches an interpreter's metadata to the Entity itself. */
|
|
998
1194
|
annotate: (metadata: Metadata) => <E extends AnyEntity>(entity: E) => E;
|
|
1195
|
+
/**
|
|
1196
|
+
* Declares what every stored row, or every change of one, must hold:
|
|
1197
|
+
* `Entity.invariant('reservedWithinQuantity', ({ after }) =>
|
|
1198
|
+
* Expr.lte(after.reserved, after.quantity), { message })` over the row a
|
|
1199
|
+
* write leaves, or with `before` too over the change an update makes.
|
|
1200
|
+
* Refused where it is declared: an id declared twice, a predicate over another
|
|
1201
|
+
* Entity, one reading an input or nothing of `after` (that is a `when`), a path
|
|
1202
|
+
* naming no field.
|
|
1203
|
+
*/
|
|
1204
|
+
invariant: typeof invariant;
|
|
1205
|
+
/** The Entity's invariants, in the order they were declared. */
|
|
1206
|
+
invariants: typeof invariantsOf;
|
|
1207
|
+
/**
|
|
1208
|
+
* A row (`{ after }`, a create's) or a change (`{ before, after }`, an
|
|
1209
|
+
* update's) under the Entity's invariants: `Valid`, `Invalid` with the ones
|
|
1210
|
+
* that fail (a null fails, as SQL's unknown), or `Undecided` with the fields
|
|
1211
|
+
* one reads that a row lacks.
|
|
1212
|
+
*/
|
|
1213
|
+
judge: typeof judge;
|
|
1214
|
+
/** Whether an invariant reads the row before a write: judged on updates only, and no CHECK. */
|
|
1215
|
+
readsBefore: typeof readsBefore;
|
|
1216
|
+
/** `Entity.judge` against invariants already read, such as those a database binding keeps. */
|
|
1217
|
+
judgeAgainst: typeof judgeAgainst;
|
|
1218
|
+
/**
|
|
1219
|
+
* The row an `Entity.input`'s value describes, judged: what a form can say
|
|
1220
|
+
* before the server does. Undecided for an invariant over a field it leaves unset.
|
|
1221
|
+
*/
|
|
1222
|
+
judgeInput: typeof judgeInput;
|
|
1223
|
+
/** The state invariants as a Schema check over the row type, each failure at its path. */
|
|
1224
|
+
check: typeof check;
|
|
999
1225
|
/** Attaches an interpreter's metadata to members, by key. */
|
|
1000
1226
|
annotateMembers: <E extends AnyEntity>(metadata: { readonly [K in keyof E['members']]?: Metadata; }) => (entity: E) => E;
|
|
1001
1227
|
/**
|
|
@@ -1049,5 +1275,5 @@ declare const Derived: {
|
|
|
1049
1275
|
make: <S extends Schema.Constraint>(schema: S) => DerivedSpec<S>;
|
|
1050
1276
|
};
|
|
1051
1277
|
//#endregion
|
|
1052
|
-
export {
|
|
1053
|
-
//# sourceMappingURL=index-
|
|
1278
|
+
export { Invariant as $, SelectionPage as A, Operandish as At, ConditionedWrite as B, QueryDependencies as Bt, Relation as C, InPredicate as Ct, RelationSpecs as D, NextExpr as Dt, RelationSpec as E, LiteralExpr as Et, WrittenAs as F, OrderedOperand as Ft, SchemaShape as G, ValueOf as Gt, WriteCondition as H, ReadsOf as Ht, WrittenKey as I, Ordering as It, ReadFilter as J, maxQueryNodes as Jt, SchemaWords as K, dependenciesOf as Kt, WrittenSpec as L, Placement as Lt, SelectionTypeId as M, OrPredicate as Mt, TargetKey as N, Order as Nt, Selected as O, NotPredicate as Ot, Unmapped as P, OrderTerm as Pt, DeclaredInvariant as Q, AnyWrite as R, Predicate as Rt, RelatedSpecs as S, FieldExpr as St, RelationMap as T, Invalid as Tt, WriteLink as U, TermOptions as Ut, Write as V, Reads as Vt, WriteSet as W, TextOperand as Wt, BeforeRow as X, AfterRow as Y, Collation as Yt, Change as Z, IdSchemaOf as _, ContainsPredicate as _t, DerivedSpecs as a, compareRows as at, PageWindow as b, Expr as bt, EntityDerived as c, supported as ct, EntityInput as d, AnyExpr as dt, Judgement as et, EntityMember as f, AnyQuery as ft, IdOf as g, ComparePredicate as gt, EntityTypeId as h, CompareOperator as ht, DerivedSpec as i, assertSupported as it, SelectionPageTypeId as j, Operation as jt, Selection as k, NullPredicate as kt, EntityField as l, truthOver as lt, EntityRelation as m, ChosenSort as mt, Cardinality as n, QueryEvaluateError as nt, Entities as o, decided as ot, EntityRef as p, ChosenOrder as pt, Words as q, isPredicate as qt, Derived as r, Row as rt, Entity as s, evaluate as st, AnyEntity as t, PredicateTruth as tt, EntityIdentity as u, AndPredicate as ut, InputMember as v, Dependencies as vt, RelationInput as w, InputExpr as wt, Related as x, FieldDependency as xt, NestedInput as y, EqPredicate as yt, BoundWrite as z, Query as zt };
|
|
1279
|
+
//# sourceMappingURL=index-BhI_DA2S.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-BhI_DA2S.d.mts","names":["Arr"],"sources":["../src/collation.ts","../src/expr.ts","../src/evaluate.ts","../src/invariant.ts","../src/readFilter.ts","../src/words.ts","../src/shape.ts","../src/write.ts","../src/index.ts"],"mappings":";;;KAeY;;;WAEG;;;;WAEA;;;;WAEA;WAAyB;;cAW3B;EACX,QAA6C;EAC7C,WAAmD;EACnD,SAAM,mBAAoB;;EAQ1B,KAAE,WAAc,cAAY;;EAG5B,WAAQ,UAAa,aAAW,OAAO,OAAO;;;;;UC5B/B,YAAY;WAClB;WACA,OAAO;;;;;;UAOD,UAAU;WAChB;WACA,OAAO;WACP;WACA,QAAQ,OAAO,MAAM;;;;;;WAMrB,WAAW,OAAO,OAAO;;;;;;;;UASnB,UAAU;WAChB;WACA;WACA,QAAQ,OAAO,MAAM;;;;;;;UAQf,SAAS;WACf;WACA,OAAO,UAAU;;;KAIhB,KAAK,KAAK,YAAY,KAAK,UAAU,KAAK,UAAU,KAAK,SAAS;;KAGlE,UAAU;;;;;;;;;KAUV,YACR,cACA,gBACA,oBACA,cACA,eACA,cACA,eACA;;UAGa;WACN;WACA,MAAM;WACN,OAAO;;;;;;;UAQD;WACN;WACA,SAAS;WACT;;;;;;;UAQM;WACN;WACA,OAAO;WACP,QAAQ;;;;;;;;UASF;WACN;WACA,OAAO;WACP,OAAO;;;;;;;UAQD;WACN;WACA,UAAUA,MAAI,sBAAsB;;;UAI9B;WACN;WACA,UAAUA,MAAI,sBAAsB;;;;;;;UAQ9B;WACN;WACA,SAAS;;;KAIR;;;;;;UAOK;WACN;WACA,UAAU;WACV,MAAM;WACN,OAAO;WACP,WAAW,OAAO,OAAO;;;;;;;;KASxB,aAAa,UAAU;;KAG9B,QAAQ,KAAK,4BAA4B,OAAO,cAAc,KAAK,KAAK;;;;;;;UAQ5D,MAAM;WACZ,WAAW;;;;;;;KAQV,QAAQ,KAClB,UAAU,kBAAkB,cAAc,OAAO,cAC7C,OACA,UAAU;WAAwB;YAEhC;WAAqB,iBAAiB;oBACpB,iBAEd,uBACE;;;;;KAQT,WACH,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BACf,QAAQ,OAAO,OAAO,KAAK;;;;;iBA2CvB,IAAI,eAAe,WAAW,QAAQ,SAAS,aAAa;iBAC5D,IAAI,eAAe,iBAAiB,0BAC3C,QAAQ,QACR;WAAoB,UAAU;IAC7B,aAAa,eAAe;;cASlB;;;EAIH,QAAA,UAAU,yCAAuC,UAAY,MAAI,cAAc;;;;;EAO9E,SAAA,UAAU,yCAAyC,UAAU,4BAA0B,UACpF,GAAC,OACJ,MACN,YAAY,GAAG;EAEX,OAAA,eAAe,WAAS,QAAU,WAAS,aAAa;;cAOpD;EACX,OAAO,UAAU,OAAO,YAAU,QAAU,MAAI,YAAY"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
export { AndPredicate, AnyEntity, AnyExpr, AnyQuery, type AnyWrite, type BoundWrite, Cardinality, ChosenOrder, ChosenSort, Collation, CompareOperator, ComparePredicate, ContainsPredicate, Dependencies, Derived, DerivedSpec, DerivedSpecs, Entities, Entity, EntityDerived, EntityField, EntityIdentity, EntityInput, EntityMember, EntityRef, EntityRelation, EntityTypeId, EqPredicate, Expr, FieldDependency, FieldExpr, IdOf, IdSchemaOf, InPredicate, InputExpr, InputMember, LiteralExpr, NestedInput, NotPredicate, NullPredicate, Operandish, Operation, OrPredicate, Order, OrderTerm, OrderedOperand, Ordering, PageWindow, Placement, Predicate, PredicateTruth, Query, QueryDependencies, QueryEvaluateError, ReadFilter, Related, RelatedSpecs, Relation, RelationInput, RelationMap, RelationSpec, RelationSpecs, Row, SchemaShape, SchemaWords, Selected, Selection, SelectionPage, SelectionPageTypeId, SelectionTypeId, TargetKey, TermOptions, TextOperand, Unmapped, ValueOf, Words, Write, type WriteLink, type WriteSet, WrittenAs, WrittenKey, WrittenSpec, assertSupported, compareRows, decided, dependenciesOf, evaluate, isPredicate, maxQueryNodes, supported };
|
|
1
|
+
import { $ as Invariant, A as SelectionPage, At as Operandish, B as ConditionedWrite, Bt as QueryDependencies, C as Relation, Ct as InPredicate, D as RelationSpecs, Dt as NextExpr, E as RelationSpec, Et as LiteralExpr, F as WrittenAs, Ft as OrderedOperand, G as SchemaShape, Gt as ValueOf, H as WriteCondition, Ht as ReadsOf, I as WrittenKey, It as Ordering, J as ReadFilter, Jt as maxQueryNodes, K as SchemaWords, Kt as dependenciesOf, L as WrittenSpec, Lt as Placement, M as SelectionTypeId, Mt as OrPredicate, N as TargetKey, Nt as Order, O as Selected, Ot as NotPredicate, P as Unmapped, Pt as OrderTerm, Q as DeclaredInvariant, R as AnyWrite, Rt as Predicate, S as RelatedSpecs, St as FieldExpr, T as RelationMap, Tt as Invalid, U as WriteLink, Ut as TermOptions, V as Write, Vt as Reads, W as WriteSet, Wt as TextOperand, X as BeforeRow, Y as AfterRow, Yt as Collation, Z as Change, _ as IdSchemaOf, _t as ContainsPredicate, a as DerivedSpecs, at as compareRows, b as PageWindow, bt as Expr, c as EntityDerived, ct as supported, d as EntityInput, dt as AnyExpr, et as Judgement, f as EntityMember, ft as AnyQuery, g as IdOf, gt as ComparePredicate, h as EntityTypeId, ht as CompareOperator, i as DerivedSpec, it as assertSupported, j as SelectionPageTypeId, jt as Operation, k as Selection, kt as NullPredicate, l as EntityField, lt as truthOver, m as EntityRelation, mt as ChosenSort, n as Cardinality, nt as QueryEvaluateError, o as Entities, ot as decided, p as EntityRef, pt as ChosenOrder, q as Words, qt as isPredicate, r as Derived, rt as Row, s as Entity, st as evaluate, t as AnyEntity, tt as PredicateTruth, u as EntityIdentity, ut as AndPredicate, v as InputMember, vt as Dependencies, w as RelationInput, wt as InputExpr, x as Related, xt as FieldDependency, y as NestedInput, yt as EqPredicate, z as BoundWrite, zt as Query } from "./index-BhI_DA2S.mjs";
|
|
2
|
+
export { type AfterRow, AndPredicate, AnyEntity, AnyExpr, AnyQuery, type AnyWrite, type BeforeRow, type BoundWrite, Cardinality, type Change, ChosenOrder, ChosenSort, Collation, CompareOperator, ComparePredicate, type ConditionedWrite, ContainsPredicate, type DeclaredInvariant, Dependencies, Derived, DerivedSpec, DerivedSpecs, Entities, Entity, EntityDerived, EntityField, EntityIdentity, EntityInput, EntityMember, EntityRef, EntityRelation, EntityTypeId, EqPredicate, Expr, FieldDependency, FieldExpr, IdOf, IdSchemaOf, InPredicate, InputExpr, InputMember, Invalid, type Invariant, type Judgement, LiteralExpr, NestedInput, NextExpr, NotPredicate, NullPredicate, Operandish, Operation, OrPredicate, Order, OrderTerm, OrderedOperand, Ordering, PageWindow, Placement, Predicate, PredicateTruth, Query, QueryDependencies, QueryEvaluateError, ReadFilter, Reads, ReadsOf, Related, RelatedSpecs, Relation, RelationInput, RelationMap, RelationSpec, RelationSpecs, Row, SchemaShape, SchemaWords, Selected, Selection, SelectionPage, SelectionPageTypeId, SelectionTypeId, TargetKey, TermOptions, TextOperand, Unmapped, ValueOf, Words, Write, type WriteCondition, type WriteLink, type WriteSet, WrittenAs, WrittenKey, WrittenSpec, assertSupported, compareRows, decided, dependenciesOf, evaluate, isPredicate, maxQueryNodes, supported, truthOver };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { w as Collation, t as Derived, n as Entity, r as EntityTypeId, v as Expr, y as Order, b as Query, d as QueryEvaluateError, l as ReadFilter, i as Relation, u as SchemaShape, a as SelectionPageTypeId, o as SelectionTypeId, c as Words, s as Write, f as assertSupported, p as compareRows, m as decided, x as dependenciesOf, h as evaluate, S as isPredicate, C as maxQueryNodes, g as supported, _ as truthOver } from "./src-DwKdHZDu.mjs";
|