@githolon/dsl 0.7.0 → 0.7.1
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/package.json +1 -1
- package/src/predicate.ts +4 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@githolon/dsl",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Nomos 2 domain-authoring DSL: aggregates + directives in TS, executed and encoded to the Rust kernel's wire shapes.",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
package/src/predicate.ts
CHANGED
|
@@ -53,9 +53,10 @@ import type { Field, FieldValue } from "./fields.js";
|
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* The subset of an aggregate's field-map keys whose field kind is scalar
|
|
56
|
-
* (string | enum | ref | int) — the only kinds that produce an EAV needle the
|
|
56
|
+
* (string | enum | ref | int | bool) — the only kinds that produce an EAV needle the
|
|
57
57
|
* maintained-count predicate can probe. set/map/json/evidence are NOT included:
|
|
58
|
-
* a predicate over a collection field is undefined/non-deterministic.
|
|
58
|
+
* a predicate over a collection field is undefined/non-deterministic. A `bool` field
|
|
59
|
+
* is stored as the scalar "true"/"false", so it probes like a string ("false" eq "false").
|
|
59
60
|
*
|
|
60
61
|
* `int` IS included (unlike the report.ts `ScalarKeys` which limits to
|
|
61
62
|
* string|enum|ref|json): a count/sum predicate may filter on an integer field
|
|
@@ -63,7 +64,7 @@ import type { Field, FieldValue } from "./fields.js";
|
|
|
63
64
|
* the field is int-kind.
|
|
64
65
|
*/
|
|
65
66
|
export type PredScalarKeys<F extends Record<string, Field>> = {
|
|
66
|
-
[K in keyof F]: F[K] extends Field<unknown, "string" | "enum" | "ref" | "int"> ? K : never;
|
|
67
|
+
[K in keyof F]: F[K] extends Field<unknown, "string" | "enum" | "ref" | "int" | "bool"> ? K : never;
|
|
67
68
|
}[keyof F] &
|
|
68
69
|
string;
|
|
69
70
|
|