@wavehouse/chtypes 0.1.1 → 0.2.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/CHANGELOG.md +43 -38
- package/README.md +45 -414
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +1 -1
- package/dist/discover.d.ts +2 -2
- package/dist/discover.js +2 -2
- package/dist/errors.d.ts +60 -13
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +64 -11
- package/dist/errors.js.map +1 -1
- package/dist/fetch.d.ts +15 -8
- package/dist/fetch.d.ts.map +1 -1
- package/dist/fetch.js +15 -8
- package/dist/fetch.js.map +1 -1
- package/dist/ffi.d.ts +15 -15
- package/dist/ffi.js +26 -26
- package/dist/ffi.js.map +1 -1
- package/dist/format.d.ts +5 -5
- package/dist/format.js +5 -5
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/json.d.ts +3 -3
- package/dist/json.js +5 -5
- package/dist/json.js.map +1 -1
- package/dist/library.d.ts +11 -11
- package/dist/library.js +9 -9
- package/dist/numeric.js +1 -1
- package/dist/paths.d.ts +5 -1
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +7 -3
- package/dist/paths.js.map +1 -1
- package/dist/registry.d.ts +6 -6
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +14 -11
- package/dist/registry.js.map +1 -1
- package/dist/results.d.ts +65 -28
- package/dist/results.d.ts.map +1 -1
- package/dist/results.js +95 -10
- package/dist/results.js.map +1 -1
- package/dist/schema.d.ts +23 -22
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +15 -15
- package/dist/schema.js.map +1 -1
- package/dist/settings.d.ts +4 -4
- package/dist/settings.js +2 -2
- package/dist/settings.js.map +1 -1
- package/dist/transform.d.ts +2 -2
- package/dist/transform.js +5 -5
- package/package.json +1 -1
package/dist/results.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"results.js","sourceRoot":"","sources":["../src/results.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EACL,MAAM,EACN,OAAO,EACP,KAAK,EACL,QAAQ,EACR,aAAa,EACb,KAAK,EACL,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,OAAO,GAER,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"results.js","sourceRoot":"","sources":["../src/results.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EACL,MAAM,EACN,OAAO,EACP,KAAK,EACL,QAAQ,EACR,aAAa,EACb,KAAK,EACL,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,OAAO,GAER,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,gBAAgB,EAAE,mBAAmB;IACrC,WAAW,EAAE,aAAa;IAC1B,OAAO,EAAE,SAAS;CACV,CAAC;AAGX,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AA0N9B;;;;;;;GAOG;AACH,SAAS,SAAS,CAAC,CAAS;IAC1B,QAAQ,CAAC,EAAE,CAAC;QACV,KAAK,UAAU;YACb,OAAO,UAAU,CAAC;QACpB,KAAK,UAAU;YACb,OAAO,UAAU,CAAC;QACpB,KAAK,mBAAmB;YACtB,OAAO,mBAAmB,CAAC;QAC7B,KAAK,aAAa;YAChB,OAAO,aAAa,CAAC;QACvB,KAAK,SAAS;YACZ,OAAO,SAAS,CAAC;QACnB;YACE,OA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;gBACnB,MAAM;YACR,KAAK,GAAG;gBACN,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACnB,MAAM;YACR,KAAK,GAAG;gBACN,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACnB,MAAM;YACR;gBACE,oEAAoE;gBACpE,8CAA8C;gBAC9C,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;IACD,MAAM,MAAM,GAAqB,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACvE,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;QAC3B,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;QAC7B,GAAG,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;KAC/B,CAAC,CAAC,CAAC;IACJ,OAAO,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;AACvC,CAAC"}
|
package/dist/schema.d.ts
CHANGED
|
@@ -7,10 +7,10 @@ import type { BlockHandle, FilterHandle, NativeLibrary, SchemaHandle } from './f
|
|
|
7
7
|
import { type Format } from './format.js';
|
|
8
8
|
import { type BatchResult, type FilterResult, type RowResult } from './results.js';
|
|
9
9
|
import { type Settings } from './settings.js';
|
|
10
|
-
/** One declared column, as ClickHouse
|
|
10
|
+
/** One declared column, as ClickHouse canonicalized it. */
|
|
11
11
|
export interface ColumnInfo {
|
|
12
12
|
readonly name: string;
|
|
13
|
-
/** Canonical type — pass it through verbatim, never re-
|
|
13
|
+
/** Canonical type — pass it through verbatim, never re-normalize whitespace. */
|
|
14
14
|
readonly type: string;
|
|
15
15
|
/** "" | "DEFAULT" | "MATERIALIZED" | "ALIAS" | "EPHEMERAL" */
|
|
16
16
|
readonly defaultKind: string;
|
|
@@ -22,12 +22,12 @@ export interface ColumnInfo {
|
|
|
22
22
|
export interface EngineOptions {
|
|
23
23
|
/**
|
|
24
24
|
* The `SETTINGS` clause after the engine — `allow_nullable_key` and friends,
|
|
25
|
-
* a namespace `DB::Settings` cannot carry (
|
|
25
|
+
* a namespace `DB::Settings` cannot carry (the C ABI contract §`chs_schema_engine`).
|
|
26
26
|
* Absent or empty is structurally identical to the plain engine declaration:
|
|
27
27
|
* `chs_schema_engine` takes "{}" either way. Names are validated by the
|
|
28
28
|
* server's own `MergeTreeSettings` object: an unknown name throws the
|
|
29
29
|
* server's own 115; a known name declared at a NON-default value is refused
|
|
30
|
-
* (`unsupported`, naming it) — no MergeTree setting's
|
|
30
|
+
* (`unsupported`, naming it) — no MergeTree setting's behavior is modeled
|
|
31
31
|
* yet, and silently ignoring a declared value would mean the declared
|
|
32
32
|
* profile is not in force; a name declared AT its default is inert and
|
|
33
33
|
* accepted.
|
|
@@ -36,7 +36,8 @@ export interface EngineOptions {
|
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
38
|
* Options for `Schema#rows` — the revision-3 export and document-flag
|
|
39
|
-
* channels (
|
|
39
|
+
* channels (the C ABI contract §Rows, for which include/chtypes.h is the
|
|
40
|
+
* public authority). Whatever the
|
|
40
41
|
* options, `rows()` is always ONE `chs_rows` call — never a second call,
|
|
41
42
|
* never re-parsing.
|
|
42
43
|
*/
|
|
@@ -52,7 +53,7 @@ export interface RowsOptions {
|
|
|
52
53
|
* A bitmask of `DOC_VALUES | DOC_TRANSFORMS | DOC_DEFAULTS` selecting the
|
|
53
54
|
* document groups; the verdict channel is always present and not a flag.
|
|
54
55
|
* Defaults: `DOC_ALL` when no `exportFormat` is given (the full document —
|
|
55
|
-
* plain `rows()`
|
|
56
|
+
* plain `rows()` behavior), `0` (LEAN — verdicts only: `values`,
|
|
56
57
|
* `transformed`, `substituted`, `computed` and `unknownFields` all come
|
|
57
58
|
* back empty) when one is. An explicit value always wins; a bit outside
|
|
58
59
|
* `DOC_ALL` is refused loudly by the library, never pre-validated here.
|
|
@@ -70,7 +71,7 @@ export interface CompileFilterOptions {
|
|
|
70
71
|
* deserialized by the DECLARED type's own reader and injected as a typed
|
|
71
72
|
* literal AFTER SQL parsing, so a value is never SQL text and NEVER needs
|
|
72
73
|
* hand-escaping — injection safety is by construction, not by escaping
|
|
73
|
-
* (
|
|
74
|
+
* (the C ABI contract §Filters, Query parameters). Do not render values into
|
|
74
75
|
* the expression yourself.
|
|
75
76
|
*
|
|
76
77
|
* CHOOSE THE BRACE TYPE FOR THE VALUE'S DOMAIN: the declared type's own
|
|
@@ -109,7 +110,7 @@ export declare class Schema {
|
|
|
109
110
|
/** The column-declaration list this schema was compiled from, verbatim. */
|
|
110
111
|
readonly ddl: string;
|
|
111
112
|
/**
|
|
112
|
-
* The declared columns as ClickHouse
|
|
113
|
+
* The declared columns as ClickHouse canonicalized them, in declaration
|
|
113
114
|
* order — flattened under `flatten_nested=1`, DEFAULT-rewritten types
|
|
114
115
|
* (`x Int64 DEFAULT NULL` compiles as `Nullable(Int64)`), ALIAS types
|
|
115
116
|
* inferred. A gateway detects EPHEMERAL columns here, at compile time
|
|
@@ -120,12 +121,12 @@ export declare class Schema {
|
|
|
120
121
|
/**
|
|
121
122
|
* Every open `Filter` compiled from this handle, so `close()` can free them
|
|
122
123
|
* FIRST — the C layer does not refcount, and freeing the schema under a
|
|
123
|
-
* live filter is use-after-free (
|
|
124
|
+
* live filter is use-after-free (the C ABI contract §Filters, handle lifetime).
|
|
124
125
|
*/
|
|
125
126
|
private readonly filters;
|
|
126
127
|
/**
|
|
127
128
|
* Every open `Block` parsed from this handle — the same non-owning rule,
|
|
128
|
-
* the same free-before-schema order (
|
|
129
|
+
* the same free-before-schema order (the C ABI contract §Blocks).
|
|
129
130
|
*/
|
|
130
131
|
private readonly blocks;
|
|
131
132
|
/** @internal — obtained from `Library#compileDdl`. */
|
|
@@ -147,7 +148,7 @@ export declare class Schema {
|
|
|
147
148
|
*
|
|
148
149
|
* The two error classes here are the refusal/decline split and MUST be
|
|
149
150
|
* handled as peers — `UnsupportedError` is deliberately NOT
|
|
150
|
-
* `instanceof SchemaError` (
|
|
151
|
+
* `instanceof SchemaError` (docs/reference/bindings.md rule 12):
|
|
151
152
|
*
|
|
152
153
|
* @param engine - the engine expression, e.g. `"SummingMergeTree"`,
|
|
153
154
|
* `"CollapsingMergeTree(sign)"`.
|
|
@@ -243,7 +244,7 @@ export declare class Schema {
|
|
|
243
244
|
* the same TreeRewriter + ExpressionAnalyzer pipeline the CONSTRAINT CHECK
|
|
244
245
|
* path runs, so comparison semantics are WHERE-side by construction:
|
|
245
246
|
* `x = 256` over UInt8 promotes (false for every row), it never wraps
|
|
246
|
-
* (
|
|
247
|
+
* (the C ABI contract §Filters).
|
|
247
248
|
*
|
|
248
249
|
* The expression may contain `{name:Type}` query parameters, bound with
|
|
249
250
|
* `options.params` (revision 4) — substitution is the server's own
|
|
@@ -280,7 +281,7 @@ export declare class Schema {
|
|
|
280
281
|
/**
|
|
281
282
|
* Parse a body ONCE into a `Block` (`chs_block_parse`) — the parse half of
|
|
282
283
|
* `Filter#rows`, exported so K filters can evaluate one event with no
|
|
283
|
-
* re-parse (`Filter#eval`;
|
|
284
|
+
* re-parse (`Filter#eval`; the C ABI contract §Blocks). Same formats and
|
|
284
285
|
* settings contract as `rows` (`settings` is the PARSE-side map: format
|
|
285
286
|
* settings, clock keys; evaluation takes none). Volatile DEFAULTs resolve
|
|
286
287
|
* against THIS call's clock instant, so
|
|
@@ -289,7 +290,7 @@ export declare class Schema {
|
|
|
289
290
|
* volatile DEFAULT.
|
|
290
291
|
*
|
|
291
292
|
* Per-row parse failures do NOT throw — they are recorded IN the block and
|
|
292
|
-
* answer `'
|
|
293
|
+
* answer `'d'` from every filter, with the recorded error. Release
|
|
293
294
|
* with `close()` / `Symbol.dispose`; `schema.close()` closes open blocks
|
|
294
295
|
* FIRST, the C-required order.
|
|
295
296
|
*
|
|
@@ -324,7 +325,7 @@ export declare class Schema {
|
|
|
324
325
|
* constructed directly.
|
|
325
326
|
*
|
|
326
327
|
* LIFETIME: a filter REFERENCES its schema handle — the C layer does not copy
|
|
327
|
-
* and does not refcount (
|
|
328
|
+
* and does not refcount (the C ABI contract §Filters). This binding enforces the
|
|
328
329
|
* free order structurally, both ways: the `Filter` holds its `Schema` (so the
|
|
329
330
|
* schema stays reachable), and `Schema#close` closes every open filter before
|
|
330
331
|
* freeing the schema. `close()` is idempotent, and `using` / `Symbol.dispose`
|
|
@@ -336,13 +337,13 @@ export declare class Schema {
|
|
|
336
337
|
* from two threads at once, and a chs_filter call is ALSO a use of its schema
|
|
337
338
|
* handle" (two filters over ONE schema must not run concurrently either). On
|
|
338
339
|
* a single JS thread every call here is synchronous, so ordinary Node code
|
|
339
|
-
* satisfies both by construction (
|
|
340
|
+
* satisfies both by construction (docs/reference/bindings.md §Concurrency); do not
|
|
340
341
|
* share a `Filter` — or its `Schema` — across `worker_threads`.
|
|
341
342
|
*
|
|
342
|
-
* ENFORCEMENT GATE: `'
|
|
343
|
+
* ENFORCEMENT GATE: `'e'` and `'d'` verdicts are NOT answers — a
|
|
343
344
|
* caller enforcing visibility MUST fail closed on both — and NO caller may
|
|
344
345
|
* enforce read-side security on this surface until the WHERE-truth rig gates
|
|
345
|
-
* green; until then it is a shadow/replay surface (
|
|
346
|
+
* green; until then it is a shadow/replay surface (the C ABI contract §Filters).
|
|
346
347
|
*/
|
|
347
348
|
export declare class Filter {
|
|
348
349
|
private readonly native;
|
|
@@ -359,7 +360,7 @@ export declare class Filter {
|
|
|
359
360
|
* formats and settings contract as `Schema#rows`, ONE C call. Rows are
|
|
360
361
|
* evaluated INDEPENDENTLY (there is no INSERT to abort):
|
|
361
362
|
* `input_format_allow_errors_*` does not apply, a bad text row declines
|
|
362
|
-
* (`'
|
|
363
|
+
* (`'d'`) and the tail resyncs so verdict indexes keep matching input
|
|
363
364
|
* rows, and volatile DEFAULTs resolve against one clock instant per call.
|
|
364
365
|
*
|
|
365
366
|
* @param format - the wire format code (`Format`).
|
|
@@ -375,14 +376,14 @@ export declare class Filter {
|
|
|
375
376
|
* Evaluate this filter over an already-parsed `Block` (`chs_filter_eval`)
|
|
376
377
|
* — the SAME result document `rows` returns: same `FilterResult` fields,
|
|
377
378
|
* same verdicts, same `errors` rule (a row the parse recorded as
|
|
378
|
-
* unparseable answers `'
|
|
379
|
+
* unparseable answers `'d'` with the recorded error). Evaluation is
|
|
379
380
|
* a pure function of (filter, block): no settings, and the block is
|
|
380
381
|
* neither consumed nor mutated, so one block can be evaluated by K filters
|
|
381
382
|
* sequentially with no re-parse — the live-SSE call shape.
|
|
382
383
|
*
|
|
383
384
|
* Filter and block MUST come from the SAME schema: a mismatched pair
|
|
384
385
|
* answers a REJECTED result (code 1002) — the C layer's loud refusal,
|
|
385
|
-
* never undefined
|
|
386
|
+
* never undefined behavior. A pair from two different libraries throws
|
|
386
387
|
* `ChtypesError`: no handle ever crosses a dlopen'd image boundary.
|
|
387
388
|
*
|
|
388
389
|
* @param block - a `Block` from `Schema#parseBlock`.
|
|
@@ -404,7 +405,7 @@ export declare class Filter {
|
|
|
404
405
|
* One body, parsed ONCE under one schema handle and one clock instant
|
|
405
406
|
* (`chs_block_parse`). Obtained from `Schema#parseBlock`; evaluated by
|
|
406
407
|
* `Filter#eval`. The parse-once/eval-many twin of `Filter#rows`
|
|
407
|
-
* (
|
|
408
|
+
* (the C ABI contract §Blocks): the live-SSE hot path is K filters × 1 event, and
|
|
408
409
|
* the block sheds the re-parse.
|
|
409
410
|
*
|
|
410
411
|
* LIFETIME: a block REFERENCES its schema handle exactly as a filter does —
|
package/dist/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAA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M,CAAsB;IAEpC,wDAAwD;IACxD,YACmB,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,MAAM,EAC/B,MAAM,EAAE,YAAY;IACpB,mEAAmE;IAC1D,IAAI,EAAE,MAAM,EAGtB;IAED;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,YAAY,CAIxE;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,IAAI,CAAC,KAAK,EAAE,KAAK,GAAG,YAAY,CAO/B;IAED;;;;OAIG;IACH,KAAK,IAAI,IAAI,CAKZ;IAED,4EAA4E;IAC5E,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,IAAI,CAEvB;CACF;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,KAAK;IAKd,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,MAAM;IALzB,OAAO,CAAC,MAAM,CAAqB;IAEnC,qDAAqD;IACrD,YACmB,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,MAAM,EAC/B,MAAM,EAAE,WAAW,EAGpB;IAED,qEAAqE;IACrE,IAAI,SAAS,IAAI,aAAa,CAE7B;IAED,sDAAsD;IACtD,UAAU,IAAI,WAAW,CAGxB;IAED;;;;OAIG;IACH,KAAK,IAAI,IAAI,CAKZ;IAED,wEAAwE;IACxE,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,IAAI,CAEvB;CACF"}
|
package/dist/schema.js
CHANGED
|
@@ -22,7 +22,7 @@ export class Schema {
|
|
|
22
22
|
native;
|
|
23
23
|
ddl;
|
|
24
24
|
/**
|
|
25
|
-
* The declared columns as ClickHouse
|
|
25
|
+
* The declared columns as ClickHouse canonicalized them, in declaration
|
|
26
26
|
* order — flattened under `flatten_nested=1`, DEFAULT-rewritten types
|
|
27
27
|
* (`x Int64 DEFAULT NULL` compiles as `Nullable(Int64)`), ALIAS types
|
|
28
28
|
* inferred. A gateway detects EPHEMERAL columns here, at compile time
|
|
@@ -33,12 +33,12 @@ export class Schema {
|
|
|
33
33
|
/**
|
|
34
34
|
* Every open `Filter` compiled from this handle, so `close()` can free them
|
|
35
35
|
* FIRST — the C layer does not refcount, and freeing the schema under a
|
|
36
|
-
* live filter is use-after-free (
|
|
36
|
+
* live filter is use-after-free (the C ABI contract §Filters, handle lifetime).
|
|
37
37
|
*/
|
|
38
38
|
filters = new Set();
|
|
39
39
|
/**
|
|
40
40
|
* Every open `Block` parsed from this handle — the same non-owning rule,
|
|
41
|
-
* the same free-before-schema order (
|
|
41
|
+
* the same free-before-schema order (the C ABI contract §Blocks).
|
|
42
42
|
*/
|
|
43
43
|
blocks = new Set();
|
|
44
44
|
/** @internal — obtained from `Library#compileDdl`. */
|
|
@@ -69,7 +69,7 @@ export class Schema {
|
|
|
69
69
|
*
|
|
70
70
|
* The two error classes here are the refusal/decline split and MUST be
|
|
71
71
|
* handled as peers — `UnsupportedError` is deliberately NOT
|
|
72
|
-
* `instanceof SchemaError` (
|
|
72
|
+
* `instanceof SchemaError` (docs/reference/bindings.md rule 12):
|
|
73
73
|
*
|
|
74
74
|
* @param engine - the engine expression, e.g. `"SummingMergeTree"`,
|
|
75
75
|
* `"CollapsingMergeTree(sign)"`.
|
|
@@ -177,7 +177,7 @@ export class Schema {
|
|
|
177
177
|
* the same TreeRewriter + ExpressionAnalyzer pipeline the CONSTRAINT CHECK
|
|
178
178
|
* path runs, so comparison semantics are WHERE-side by construction:
|
|
179
179
|
* `x = 256` over UInt8 promotes (false for every row), it never wraps
|
|
180
|
-
* (
|
|
180
|
+
* (the C ABI contract §Filters).
|
|
181
181
|
*
|
|
182
182
|
* The expression may contain `{name:Type}` query parameters, bound with
|
|
183
183
|
* `options.params` (revision 4) — substitution is the server's own
|
|
@@ -221,7 +221,7 @@ export class Schema {
|
|
|
221
221
|
/**
|
|
222
222
|
* Parse a body ONCE into a `Block` (`chs_block_parse`) — the parse half of
|
|
223
223
|
* `Filter#rows`, exported so K filters can evaluate one event with no
|
|
224
|
-
* re-parse (`Filter#eval`;
|
|
224
|
+
* re-parse (`Filter#eval`; the C ABI contract §Blocks). Same formats and
|
|
225
225
|
* settings contract as `rows` (`settings` is the PARSE-side map: format
|
|
226
226
|
* settings, clock keys; evaluation takes none). Volatile DEFAULTs resolve
|
|
227
227
|
* against THIS call's clock instant, so
|
|
@@ -230,7 +230,7 @@ export class Schema {
|
|
|
230
230
|
* volatile DEFAULT.
|
|
231
231
|
*
|
|
232
232
|
* Per-row parse failures do NOT throw — they are recorded IN the block and
|
|
233
|
-
* answer `'
|
|
233
|
+
* answer `'d'` from every filter, with the recorded error. Release
|
|
234
234
|
* with `close()` / `Symbol.dispose`; `schema.close()` closes open blocks
|
|
235
235
|
* FIRST, the C-required order.
|
|
236
236
|
*
|
|
@@ -285,7 +285,7 @@ export class Schema {
|
|
|
285
285
|
* constructed directly.
|
|
286
286
|
*
|
|
287
287
|
* LIFETIME: a filter REFERENCES its schema handle — the C layer does not copy
|
|
288
|
-
* and does not refcount (
|
|
288
|
+
* and does not refcount (the C ABI contract §Filters). This binding enforces the
|
|
289
289
|
* free order structurally, both ways: the `Filter` holds its `Schema` (so the
|
|
290
290
|
* schema stays reachable), and `Schema#close` closes every open filter before
|
|
291
291
|
* freeing the schema. `close()` is idempotent, and `using` / `Symbol.dispose`
|
|
@@ -297,13 +297,13 @@ export class Schema {
|
|
|
297
297
|
* from two threads at once, and a chs_filter call is ALSO a use of its schema
|
|
298
298
|
* handle" (two filters over ONE schema must not run concurrently either). On
|
|
299
299
|
* a single JS thread every call here is synchronous, so ordinary Node code
|
|
300
|
-
* satisfies both by construction (
|
|
300
|
+
* satisfies both by construction (docs/reference/bindings.md §Concurrency); do not
|
|
301
301
|
* share a `Filter` — or its `Schema` — across `worker_threads`.
|
|
302
302
|
*
|
|
303
|
-
* ENFORCEMENT GATE: `'
|
|
303
|
+
* ENFORCEMENT GATE: `'e'` and `'d'` verdicts are NOT answers — a
|
|
304
304
|
* caller enforcing visibility MUST fail closed on both — and NO caller may
|
|
305
305
|
* enforce read-side security on this surface until the WHERE-truth rig gates
|
|
306
|
-
* green; until then it is a shadow/replay surface (
|
|
306
|
+
* green; until then it is a shadow/replay surface (the C ABI contract §Filters).
|
|
307
307
|
*/
|
|
308
308
|
export class Filter {
|
|
309
309
|
native;
|
|
@@ -324,7 +324,7 @@ export class Filter {
|
|
|
324
324
|
* formats and settings contract as `Schema#rows`, ONE C call. Rows are
|
|
325
325
|
* evaluated INDEPENDENTLY (there is no INSERT to abort):
|
|
326
326
|
* `input_format_allow_errors_*` does not apply, a bad text row declines
|
|
327
|
-
* (`'
|
|
327
|
+
* (`'d'`) and the tail resyncs so verdict indexes keep matching input
|
|
328
328
|
* rows, and volatile DEFAULTs resolve against one clock instant per call.
|
|
329
329
|
*
|
|
330
330
|
* @param format - the wire format code (`Format`).
|
|
@@ -345,14 +345,14 @@ export class Filter {
|
|
|
345
345
|
* Evaluate this filter over an already-parsed `Block` (`chs_filter_eval`)
|
|
346
346
|
* — the SAME result document `rows` returns: same `FilterResult` fields,
|
|
347
347
|
* same verdicts, same `errors` rule (a row the parse recorded as
|
|
348
|
-
* unparseable answers `'
|
|
348
|
+
* unparseable answers `'d'` with the recorded error). Evaluation is
|
|
349
349
|
* a pure function of (filter, block): no settings, and the block is
|
|
350
350
|
* neither consumed nor mutated, so one block can be evaluated by K filters
|
|
351
351
|
* sequentially with no re-parse — the live-SSE call shape.
|
|
352
352
|
*
|
|
353
353
|
* Filter and block MUST come from the SAME schema: a mismatched pair
|
|
354
354
|
* answers a REJECTED result (code 1002) — the C layer's loud refusal,
|
|
355
|
-
* never undefined
|
|
355
|
+
* never undefined behavior. A pair from two different libraries throws
|
|
356
356
|
* `ChtypesError`: no handle ever crosses a dlopen'd image boundary.
|
|
357
357
|
*
|
|
358
358
|
* @param block - a `Block` from `Schema#parseBlock`.
|
|
@@ -390,7 +390,7 @@ export class Filter {
|
|
|
390
390
|
* One body, parsed ONCE under one schema handle and one clock instant
|
|
391
391
|
* (`chs_block_parse`). Obtained from `Schema#parseBlock`; evaluated by
|
|
392
392
|
* `Filter#eval`. The parse-once/eval-many twin of `Filter#rows`
|
|
393
|
-
* (
|
|
393
|
+
* (the C ABI contract §Blocks): the live-SSE hot path is K filters × 1 event, and
|
|
394
394
|
* the block sheds the re-parse.
|
|
395
395
|
*
|
|
396
396
|
* LIFETIME: a block REFERENCES its schema handle exactly as a filter does —
|
package/dist/schema.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EAAE,OAAO,EAAE,WAAW,EAAe,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EACL,aAAa,EACb,cAAc,EACd,WAAW,GAIZ,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,cAAc,EAAiB,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EAAE,OAAO,EAAE,WAAW,EAAe,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EACL,aAAa,EACb,cAAc,EACd,WAAW,GAIZ,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,cAAc,EAAiB,MAAM,eAAe,CAAC;AA8F9D;;;;;;;;;GASG;AACH,MAAM,OAAO,MAAM;IAwBE,MAAM;IAGd,GAAG;IA1Bd;;;;;;OAMG;IACM,OAAO,CAAwB;IAChC,MAAM,CAAsB;I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C5E,CAAC,MAAM,CAAC,OAAO,CAAC;QACd,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;CACF;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,OAAO,KAAK;IAKG,MAAM;IACN,MAAM;IALjB,MAAM,CAAqB;IAEnC,qDAAqD;IACrD,YACmB,MAAqB,EACrB,MAAc,EAC/B,MAAmB;sBAFF,MAAM;sBACN,MAAM;QAGvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,qEAAqE;IACrE,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,sDAAsD;IACtD,UAAU;QACR,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI;YAAE,MAAM,IAAI,YAAY,CAAC,0BAA0B,CAAC,CAAC;QAC7E,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED;;;;OAIG;IACH,KAAK;QACH,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI;YAAE,OAAO;QACjC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACnC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAED,wEAAwE;IACxE,CAAC,MAAM,CAAC,OAAO,CAAC;QACd,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;CACF"}
|
package/dist/settings.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A setting value crosses the boundary as a JSON **string**, always.
|
|
3
3
|
*
|
|
4
|
-
* This is not cosmetic (
|
|
5
|
-
* 19-digit nanosecond epoch, which does not survive an IEEE double.
|
|
4
|
+
* This is not cosmetic (the C ABI contract §Settings): `chtypes_now_epoch_nanos` is a
|
|
5
|
+
* 19-digit nanosecond epoch, which does not survive an IEEE double. Serialized
|
|
6
6
|
* as a JSON *number* through a JS `number` it arrives as 1.7e+18 and the setting
|
|
7
7
|
* is **silently ignored** — the batch keeps stamping the real wall clock and
|
|
8
8
|
* nothing anywhere says so.
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
export type SettingValue = string | bigint;
|
|
15
15
|
/**
|
|
16
16
|
* A map of ClickHouse query/format settings plus the six `chtypes_*` keys
|
|
17
|
-
* (clock control and admission budgets —
|
|
17
|
+
* (clock control and admission budgets — the C ABI contract §Settings), by name.
|
|
18
18
|
*
|
|
19
19
|
* Accepted everywhere settings travel: the compile profile
|
|
20
20
|
* (`Library#compileDdl`), the per-call map (`Schema#row` / `Schema#rows`), the
|
|
@@ -29,7 +29,7 @@ export type SettingValue = string | bigint;
|
|
|
29
29
|
*/
|
|
30
30
|
export type Settings = Readonly<Record<string, SettingValue>>;
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* Serialize settings to the `settings_json` object the C ABI expects — every
|
|
33
33
|
* value crossing as a JSON string.
|
|
34
34
|
*
|
|
35
35
|
* @param settings - the settings map; `undefined` encodes as `"{}"`, the
|
package/dist/settings.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChtypesError } from './errors.js';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Serialize settings to the `settings_json` object the C ABI expects — every
|
|
4
4
|
* value crossing as a JSON string.
|
|
5
5
|
*
|
|
6
6
|
* @param settings - the settings map; `undefined` encodes as `"{}"`, the
|
|
@@ -25,7 +25,7 @@ export function encodeSettings(settings) {
|
|
|
25
25
|
throw new ChtypesError(`chtypes: setting ${JSON.stringify(key)} must be a string or a bigint, got ` +
|
|
26
26
|
`${typeof value}. A JS number cannot carry a 19-digit nanosecond epoch: ` +
|
|
27
27
|
`1700000000123456789 becomes 1.7e+18 and the setting is silently ignored ` +
|
|
28
|
-
`(
|
|
28
|
+
`(the C ABI contract §Settings).`);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
return JSON.stringify(out);
|
package/dist/settings.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAkC3C;;;;;;;;;;GAUG;AACH,MAAM,UAAU,cAAc,CAAC,QAAmB;IAChD,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACxC,MAAM,GAAG,GAA2B,EAAE,CAAC;IACvC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QACpD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QACnB,CAAC;aAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YACrC,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;QAC9B,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,YAAY,CACpB,oBAAoB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,qCAAqC;gBAC1E,GAAG,OAAO,KAAK,0DAA0D;gBACzE,0EAA0E;gBAC1E,
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAkC3C;;;;;;;;;;GAUG;AACH,MAAM,UAAU,cAAc,CAAC,QAAmB;IAChD,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACxC,MAAM,GAAG,GAA2B,EAAE,CAAC;IACvC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QACpD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QACnB,CAAC;aAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YACrC,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;QAC9B,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,YAAY,CACpB,oBAAoB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,qCAAqC;gBAC1E,GAAG,OAAO,KAAK,0DAA0D;gBACzE,0EAA0E;gBAC1E,iCAAiC,CACpC,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;AAC7B,CAAC"}
|
package/dist/transform.d.ts
CHANGED
|
@@ -53,7 +53,7 @@ export declare const Reason: {
|
|
|
53
53
|
readonly Reformat: 'reformat';
|
|
54
54
|
readonly DefaultFilled: 'default_filled';
|
|
55
55
|
readonly ZeroFilled: 'zero_filled';
|
|
56
|
-
readonly
|
|
56
|
+
readonly DefaultMaterialized: 'default_materialized';
|
|
57
57
|
readonly TtlExpired: 'ttl_expired';
|
|
58
58
|
readonly TtlColumnExpired: 'ttl_column_expired';
|
|
59
59
|
};
|
|
@@ -63,7 +63,7 @@ export type Reason = (typeof Reason)[keyof typeof Reason];
|
|
|
63
63
|
* Whether a transform reason means information was LOST (a warning to raise to
|
|
64
64
|
* the tenant) rather than merely re-spelled or filled in. False for exactly
|
|
65
65
|
* four reasons — `reformat`, `default_filled`, `zero_filled`,
|
|
66
|
-
* `
|
|
66
|
+
* `default_materialized` — true for everything else, unknown strings included:
|
|
67
67
|
* a reason nobody has audited must degrade to a warning, never to silence.
|
|
68
68
|
* Mirrors `Transform#lossy`. Never throws.
|
|
69
69
|
*/
|
package/dist/transform.js
CHANGED
|
@@ -54,7 +54,7 @@ export const Reason = {
|
|
|
54
54
|
Reformat: 'reformat',
|
|
55
55
|
DefaultFilled: 'default_filled',
|
|
56
56
|
ZeroFilled: 'zero_filled',
|
|
57
|
-
|
|
57
|
+
DefaultMaterialized: 'default_materialized',
|
|
58
58
|
TtlExpired: 'ttl_expired',
|
|
59
59
|
TtlColumnExpired: 'ttl_column_expired',
|
|
60
60
|
};
|
|
@@ -68,13 +68,13 @@ const NON_LOSSY = new Set([
|
|
|
68
68
|
Reason.Reformat,
|
|
69
69
|
Reason.DefaultFilled,
|
|
70
70
|
Reason.ZeroFilled,
|
|
71
|
-
Reason.
|
|
71
|
+
Reason.DefaultMaterialized,
|
|
72
72
|
]);
|
|
73
73
|
/**
|
|
74
74
|
* Whether a transform reason means information was LOST (a warning to raise to
|
|
75
75
|
* the tenant) rather than merely re-spelled or filled in. False for exactly
|
|
76
76
|
* four reasons — `reformat`, `default_filled`, `zero_filled`,
|
|
77
|
-
* `
|
|
77
|
+
* `default_materialized` — true for everything else, unknown strings included:
|
|
78
78
|
* a reason nobody has audited must degrade to a warning, never to silence.
|
|
79
79
|
* Mirrors `Transform#lossy`. Never throws.
|
|
80
80
|
*/
|
|
@@ -127,7 +127,7 @@ export function classify(c) {
|
|
|
127
127
|
case 'default':
|
|
128
128
|
return [transform(c.name, EMPTY, stored, Reason.DefaultFilled)];
|
|
129
129
|
case 'default_substituted':
|
|
130
|
-
return [transform(c.name, EMPTY, stored, Reason.
|
|
130
|
+
return [transform(c.name, EMPTY, stored, Reason.DefaultMaterialized)];
|
|
131
131
|
case 'absent':
|
|
132
132
|
return [transform(c.name, EMPTY, stored, Reason.ZeroFilled)];
|
|
133
133
|
default:
|
|
@@ -215,7 +215,7 @@ function membersOf(v) {
|
|
|
215
215
|
return out;
|
|
216
216
|
}
|
|
217
217
|
/**
|
|
218
|
-
* Equal after
|
|
218
|
+
* Equal after canonicalization, where a number and its decimal string spelling
|
|
219
219
|
* are the same value (5 vs "5") but a float that has thrown away 60 digits of an
|
|
220
220
|
* Int256 is not. Mirrors the arbiter's `_same_value`.
|
|
221
221
|
*/
|