foldkit-entity 0.10.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 +125 -1
- package/dist/conformance/index.d.mts +1 -1
- package/dist/conformance/index.mjs +1 -1
- package/dist/{index-_x1ScI4v.d.mts → index-BhI_DA2S.d.mts} +249 -54
- 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-Iz7806gm.mjs → src-DwKdHZDu.mjs} +412 -94
- package/dist/src-DwKdHZDu.mjs.map +1 -0
- package/package.json +2 -2
- package/dist/index-_x1ScI4v.d.mts.map +0 -1
- package/dist/src-Iz7806gm.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -355,6 +355,129 @@ optional relation set to nothing), and each interpreter carries it its own way,
|
|
|
355
355
|
a ref key in a store, a foreign key in a table. A `many` relation or a nested
|
|
356
356
|
key is refused where the write is declared.
|
|
357
357
|
|
|
358
|
+
An update or a delete may also say when it makes sense: `when` is what the row
|
|
359
|
+
must hold for it to land, written as a query body is: `() =>
|
|
360
|
+
Expr.eq(Post.fields.title, 'Draft')`, or with the input, `({ input }) =>
|
|
361
|
+
Expr.eq(Post.fields.title, input.from)`. It reads the row as it is before the write and the input,
|
|
362
|
+
never who is asking (that is a guard's), and only its own Entity: a field of
|
|
363
|
+
another is a type error, and refused where the write is declared. It is held as
|
|
364
|
+
a query body (`write.when`), so an interpreter checks it in the statement that
|
|
365
|
+
writes, and a row it does not hold of is refused as unmet. A write declared with
|
|
366
|
+
one is a `ConditionedWrite`, which is how `Mutation.write` knows it may be
|
|
367
|
+
refused so.
|
|
368
|
+
|
|
369
|
+
An update may move a number field by an amount the input holds, rather than set
|
|
370
|
+
it: `increment: { stock: 'quantity' }` adds the input's `quantity` (an unmapped
|
|
371
|
+
key, a number; negative takes away) to the stored `stock`, in the statement that
|
|
372
|
+
writes, so no concurrent change is lost. A retry must not add twice, so either it
|
|
373
|
+
expects a revision (a retry of a write that landed is then a conflict), or its
|
|
374
|
+
writer keeps a ledger, which answers the retry from its record and lets two
|
|
375
|
+
concurrent increments both land. `RemoteServer.write` refuses one with neither. The field must
|
|
376
|
+
be stored as a number, and may not be the id, the revision, or set by another
|
|
377
|
+
key. `Write.bind` gives the amounts apart from the values (`increments`), so a
|
|
378
|
+
client can add them to the value it holds as it reads it (Remote does), never
|
|
379
|
+
fixing a sum over a row that may since have moved. `Write.reads(write)` is what a write
|
|
380
|
+
reads from its row: what its `when` reads, each field it increments, and the
|
|
381
|
+
revision. How a declaration, its guard, its writer and the client fit together is
|
|
382
|
+
the [declared writes guide](../../docs/declared-writes.md).
|
|
383
|
+
|
|
384
|
+
## What every row and change must hold: invariants
|
|
385
|
+
|
|
386
|
+
A Schema judges a value, and a write's `when` the row before it. Neither judges
|
|
387
|
+
the row a write leaves: with `quantity = 10, reserved = 5`, an update setting
|
|
388
|
+
`quantity = 3` decodes, and leaves a row that holds more reserved than there is.
|
|
389
|
+
An **invariant** is what every stored row must hold, read over the row after a
|
|
390
|
+
write (`after`):
|
|
391
|
+
|
|
392
|
+
```ts
|
|
393
|
+
import { Schema } from 'effect'
|
|
394
|
+
import { Entity, Expr } from 'foldkit-entity'
|
|
395
|
+
|
|
396
|
+
const InventoryFields = Entity.define(
|
|
397
|
+
'Inventory',
|
|
398
|
+
Schema.Struct({ id: Schema.String, quantity: Schema.Number, reserved: Schema.Number }),
|
|
399
|
+
)
|
|
400
|
+
const Inventory = InventoryFields.pipe(
|
|
401
|
+
Entity.invariant(
|
|
402
|
+
'reservedWithinQuantity',
|
|
403
|
+
({ after }) => Expr.lte(after.reserved, after.quantity),
|
|
404
|
+
{ message: 'Reserved stock cannot exceed the quantity', path: ['reserved'] },
|
|
405
|
+
),
|
|
406
|
+
)
|
|
407
|
+
|
|
408
|
+
Entity.judge(Inventory, { after: { id: 'i1', quantity: 3, reserved: 5 } })
|
|
409
|
+
// { _tag: 'Invalid', failures: [{ id: 'reservedWithinQuantity', … }] }
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
One that reads the row before too (`before`) relates the two, each of which may
|
|
413
|
+
be valid on its own: an order that shipped stays shipped.
|
|
414
|
+
|
|
415
|
+
```ts
|
|
416
|
+
const OrderFields = Entity.define(
|
|
417
|
+
'Order',
|
|
418
|
+
Schema.Struct({ id: Schema.String, status: Schema.Literals(['placed', 'shipped']) }),
|
|
419
|
+
)
|
|
420
|
+
const Order = OrderFields.pipe(
|
|
421
|
+
Entity.invariant(
|
|
422
|
+
'shippedStaysShipped',
|
|
423
|
+
({ before, after }) =>
|
|
424
|
+
Expr.or(Expr.not(Expr.eq(before.status, 'shipped')), Expr.eq(after.status, 'shipped')),
|
|
425
|
+
{ message: 'A shipped order stays shipped', path: ['status'] },
|
|
426
|
+
),
|
|
427
|
+
)
|
|
428
|
+
|
|
429
|
+
const shipped = { id: 'o1', status: 'shipped' }
|
|
430
|
+
Entity.judge(Order, { before: shipped, after: { ...shipped, status: 'placed' } })
|
|
431
|
+
// { _tag: 'Invalid', failures: [{ id: 'shippedStaysShipped', … }] }
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
What an invariant reads decides when it is judged; nothing else is declared:
|
|
435
|
+
|
|
436
|
+
```text
|
|
437
|
+
reads after only -> state invariant: every create and update; a CHECK constraint
|
|
438
|
+
reads before too -> transition invariant: every update, the only write with a row before
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
`Entity.readsBefore(invariant)` says which one is.
|
|
442
|
+
|
|
443
|
+
`Entity.invariant` returns the step that attaches it, carrying its `id`. Hoist
|
|
444
|
+
it to export it, naming the Entity's type (what it reads is checked against
|
|
445
|
+
it), and match a refusal against it rather than spelling the id again:
|
|
446
|
+
|
|
447
|
+
```ts
|
|
448
|
+
export const reservedWithinQuantity = Entity.invariant<typeof InventoryFields>(
|
|
449
|
+
'reservedWithinQuantity',
|
|
450
|
+
({ after }) => Expr.lte(after.reserved, after.quantity),
|
|
451
|
+
{ message: 'Reserved stock cannot exceed the quantity', path: ['reserved'] },
|
|
452
|
+
)
|
|
453
|
+
export const Inventory = InventoryFields.pipe(reservedWithinQuantity)
|
|
454
|
+
|
|
455
|
+
// Where a write's refusal is read (foldkit-remote):
|
|
456
|
+
Refusal.isInvalidBy(refusal, reservedWithinQuantity)
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
- `before` is each field as the row before holds it (`Expr.field`), and `after`
|
|
460
|
+
each as the row after holds it (`Expr.next`), both typed as the field.
|
|
461
|
+
- It is declared once, on the Entity's metadata, and attaching more adds to it;
|
|
462
|
+
the Entity stays the same (`Entity.same`). Its interpreters read it from there.
|
|
463
|
+
- It reads stored rows only: one over another Entity, or reading an input, is
|
|
464
|
+
refused where it is declared, as is an id declared twice or a `path` naming no
|
|
465
|
+
field. So is one reading nothing of `after`: which rows a write may start from
|
|
466
|
+
is its `when`. Who may write is a guard's; whether a write applies now is its `when`'s.
|
|
467
|
+
- `Entity.judge(entity, { after, before? })` judges rows as the store holds them
|
|
468
|
+
(encoded) and is pure. Without `before` (a create) it skips transition
|
|
469
|
+
invariants. A row holds one only when it is true: a null fails it, as SQL's
|
|
470
|
+
unknown drops a row from a `WHERE`. A row without a field it reads is
|
|
471
|
+
`Undecided`, never `Valid`.
|
|
472
|
+
- `Entity.check(entity)` is the state invariants as a Schema check over the row
|
|
473
|
+
type (`entity.schema.check(Entity.check(entity))`): it encodes the value, and
|
|
474
|
+
reports each failure at its `path` with its `message`.
|
|
475
|
+
|
|
476
|
+
Text compares only under a declared collation, here too: a date stored as text
|
|
477
|
+
needs `{ collation: Collation.binary }` on its comparison. An interpreter that
|
|
478
|
+
judges stored rows alone refuses `after`'s nodes as the operation `next`;
|
|
479
|
+
`Expr.substituteNext` reads the ones a write sets as their values.
|
|
480
|
+
|
|
358
481
|
## Attaching metadata
|
|
359
482
|
|
|
360
483
|
An interpreter declares a [`foldkit-metadata`](../metadata/README.md) key and
|
|
@@ -698,7 +821,8 @@ from queries, not from what a database could express.
|
|
|
698
821
|
| `Entity.select(entity, { key: true or Selection })` | A Selection: what was selected (`members`) and the `schema` of the result. |
|
|
699
822
|
| `Entity.page(selection, { first, after } or { last, before })` | In a Selection, a `many` relation read as a page: `items`, `hasNext`, `hasPrevious`. |
|
|
700
823
|
| `Entity.fields(entity, ...keys)` | The schemas of those fields, by key, to spread into an input's struct. |
|
|
701
|
-
| `Write.update(input, { id, expect? })` | A declared update of one row: every key the input maps to a field, but the id and the expected revision. |
|
|
824
|
+
| `Write.update(input, { id, expect?, when?, increment? })` | A declared update of one row: every key the input maps to a field, but the id and the expected revision; `when`, what the row must hold for it to land; `increment`, the number fields it moves by an input amount. |
|
|
825
|
+
| `Write.reads(write)` | The fields a write reads from its row: its `when`'s, each it increments, the revision. |
|
|
702
826
|
| `Write.writes(write)` / `Write.bind(write, value, keys?)` | The fields it may change; the row and values one input writes, encoded as the store holds them. |
|
|
703
827
|
| `Entity.input(entity, struct, mapping?)` | Experimental. Which member each key of an operation's input writes. |
|
|
704
828
|
| `Relation.nested(relation, input)` | In an input mapping: the key holds the target itself, written through `input`. |
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ft as AnyQuery, s as Entity } from "../index-BhI_DA2S.mjs";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
3
|
//#region src/conformance/index.d.ts
|
|
4
4
|
/** The one Entity every case reads, with a column of each kind that matters. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b as Query, n as Entity, v as Expr, w as Collation, y as Order } from "../src-DwKdHZDu.mjs";
|
|
2
2
|
import { Schema, SchemaGetter } from "effect";
|
|
3
3
|
//#region src/conformance/index.ts
|
|
4
4
|
/**
|
|
@@ -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
|
/**
|
|
@@ -215,7 +224,7 @@ declare const isPredicate: (value: unknown) => value is Predicate;
|
|
|
215
224
|
* runs, and a body needing one it does not is refused rather than answered
|
|
216
225
|
* wrongly — see `Query.unsupported`.
|
|
217
226
|
*/
|
|
218
|
-
type Operation = 'eq' | 'isNull' | 'isNotNull' | 'contains' | 'in' | 'and' | 'or' | 'not' | 'compare';
|
|
227
|
+
type Operation = 'eq' | 'isNull' | 'isNotNull' | 'contains' | 'in' | 'and' | 'or' | 'not' | 'compare' | 'next';
|
|
219
228
|
/** One field an expression reads: its Entity's name and key, and the identity that owns it. */
|
|
220
229
|
interface FieldDependency {
|
|
221
230
|
/** The owning Entity's name, for display; two Entities may share one. */
|
|
@@ -228,6 +237,8 @@ interface FieldDependency {
|
|
|
228
237
|
interface Dependencies {
|
|
229
238
|
/** One entry per distinct field of each Entity identity. */
|
|
230
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>;
|
|
231
242
|
/** One entry per distinct input key. */
|
|
232
243
|
readonly inputs: ReadonlyArray<string>;
|
|
233
244
|
/** One entry per distinct operation, so an interpreter can refuse what it cannot run. */
|
|
@@ -263,6 +274,11 @@ declare const Expr: {
|
|
|
263
274
|
* `Input` schema; written by hand only when constructing a body directly.
|
|
264
275
|
*/
|
|
265
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>;
|
|
266
282
|
/** One field of one Entity, as a scalar. */
|
|
267
283
|
field: <Name extends string, Key extends string, S extends Schema.Constraint>(field: EntityField<Name, Key, S>) => FieldExpr<Schema.Schema.Type<S>> & Reads<Name>;
|
|
268
284
|
/**
|
|
@@ -386,6 +402,13 @@ declare const Expr: {
|
|
|
386
402
|
whenGiven: <T, P extends Predicate>(input: InputExpr<T>, build: (given: InputExpr<NonNullable<T>>) => P) => Predicate & Reads<ReadsOf<P>>;
|
|
387
403
|
/** An expression as readable text; see `showExpr` for what it is and is not. */
|
|
388
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;
|
|
389
412
|
};
|
|
390
413
|
/** One term of an ordering: a scalar and the direction to read it in. */
|
|
391
414
|
interface OrderTerm {
|
|
@@ -571,47 +594,6 @@ declare const Query: {
|
|
|
571
594
|
show: (self: AnyQuery) => string;
|
|
572
595
|
};
|
|
573
596
|
//#endregion
|
|
574
|
-
//#region src/readFilter.d.ts
|
|
575
|
-
declare const ReadFilter: {
|
|
576
|
-
/** Entity metadata: the rows the server lists depend on these members. */
|
|
577
|
-
of: (members: ReadonlyArray<string>) => Metadata;
|
|
578
|
-
/** The members an Entity's metadata names, every attachment's together. */
|
|
579
|
-
members: (metadata: Metadata) => ReadonlyArray<string>;
|
|
580
|
-
};
|
|
581
|
-
//#endregion
|
|
582
|
-
//#region src/words.d.ts
|
|
583
|
-
/** What a schema says of itself to a person: its `title` and `description`. */
|
|
584
|
-
interface SchemaWords {
|
|
585
|
-
readonly title: Option.Option<string>;
|
|
586
|
-
readonly description: Option.Option<string>;
|
|
587
|
-
}
|
|
588
|
-
declare const Words: {
|
|
589
|
-
/**
|
|
590
|
-
* A schema's words, as a label and its help text. Under Effect 4 a checked
|
|
591
|
-
* schema resolves to its last check's annotations, which say what the check
|
|
592
|
-
* expects and carry no `title`, so a title given before the check is read from
|
|
593
|
-
* the schema's own annotations. Read words through this, never through
|
|
594
|
-
* `Schema.resolveAnnotations` directly.
|
|
595
|
-
*/
|
|
596
|
-
of: (schema: Schema.Top) => SchemaWords;
|
|
597
|
-
};
|
|
598
|
-
//#endregion
|
|
599
|
-
//#region src/shape.d.ts
|
|
600
|
-
declare const isNullish: (ast: SchemaAST.AST) => boolean;
|
|
601
|
-
declare const isText: (ast: SchemaAST.AST) => boolean;
|
|
602
|
-
/** What a schema's AST holds, read through Effect's own guards. */
|
|
603
|
-
declare const SchemaShape: {
|
|
604
|
-
/** True for the `null` and `undefined` members that make a schema optional. */
|
|
605
|
-
isNullish: typeof isNullish;
|
|
606
|
-
/**
|
|
607
|
-
* The members of a schema with `null` and `undefined` set aside, so optional
|
|
608
|
-
* text is still text; a schema that is not a union is its one member.
|
|
609
|
-
*/
|
|
610
|
-
present: (ast: SchemaAST.AST) => ReadonlyArray<SchemaAST.AST>;
|
|
611
|
-
/** True when every value the schema admits is a string. */
|
|
612
|
-
isText: typeof isText;
|
|
613
|
-
};
|
|
614
|
-
//#endregion
|
|
615
597
|
//#region src/evaluate.d.ts
|
|
616
598
|
/** A row as this interpreter reads one: values by field key. */
|
|
617
599
|
type Row = Readonly<Record<string, unknown>>;
|
|
@@ -629,6 +611,8 @@ type PredicateTruth = Truth;
|
|
|
629
611
|
* Refuses what `evaluate` refuses (text holding a NUL).
|
|
630
612
|
*/
|
|
631
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;
|
|
632
616
|
/**
|
|
633
617
|
* Where `left` sorts against `right` under these terms (`Query.orderFor`'s),
|
|
634
618
|
* as `evaluate` sorts: negative when it comes first. Refuses what `evaluate`
|
|
@@ -660,6 +644,128 @@ declare const assertSupported: (body: AnyQuery) => void;
|
|
|
660
644
|
*/
|
|
661
645
|
declare const evaluate: (body: AnyQuery, input: Row, rows: ReadonlyArray<Row>) => ReadonlyArray<Row>;
|
|
662
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
|
|
663
769
|
//#region src/write.d.ts
|
|
664
770
|
type AnyField = EntityField<string, string, Schema.Constraint>;
|
|
665
771
|
type OneRelation = EntityRelation<string, string, AnyEntity, 'one', boolean>;
|
|
@@ -691,12 +797,65 @@ interface Write<E extends AnyEntity, Fields extends Schema.Struct.Fields> {
|
|
|
691
797
|
readonly expect: (WriteSet & {
|
|
692
798
|
readonly key: keyof Fields & string;
|
|
693
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>;
|
|
694
806
|
/** The keys it sets, in the input's order. */
|
|
695
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>;
|
|
696
813
|
/** The `one` relations it points elsewhere, in the input's order. */
|
|
697
814
|
readonly links: ReadonlyArray<WriteLink>;
|
|
698
815
|
}
|
|
699
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']>;
|
|
700
859
|
/** One row's new values, in the store's wire shape: what a client patches and a server writes. */
|
|
701
860
|
interface BoundWrite {
|
|
702
861
|
readonly entity: string;
|
|
@@ -708,6 +867,8 @@ interface BoundWrite {
|
|
|
708
867
|
* key on the wire, a foreign key in a table) is each interpreter's.
|
|
709
868
|
*/
|
|
710
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>>;
|
|
711
872
|
}
|
|
712
873
|
declare const Write: {
|
|
713
874
|
/**
|
|
@@ -723,11 +884,12 @@ declare const Write: {
|
|
|
723
884
|
* id it holds. Refused where it is written: an `id` that is not the Entity's
|
|
724
885
|
* `id` field, a `many` relation or a nested key (not written by an update
|
|
725
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.
|
|
726
891
|
*/
|
|
727
|
-
update:
|
|
728
|
-
readonly id: keyof Fields & string;
|
|
729
|
-
readonly expect?: keyof Fields & string;
|
|
730
|
-
}) => Write<E, Fields>;
|
|
892
|
+
update: UpdateWrite;
|
|
731
893
|
/**
|
|
732
894
|
* Inserts the row whose id is the input's `id` key, an id the client chose,
|
|
733
895
|
* with every field and `one` relation the input maps a key to. An insert
|
|
@@ -741,12 +903,9 @@ declare const Write: {
|
|
|
741
903
|
* Deletes the row whose id is the input's `id` key, only while it is still at
|
|
742
904
|
* the revision `expect` names, when it names one. It sets nothing, so a key
|
|
743
905
|
* mapped to a member is refused where it is written. A row already gone (a
|
|
744
|
-
* retry) is gone.
|
|
906
|
+
* retry) is gone. `when`, as an update's, is what the row must hold.
|
|
745
907
|
*/
|
|
746
|
-
delete:
|
|
747
|
-
readonly id: keyof Fields & string;
|
|
748
|
-
readonly expect?: keyof Fields & string;
|
|
749
|
-
}) => Write<E, Fields>;
|
|
908
|
+
delete: DeleteWrite;
|
|
750
909
|
/**
|
|
751
910
|
* The revision this input says the row was read at, encoded, with its field:
|
|
752
911
|
* what an interpreter writes only a row still at. None for a write that
|
|
@@ -758,6 +917,12 @@ declare const Write: {
|
|
|
758
917
|
}>;
|
|
759
918
|
/** The members any invocation may write: what a query reading none of them cannot be changed by. */
|
|
760
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>;
|
|
761
926
|
/**
|
|
762
927
|
* The row this input writes and its new values, encoded as the store holds
|
|
763
928
|
* them: the patch a client shows before the server answers. `keys`, when
|
|
@@ -1027,6 +1192,36 @@ declare const Entity: {
|
|
|
1027
1192
|
derived: <const New extends DerivedSpecs>(specs: New) => <E extends AnyEntity>(entity: E & Free<E, New>) => WithDerived<E, New>;
|
|
1028
1193
|
/** Attaches an interpreter's metadata to the Entity itself. */
|
|
1029
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;
|
|
1030
1225
|
/** Attaches an interpreter's metadata to members, by key. */
|
|
1031
1226
|
annotateMembers: <E extends AnyEntity>(metadata: { readonly [K in keyof E['members']]?: Metadata; }) => (entity: E) => E;
|
|
1032
1227
|
/**
|
|
@@ -1080,5 +1275,5 @@ declare const Derived: {
|
|
|
1080
1275
|
make: <S extends Schema.Constraint>(schema: S) => DerivedSpec<S>;
|
|
1081
1276
|
};
|
|
1082
1277
|
//#endregion
|
|
1083
|
-
export {
|
|
1084
|
-
//# 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,cA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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, Invalid, LiteralExpr, NestedInput, 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 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";
|