@wavehouse/chtypes 2.0.0-dev.10 → 2.0.0-dev.12
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 +18 -0
- package/README.md +2 -2
- package/dist/abi2/calls.gen.d.ts +5 -5
- package/dist/abi2/calls.gen.d.ts.map +1 -1
- package/dist/abi2/calls.gen.js +11 -11
- package/dist/abi2/calls.gen.js.map +1 -1
- package/dist/abi2/decls.gen.d.ts +2 -1
- package/dist/abi2/decls.gen.d.ts.map +1 -1
- package/dist/abi2/decls.gen.js +78 -21
- package/dist/abi2/decls.gen.js.map +1 -1
- package/dist/abi2/errmap.gen.js +1 -1
- package/dist/abi2/errors.d.ts +5 -2
- package/dist/abi2/errors.d.ts.map +1 -1
- package/dist/abi2/errors.js +4 -2
- package/dist/abi2/errors.js.map +1 -1
- package/dist/abi2/libc.gen.js +1 -1
- package/dist/abi2/loader.d.ts +4 -2
- package/dist/abi2/loader.d.ts.map +1 -1
- package/dist/abi2/raw.d.ts.map +1 -1
- package/dist/abi2/raw.js +4 -1
- package/dist/abi2/raw.js.map +1 -1
- package/dist/abi2/vocab.gen.d.ts +49 -1
- package/dist/abi2/vocab.gen.d.ts.map +1 -1
- package/dist/abi2/vocab.gen.js +81 -5
- package/dist/abi2/vocab.gen.js.map +1 -1
- package/dist/documents.d.ts +42 -9
- package/dist/documents.d.ts.map +1 -1
- package/dist/documents.js +60 -8
- package/dist/documents.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/library.d.ts.map +1 -1
- package/dist/library.js +5 -4
- package/dist/library.js.map +1 -1
- package/dist/ocifetch/ensure.d.ts.map +1 -1
- package/dist/ocifetch/ensure.js +32 -6
- package/dist/ocifetch/ensure.js.map +1 -1
- package/dist/ocifetch/layout.d.ts +10 -0
- package/dist/ocifetch/layout.d.ts.map +1 -1
- package/dist/ocifetch/layout.js +21 -2
- package/dist/ocifetch/layout.js.map +1 -1
- package/dist/ocifetch/localverify.d.ts +30 -6
- package/dist/ocifetch/localverify.d.ts.map +1 -1
- package/dist/ocifetch/localverify.js +58 -26
- package/dist/ocifetch/localverify.js.map +1 -1
- package/dist/schema.d.ts +44 -10
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +7 -7
- package/dist/schema.js.map +1 -1
- package/dist/settings.d.ts +83 -12
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +180 -41
- package/dist/settings.js.map +1 -1
- package/dist/setup.d.ts +3 -2
- package/dist/setup.d.ts.map +1 -1
- package/dist/setup.js +2 -3
- package/dist/setup.js.map +1 -1
- package/package.json +3 -3
package/dist/settings.d.ts
CHANGED
|
@@ -2,10 +2,14 @@
|
|
|
2
2
|
* Settings, the per-call zone and the other call inputs, serialized for the
|
|
3
3
|
* library exactly as `docs/reference/bindings-v1.md` §2 and §3 say.
|
|
4
4
|
*
|
|
5
|
-
* Settings values are strings, and
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* language's own type error (`TypeError`).
|
|
5
|
+
* Settings values are strings or bytes, and nothing else. The map becomes a JSON
|
|
6
|
+
* object through the stock encoder and each value is passed verbatim: no boolean
|
|
7
|
+
* or integer spelling, no float. A value that is neither a string nor a
|
|
8
|
+
* `Uint8Array` is the language's own type error (`TypeError`). A value whose
|
|
9
|
+
* bytes are valid UTF-8 is a JSON string; any other bytes (a `Uint8Array`) are
|
|
10
|
+
* the object form `{"b64": "<standard base64>"}` (ABI v2, `json_object_byte_values`),
|
|
11
|
+
* so the library sees the exact bytes. A key that is not valid UTF-8 cannot be
|
|
12
|
+
* carried at all and is a `UsageError`.
|
|
9
13
|
*
|
|
10
14
|
* The per-call zone is a settings key and nothing more: `sessionTimezone` is
|
|
11
15
|
* written into the object as `session_timezone`, verbatim, with no default,
|
|
@@ -13,8 +17,15 @@
|
|
|
13
17
|
* database). Passing it alongside a `session_timezone` key in `settings` is a
|
|
14
18
|
* `UsageError`, raised before any call and whether or not the two agree.
|
|
15
19
|
*/
|
|
16
|
-
|
|
17
|
-
|
|
20
|
+
import { type Posture } from './abi2/index.js';
|
|
21
|
+
/** A settings or query-parameter value: text, or the bytes of a value that need not be text (a non-UTF-8 value is sent in the `{"b64": ...}` object form). */
|
|
22
|
+
export type SettingValue = string | Uint8Array;
|
|
23
|
+
/** Settings and query parameters: names to values. */
|
|
24
|
+
export type Settings = Readonly<Record<string, SettingValue>>;
|
|
25
|
+
/** A value as the document carries it: a JSON string, or the object form of bytes that are not UTF-8. */
|
|
26
|
+
export type WireValue = string | {
|
|
27
|
+
readonly b64: string;
|
|
28
|
+
};
|
|
18
29
|
/** Bytes in: a statement, expression, type, name or literal. A string is encoded as UTF-8; pass a `Uint8Array` for bytes that are not text. */
|
|
19
30
|
export type BytesIn = Uint8Array | string;
|
|
20
31
|
/** The bytes of a `BytesIn`: UTF-8 for a string, the same bytes for a `Uint8Array`. */
|
|
@@ -24,13 +35,13 @@ export declare function bytesIn(value: BytesIn): Buffer;
|
|
|
24
35
|
* map nor a zone, else a JSON object of string values with the zone, when
|
|
25
36
|
* given, written in as `session_timezone`.
|
|
26
37
|
*/
|
|
27
|
-
export declare function encodeSettings(settings: Settings | undefined, sessionTimezone:
|
|
38
|
+
export declare function encodeSettings(settings: Settings | undefined, sessionTimezone: SettingValue | undefined): Buffer;
|
|
28
39
|
/** Query parameters: a JSON object of string values, or nothing when absent. */
|
|
29
40
|
export declare function encodeParams(params: Settings | undefined): Buffer;
|
|
30
41
|
/** The INSERT column list: a JSON array of names, each an object carrying `name` when its bytes are valid UTF-8 and `name_b64` otherwise, or nothing (length 0) when absent. */
|
|
31
42
|
export declare function encodeColumns(columns: readonly BytesIn[] | undefined): Buffer;
|
|
32
|
-
/** The process default settings, as `chs_set_defaults` takes them. */
|
|
33
|
-
export declare function validateDefaults(defaults: Settings):
|
|
43
|
+
/** The process default settings, as `chs_set_defaults` takes them: the wire form of each value (a value that is not valid UTF-8 is `{"b64": ...}`). */
|
|
44
|
+
export declare function validateDefaults(defaults: Settings): Readonly<Record<string, WireValue>>;
|
|
34
45
|
/**
|
|
35
46
|
* One ClickHouse server, as `chs_server_create` takes it (`input:server_profile`).
|
|
36
47
|
* Every member is optional, and every value is passed through as given: the
|
|
@@ -40,16 +51,76 @@ export declare function validateDefaults(defaults: Settings): void;
|
|
|
40
51
|
export interface ServerProfile {
|
|
41
52
|
/** The server's zone, the one its `timezone()` returns. Absent or `''` omits it: the server does not describe it, and the image zone applies. */
|
|
42
53
|
readonly timezone?: string | undefined;
|
|
43
|
-
/** What the server's profile applies to every query. Absent omits it (no server settings layer); `{}` is sent as `{}`. */
|
|
54
|
+
/** What the server's profile applies to every query. Absent omits it (no server settings layer); `{}` is sent as `{}`. A value that is not valid UTF-8 is a `Uint8Array`, sent in the `{"b64": ...}` form. */
|
|
44
55
|
readonly settings?: Settings | undefined;
|
|
45
56
|
/**
|
|
46
57
|
* The server's `<macros>`, which a Replicated engine's ZooKeeper path and
|
|
47
58
|
* replica name expand. ABSENT is not `{}`: absent means the server's macros
|
|
48
59
|
* are UNKNOWN, and a schema whose engine reads one is declined; present, even
|
|
49
|
-
* `{}`, is the server's COMPLETE set.
|
|
60
|
+
* `{}`, is the server's COMPLETE set. A macro's name and value are text: they
|
|
61
|
+
* have no byte form.
|
|
50
62
|
*/
|
|
51
|
-
readonly macros?:
|
|
63
|
+
readonly macros?: Readonly<Record<string, string>> | undefined;
|
|
52
64
|
}
|
|
53
65
|
/** The profile document: an empty or absent zone, absent settings and absent macros are omitted; a present map is sent as given, `{}` when empty. */
|
|
54
66
|
export declare function encodeServerProfile(profile: ServerProfile): Buffer;
|
|
67
|
+
/** `insert_options.verdict_basis`: what row a filter verdict answers for. */
|
|
68
|
+
export declare const VerdictBasis: {
|
|
69
|
+
/** The default: the verdict answers for the input row. */
|
|
70
|
+
readonly Input: 'input';
|
|
71
|
+
/** The row the export would store. A build that does not implement it declines it. */
|
|
72
|
+
readonly Export: 'export';
|
|
73
|
+
};
|
|
74
|
+
export type VerdictBasis = (typeof VerdictBasis)[keyof typeof VerdictBasis];
|
|
75
|
+
/** `insert_options.defer_defaults`. */
|
|
76
|
+
export declare const DeferDefaults: {
|
|
77
|
+
/** The default: no DEFAULT is deferred. */
|
|
78
|
+
readonly None: 'none';
|
|
79
|
+
/** Defer to the server each DEFAULT the build would otherwise decline. A build that does not implement it declines it. */
|
|
80
|
+
readonly Server: 'server';
|
|
81
|
+
};
|
|
82
|
+
export type DeferDefaults = (typeof DeferDefaults)[keyof typeof DeferDefaults];
|
|
83
|
+
/** `filter_options.param_encoding`: how a query parameter's value is read. */
|
|
84
|
+
export declare const ParamEncoding: {
|
|
85
|
+
/** The default: ClickHouse's escaped-text reader. */
|
|
86
|
+
readonly Escaped: 'escaped';
|
|
87
|
+
/** The bytes as the value. A build that does not implement it declines it. */
|
|
88
|
+
readonly Raw: 'raw';
|
|
89
|
+
};
|
|
90
|
+
export type ParamEncoding = (typeof ParamEncoding)[keyof typeof ParamEncoding];
|
|
91
|
+
/** One entry of `insert_options.column_defaults`: the value the call uses in a cell the server would fill from the column's DEFAULT. Both are byte strings: bytes that are not valid UTF-8 are sent in the `name_b64` and `value_b64` forms. */
|
|
92
|
+
export interface ColumnDefault {
|
|
93
|
+
readonly name: BytesIn;
|
|
94
|
+
readonly value: BytesIn;
|
|
95
|
+
}
|
|
96
|
+
/** The `insert_options` members of the four calls that model an INSERT of a body (`row`, `rows`, `parseBlock`, and a filter's `rows`): what `encodeInsertOptions` reads from those calls' options objects. */
|
|
97
|
+
export interface InsertOptions {
|
|
98
|
+
/** The columns an INSERT may supply (the server's column-level INSERT grant). Absent leaves the member out (every column); `[]` is sent as `[]` (no column). */
|
|
99
|
+
readonly insertableColumns?: readonly BytesIn[] | undefined;
|
|
100
|
+
/** Per-call DEFAULT overrides. Absent leaves the member out; `[]` is sent as `[]`. */
|
|
101
|
+
readonly columnDefaults?: readonly ColumnDefault[] | undefined;
|
|
102
|
+
readonly verdictBasis?: VerdictBasis | undefined;
|
|
103
|
+
readonly deferDefaults?: DeferDefaults | undefined;
|
|
104
|
+
/** Any other member of `insert_options`: key to its value as JSON text, passed through as given (rule r1). A key also named above keeps this value. Text that is not valid JSON is a `UsageError` before any call. */
|
|
105
|
+
readonly insertOptionsExtra?: Readonly<Record<string, string>> | undefined;
|
|
106
|
+
}
|
|
107
|
+
/** The `filter_options` members of `Schema.compileFilter`. */
|
|
108
|
+
export interface FilterOptionMembers {
|
|
109
|
+
readonly paramEncoding?: ParamEncoding | undefined;
|
|
110
|
+
/** Any other member of `filter_options`, as `insertOptionsExtra` is for `insert_options`. */
|
|
111
|
+
readonly filterOptionsExtra?: Readonly<Record<string, string>> | undefined;
|
|
112
|
+
}
|
|
113
|
+
/** The `schema_options` members of `Library.compileTable`. */
|
|
114
|
+
export interface SchemaOptionMembers {
|
|
115
|
+
/** How the statement is compiled: `Posture.Create` (the default), as a server's CREATE TABLE, or `Posture.Load`, as a server loads the stored definition of a table it holds. */
|
|
116
|
+
readonly posture?: Posture | undefined;
|
|
117
|
+
/** Any other member of `schema_options`, as `insertOptionsExtra` is for `insert_options`. */
|
|
118
|
+
readonly schemaOptionsExtra?: Readonly<Record<string, string>> | undefined;
|
|
119
|
+
}
|
|
120
|
+
/** The `insert_options` document of a call that models an INSERT. */
|
|
121
|
+
export declare function encodeInsertOptions(o: InsertOptions): Buffer;
|
|
122
|
+
/** The `filter_options` document of `chs_filter_create`. */
|
|
123
|
+
export declare function encodeFilterOptions(o: FilterOptionMembers): Buffer;
|
|
124
|
+
/** The `schema_options` document of `chs_schema_create`. */
|
|
125
|
+
export declare function encodeSchemaOptions(o: SchemaOptionMembers): Buffer;
|
|
55
126
|
//# sourceMappingURL=settings.d.ts.map
|
package/dist/settings.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAAA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AE,GAAG,SAAS,CAAC;IAC/D,QAAQ,CAAC,YAAY,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;IACjD,QAAQ,CAAC,aAAa,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IACnD,sNAAsN;IACtN,QAAQ,CAAC,kBAAkB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,SAAS,CAAC;CAC5E;AAED,8DAA8D;AAC9D,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,aAAa,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IACnD,6FAA6F;IAC7F,QAAQ,CAAC,kBAAkB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,SAAS,CAAC;CAC5E;AAED,8DAA8D;AAC9D,MAAM,WAAW,mBAAmB;IAClC,iLAAiL;IACjL,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACvC,6FAA6F;IAC7F,QAAQ,CAAC,kBAAkB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,SAAS,CAAC;CAC5E;AAoDD,qEAAqE;AACrE,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,aAAa,GAAG,MAAM,CAa5D;AAED,4DAA4D;AAC5D,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,mBAAmB,GAAG,MAAM,CAKlE;AAED,4DAA4D;AAC5D,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,mBAAmB,GAAG,MAAM,CAKlE"}
|
package/dist/settings.js
CHANGED
|
@@ -2,10 +2,14 @@
|
|
|
2
2
|
* Settings, the per-call zone and the other call inputs, serialized for the
|
|
3
3
|
* library exactly as `docs/reference/bindings-v1.md` §2 and §3 say.
|
|
4
4
|
*
|
|
5
|
-
* Settings values are strings, and
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* language's own type error (`TypeError`).
|
|
5
|
+
* Settings values are strings or bytes, and nothing else. The map becomes a JSON
|
|
6
|
+
* object through the stock encoder and each value is passed verbatim: no boolean
|
|
7
|
+
* or integer spelling, no float. A value that is neither a string nor a
|
|
8
|
+
* `Uint8Array` is the language's own type error (`TypeError`). A value whose
|
|
9
|
+
* bytes are valid UTF-8 is a JSON string; any other bytes (a `Uint8Array`) are
|
|
10
|
+
* the object form `{"b64": "<standard base64>"}` (ABI v2, `json_object_byte_values`),
|
|
11
|
+
* so the library sees the exact bytes. A key that is not valid UTF-8 cannot be
|
|
12
|
+
* carried at all and is a `UsageError`.
|
|
9
13
|
*
|
|
10
14
|
* The per-call zone is a settings key and nothing more: `sessionTimezone` is
|
|
11
15
|
* written into the object as `session_timezone`, verbatim, with no default,
|
|
@@ -19,26 +23,58 @@ const ZONE_KEY = 'session_timezone';
|
|
|
19
23
|
export function bytesIn(value) {
|
|
20
24
|
return typeof value === 'string' ? Buffer.from(value, 'utf8') : asBuffer(value);
|
|
21
25
|
}
|
|
22
|
-
const NON_UTF8_HINT = '
|
|
26
|
+
const NON_UTF8_HINT = 'a JSON input cannot carry these bytes here (only a settings or query-parameter value has the {"b64": ...} object form, and a string holding a lone surrogate has no bytes; pass a Uint8Array)';
|
|
23
27
|
/** True for a string with a lone surrogate, which no UTF-8 encoding carries: `JSON.stringify` writes it as a `\udXXX` escape and `TextEncoder` as U+FFFD. */
|
|
24
28
|
function hasLoneSurrogate(text) {
|
|
25
29
|
return /\p{Surrogate}/u.test(text);
|
|
26
30
|
}
|
|
27
|
-
|
|
31
|
+
// ignoreBOM: a leading U+FEFF is data, and the decoder must not drop it.
|
|
32
|
+
const utf8 = new TextDecoder('utf-8', { fatal: true, ignoreBOM: true });
|
|
33
|
+
/** The text of `bytes` when they are valid UTF-8, else `undefined`. */
|
|
34
|
+
function utf8Text(bytes) {
|
|
35
|
+
try {
|
|
36
|
+
return utf8.decode(bytes);
|
|
37
|
+
}
|
|
38
|
+
catch {
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function isValidUtf8(bytes) {
|
|
43
|
+
return utf8Text(bytes) !== undefined;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* One value of `json_object_byte_values`: a string stays a JSON string, and
|
|
47
|
+
* bytes are a JSON string when they are valid UTF-8 and `{"b64": ...}` (standard
|
|
48
|
+
* base64, padded) otherwise. `where` names the value for a refusal.
|
|
49
|
+
*/
|
|
50
|
+
function wireValue(what, where, v) {
|
|
51
|
+
if (typeof v === 'string') {
|
|
52
|
+
if (hasLoneSurrogate(v))
|
|
53
|
+
throw usageError(`${what}: ${where} is not valid UTF-8, and ${NON_UTF8_HINT}`);
|
|
54
|
+
return v;
|
|
55
|
+
}
|
|
56
|
+
if (v instanceof Uint8Array) {
|
|
57
|
+
return utf8Text(v) ?? { b64: asBuffer(v).toString('base64') };
|
|
58
|
+
}
|
|
59
|
+
throw new TypeError(`chtypes: ${what} ${where} must be a string or a Uint8Array, got ${typeof v}`);
|
|
60
|
+
}
|
|
61
|
+
function keyName(k) {
|
|
62
|
+
return `the key ${JSON.stringify(k)}`;
|
|
63
|
+
}
|
|
64
|
+
/** The wire form of a map of byte values; refuses a key that is not valid UTF-8 (the key is shown through JSON.stringify, which escapes a lone surrogate: never raw). */
|
|
65
|
+
function wireMap(what, map) {
|
|
28
66
|
const shown = what === 'params' ? 'query parameters' : what;
|
|
67
|
+
const out = {};
|
|
29
68
|
for (const [k, v] of Object.entries(map)) {
|
|
30
|
-
if (typeof v !== 'string')
|
|
31
|
-
throw new TypeError(`chtypes: ${what}[${JSON.stringify(k)}] must be a string, got ${typeof v}`);
|
|
32
|
-
// The key is shown through JSON.stringify, which escapes a lone surrogate: never raw.
|
|
33
69
|
if (hasLoneSurrogate(k))
|
|
34
|
-
throw usageError(`${shown}:
|
|
35
|
-
if (
|
|
36
|
-
throw
|
|
70
|
+
throw usageError(`${shown}: ${keyName(k)} is not valid UTF-8, and ${NON_UTF8_HINT}`);
|
|
71
|
+
if (typeof v !== 'string' && !(v instanceof Uint8Array)) {
|
|
72
|
+
throw new TypeError(`chtypes: ${what}[${JSON.stringify(k)}] must be a string or a Uint8Array, got ${typeof v}`);
|
|
73
|
+
}
|
|
74
|
+
// defineProperty, so a key such as "__proto__" is an own member and never the prototype.
|
|
75
|
+
Object.defineProperty(out, k, { value: wireValue(shown, `the value for key ${JSON.stringify(k)}`, v), enumerable: true, writable: true, configurable: true });
|
|
37
76
|
}
|
|
38
|
-
|
|
39
|
-
function checkZone(what, zone) {
|
|
40
|
-
if (hasLoneSurrogate(zone))
|
|
41
|
-
throw usageError(`${what}: the value is not valid UTF-8, and ${NON_UTF8_HINT}`);
|
|
77
|
+
return out;
|
|
42
78
|
}
|
|
43
79
|
/**
|
|
44
80
|
* The `settings` input of a call: nothing (length 0) when there is neither a
|
|
@@ -48,19 +84,18 @@ function checkZone(what, zone) {
|
|
|
48
84
|
export function encodeSettings(settings, sessionTimezone) {
|
|
49
85
|
if (settings === undefined && sessionTimezone === undefined)
|
|
50
86
|
return Buffer.alloc(0);
|
|
51
|
-
|
|
87
|
+
let out = {};
|
|
52
88
|
if (settings !== undefined) {
|
|
53
|
-
checkStrings('settings', settings);
|
|
54
89
|
if (sessionTimezone !== undefined && Object.hasOwn(settings, ZONE_KEY)) {
|
|
55
90
|
throw usageError(`the zone was given twice: sessionTimezone and a ${ZONE_KEY} key in settings; pass only one`);
|
|
56
91
|
}
|
|
57
|
-
|
|
92
|
+
out = wireMap('settings', settings);
|
|
58
93
|
}
|
|
59
94
|
if (sessionTimezone !== undefined) {
|
|
60
|
-
if (typeof sessionTimezone !== 'string')
|
|
61
|
-
throw new TypeError(`chtypes: sessionTimezone must be a string, got ${typeof sessionTimezone}`);
|
|
62
|
-
|
|
63
|
-
out[ZONE_KEY] = sessionTimezone;
|
|
95
|
+
if (typeof sessionTimezone !== 'string' && !(sessionTimezone instanceof Uint8Array)) {
|
|
96
|
+
throw new TypeError(`chtypes: sessionTimezone must be a string or a Uint8Array, got ${typeof sessionTimezone}`);
|
|
97
|
+
}
|
|
98
|
+
out[ZONE_KEY] = wireValue('the zone', 'the value', sessionTimezone);
|
|
64
99
|
}
|
|
65
100
|
return Buffer.from(JSON.stringify(out), 'utf8');
|
|
66
101
|
}
|
|
@@ -68,18 +103,7 @@ export function encodeSettings(settings, sessionTimezone) {
|
|
|
68
103
|
export function encodeParams(params) {
|
|
69
104
|
if (params === undefined)
|
|
70
105
|
return Buffer.alloc(0);
|
|
71
|
-
|
|
72
|
-
return Buffer.from(JSON.stringify({ ...params }), 'utf8');
|
|
73
|
-
}
|
|
74
|
-
const utf8 = new TextDecoder('utf-8', { fatal: true });
|
|
75
|
-
function isValidUtf8(bytes) {
|
|
76
|
-
try {
|
|
77
|
-
utf8.decode(bytes);
|
|
78
|
-
return true;
|
|
79
|
-
}
|
|
80
|
-
catch {
|
|
81
|
-
return false;
|
|
82
|
-
}
|
|
106
|
+
return Buffer.from(JSON.stringify(wireMap('params', params)), 'utf8');
|
|
83
107
|
}
|
|
84
108
|
/** The INSERT column list: a JSON array of names, each an object carrying `name` when its bytes are valid UTF-8 and `name_b64` otherwise, or nothing (length 0) when absent. */
|
|
85
109
|
export function encodeColumns(columns) {
|
|
@@ -92,9 +116,9 @@ export function encodeColumns(columns) {
|
|
|
92
116
|
});
|
|
93
117
|
return Buffer.from(JSON.stringify(names), 'utf8');
|
|
94
118
|
}
|
|
95
|
-
/** The process default settings, as `chs_set_defaults` takes them. */
|
|
119
|
+
/** The process default settings, as `chs_set_defaults` takes them: the wire form of each value (a value that is not valid UTF-8 is `{"b64": ...}`). */
|
|
96
120
|
export function validateDefaults(defaults) {
|
|
97
|
-
|
|
121
|
+
return wireMap('defaults', defaults);
|
|
98
122
|
}
|
|
99
123
|
/** The profile document: an empty or absent zone, absent settings and absent macros are omitted; a present map is sent as given, `{}` when empty. */
|
|
100
124
|
export function encodeServerProfile(profile) {
|
|
@@ -102,17 +126,132 @@ export function encodeServerProfile(profile) {
|
|
|
102
126
|
if (profile.timezone !== undefined && profile.timezone !== '') {
|
|
103
127
|
if (typeof profile.timezone !== 'string')
|
|
104
128
|
throw new TypeError(`chtypes: timezone must be a string, got ${typeof profile.timezone}`);
|
|
105
|
-
|
|
129
|
+
if (hasLoneSurrogate(profile.timezone))
|
|
130
|
+
throw usageError(`server profile: the timezone is not valid UTF-8, and ${NON_UTF8_HINT}`);
|
|
106
131
|
out.timezone = profile.timezone;
|
|
107
132
|
}
|
|
108
133
|
if (profile.settings !== undefined) {
|
|
109
|
-
|
|
110
|
-
out.settings = { ...profile.settings };
|
|
134
|
+
out.settings = wireMap('settings', profile.settings);
|
|
111
135
|
}
|
|
112
136
|
if (profile.macros !== undefined) {
|
|
113
|
-
|
|
137
|
+
for (const [k, v] of Object.entries(profile.macros)) {
|
|
138
|
+
if (typeof v !== 'string')
|
|
139
|
+
throw new TypeError(`chtypes: macros[${JSON.stringify(k)}] must be a string, got ${typeof v}`);
|
|
140
|
+
if (hasLoneSurrogate(k))
|
|
141
|
+
throw usageError(`macros: ${keyName(k)} is not valid UTF-8, and ${NON_UTF8_HINT}`);
|
|
142
|
+
if (hasLoneSurrogate(v))
|
|
143
|
+
throw usageError(`macros: the value for key ${JSON.stringify(k)} is not valid UTF-8, and ${NON_UTF8_HINT}`);
|
|
144
|
+
}
|
|
114
145
|
out.macros = { ...profile.macros };
|
|
115
146
|
}
|
|
116
147
|
return Buffer.from(JSON.stringify(out), 'utf8');
|
|
117
148
|
}
|
|
149
|
+
// ---- the options documents (rule r1). Each named member is its own option, and a
|
|
150
|
+
// key the binding has no name for goes through an `...Extra` record as JSON text.
|
|
151
|
+
// The binding builds the document from the members the caller set, sends nothing
|
|
152
|
+
// when none was set, and validates no member: the library refuses a key it does not
|
|
153
|
+
// know, or a value that is not one of the member's, with CHS_INVALID_ARGUMENT,
|
|
154
|
+
// naming it.
|
|
155
|
+
/** `insert_options.verdict_basis`: what row a filter verdict answers for. */
|
|
156
|
+
export const VerdictBasis = {
|
|
157
|
+
/** The default: the verdict answers for the input row. */
|
|
158
|
+
Input: 'input',
|
|
159
|
+
/** The row the export would store. A build that does not implement it declines it. */
|
|
160
|
+
Export: 'export',
|
|
161
|
+
};
|
|
162
|
+
/** `insert_options.defer_defaults`. */
|
|
163
|
+
export const DeferDefaults = {
|
|
164
|
+
/** The default: no DEFAULT is deferred. */
|
|
165
|
+
None: 'none',
|
|
166
|
+
/** Defer to the server each DEFAULT the build would otherwise decline. A build that does not implement it declines it. */
|
|
167
|
+
Server: 'server',
|
|
168
|
+
};
|
|
169
|
+
/** `filter_options.param_encoding`: how a query parameter's value is read. */
|
|
170
|
+
export const ParamEncoding = {
|
|
171
|
+
/** The default: ClickHouse's escaped-text reader. */
|
|
172
|
+
Escaped: 'escaped',
|
|
173
|
+
/** The bytes as the value. A build that does not implement it declines it. */
|
|
174
|
+
Raw: 'raw',
|
|
175
|
+
};
|
|
176
|
+
/** A name or value as a byte-string member: `<key>` when it is text, `<key>_b64` otherwise. */
|
|
177
|
+
function byteMember(what, key, v) {
|
|
178
|
+
if (typeof v === 'string') {
|
|
179
|
+
if (hasLoneSurrogate(v))
|
|
180
|
+
throw usageError(`${what}: the ${key} is not valid UTF-8, and ${NON_UTF8_HINT}`);
|
|
181
|
+
return { [key]: v };
|
|
182
|
+
}
|
|
183
|
+
if (!(v instanceof Uint8Array))
|
|
184
|
+
throw new TypeError(`chtypes: ${what}: the ${key} must be a string or a Uint8Array, got ${typeof v}`);
|
|
185
|
+
return isValidUtf8(v) ? { [key]: Buffer.from(v.buffer, v.byteOffset, v.byteLength).toString('utf8') } : { [`${key}_b64`]: asBuffer(v).toString('base64') };
|
|
186
|
+
}
|
|
187
|
+
function nameObject(what, name) {
|
|
188
|
+
return byteMember(what, 'name', name);
|
|
189
|
+
}
|
|
190
|
+
/** The members of an options document under construction, each as its JSON text, by key; a key set twice keeps the last. */
|
|
191
|
+
class OptionDoc {
|
|
192
|
+
#members = new Map();
|
|
193
|
+
what;
|
|
194
|
+
constructor(what) {
|
|
195
|
+
this.what = what;
|
|
196
|
+
}
|
|
197
|
+
set(key, value) {
|
|
198
|
+
this.#members.set(key, JSON.stringify(value));
|
|
199
|
+
}
|
|
200
|
+
/** Members given as JSON text, passed through verbatim after a validity check. */
|
|
201
|
+
setRaw(extra) {
|
|
202
|
+
if (extra === undefined)
|
|
203
|
+
return;
|
|
204
|
+
for (const [key, text] of Object.entries(extra)) {
|
|
205
|
+
if (hasLoneSurrogate(key))
|
|
206
|
+
throw usageError(`${this.what}: ${keyName(key)} is not valid UTF-8, and ${NON_UTF8_HINT}`);
|
|
207
|
+
if (typeof text !== 'string')
|
|
208
|
+
throw new TypeError(`chtypes: ${this.what}[${JSON.stringify(key)}] must be JSON text (a string), got ${typeof text}`);
|
|
209
|
+
try {
|
|
210
|
+
JSON.parse(text);
|
|
211
|
+
}
|
|
212
|
+
catch {
|
|
213
|
+
throw usageError(`${this.what}: the value for key ${JSON.stringify(key)} is not valid JSON`);
|
|
214
|
+
}
|
|
215
|
+
this.#members.set(key, text);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
/** The document, or nothing (length 0, which the library reads as `{}`) when no member was set. */
|
|
219
|
+
encode() {
|
|
220
|
+
if (this.#members.size === 0)
|
|
221
|
+
return Buffer.alloc(0);
|
|
222
|
+
const members = [...this.#members].map(([k, text]) => `${JSON.stringify(k)}:${text}`);
|
|
223
|
+
return Buffer.from(`{${members.join(',')}}`, 'utf8');
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
/** The `insert_options` document of a call that models an INSERT. */
|
|
227
|
+
export function encodeInsertOptions(o) {
|
|
228
|
+
const doc = new OptionDoc('insert options');
|
|
229
|
+
if (o.insertableColumns !== undefined)
|
|
230
|
+
doc.set('insertable_columns', o.insertableColumns.map((n) => nameObject('insert options', n)));
|
|
231
|
+
if (o.columnDefaults !== undefined) {
|
|
232
|
+
doc.set('column_defaults', o.columnDefaults.map((d) => ({ ...nameObject('insert options', d.name), ...byteMember('insert options', 'value', d.value) })));
|
|
233
|
+
}
|
|
234
|
+
if (o.verdictBasis !== undefined)
|
|
235
|
+
doc.set('verdict_basis', o.verdictBasis);
|
|
236
|
+
if (o.deferDefaults !== undefined)
|
|
237
|
+
doc.set('defer_defaults', o.deferDefaults);
|
|
238
|
+
doc.setRaw(o.insertOptionsExtra);
|
|
239
|
+
return doc.encode();
|
|
240
|
+
}
|
|
241
|
+
/** The `filter_options` document of `chs_filter_create`. */
|
|
242
|
+
export function encodeFilterOptions(o) {
|
|
243
|
+
const doc = new OptionDoc('filter options');
|
|
244
|
+
if (o.paramEncoding !== undefined)
|
|
245
|
+
doc.set('param_encoding', o.paramEncoding);
|
|
246
|
+
doc.setRaw(o.filterOptionsExtra);
|
|
247
|
+
return doc.encode();
|
|
248
|
+
}
|
|
249
|
+
/** The `schema_options` document of `chs_schema_create`. */
|
|
250
|
+
export function encodeSchemaOptions(o) {
|
|
251
|
+
const doc = new OptionDoc('schema options');
|
|
252
|
+
if (o.posture !== undefined)
|
|
253
|
+
doc.set('posture', o.posture);
|
|
254
|
+
doc.setRaw(o.schemaOptionsExtra);
|
|
255
|
+
return doc.encode();
|
|
256
|
+
}
|
|
118
257
|
//# sourceMappingURL=settings.js.map
|
package/dist/settings.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,QAAQ,EAAgB,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAcrE,MAAM,QAAQ,GAAG,kBAAkB,CAAC;AAEpC,uFAAuF;AACvF,MAAM,UAAU,OAAO,CAAC,KAAc;IACpC,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,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CAAC,CAAC;IACjC,OAAO,GAAG,CAAC,MAAM,EAAE,CAAC;AACtB,CAAC;AAED,4DAA4D;AAC5D,MAAM,UAAU,mBAAmB,CAAC,CAAsB;IACxD,MAAM,GAAG,GAAG,IAAI,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,IAAI,CAAC,CAAC,aAAa,KAAK,SAAS;QAAE,GAAG,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC,CAAC,aAAa,CAAC,CAAC;IAC9E,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC;IACjC,OAAO,GAAG,CAAC,MAAM,EAAE,CAAC;AACtB,CAAC;AAED,4DAA4D;AAC5D,MAAM,UAAU,mBAAmB,CAAC,CAAsB;IACxD,MAAM,GAAG,GAAG,IAAI,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,IAAI,CAAC,CAAC,OAAO,KAAK,SAAS;QAAE,GAAG,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC;IAC3D,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC;IACjC,OAAO,GAAG,CAAC,MAAM,EAAE,CAAC;AACtB,CAAC"}
|
package/dist/setup.d.ts
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* This is state of the isolate: every worker thread calls it identically, and
|
|
26
26
|
* a worker whose zone differs is refused by the library at its first open.
|
|
27
27
|
*/
|
|
28
|
-
import { type Settings } from './settings.js';
|
|
28
|
+
import { type Settings, type WireValue } from './settings.js';
|
|
29
29
|
/** What `setup` takes: the image zone (an IANA name) and the default settings every call starts from. */
|
|
30
30
|
export interface SetupOptions {
|
|
31
31
|
readonly timezone?: string;
|
|
@@ -34,7 +34,8 @@ export interface SetupOptions {
|
|
|
34
34
|
/** The setup in effect, as step 7 applies it. */
|
|
35
35
|
export interface ProcessSetup {
|
|
36
36
|
readonly timezone: string;
|
|
37
|
-
|
|
37
|
+
/** Each default as the library takes it: a JSON string, or `{"b64": ...}` for a value that is not valid UTF-8. */
|
|
38
|
+
readonly defaults: Readonly<Record<string, WireValue>>;
|
|
38
39
|
}
|
|
39
40
|
/** Record the process setup, once. Call it before the first open; see this module's header for the rule. */
|
|
40
41
|
export declare function setup(options?: SetupOptions): void;
|
package/dist/setup.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAGH,OAAO,EAAE,KAAK,QAAQ,EAAoB,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAGH,OAAO,EAAE,KAAK,QAAQ,EAAoB,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAEhF,yGAAyG;AACzG,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;CAC9B;AAED,iDAAiD;AACjD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,kHAAkH;IAClH,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;CACxD;AAuBD,4GAA4G;AAC5G,wBAAgB,KAAK,CAAC,OAAO,GAAE,YAAiB,GAAG,IAAI,CAatD;AAED,4KAA4K;AAC5K,wBAAgB,WAAW,IAAI,YAAY,CAI1C;AAED,kEAAkE;AAClE,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAED,wMAAwM;AACxM,wBAAgB,UAAU,IAAI,IAAI,CAGjC;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAGpD;AAED,kGAAkG;AAClG,wBAAgB,kBAAkB,IAAI,IAAI,CAIzC"}
|
package/dist/setup.js
CHANGED
|
@@ -44,15 +44,14 @@ function same(a, b) {
|
|
|
44
44
|
return false;
|
|
45
45
|
const ak = Object.keys(a.defaults);
|
|
46
46
|
const bk = Object.keys(b.defaults);
|
|
47
|
-
return ak.length === bk.length && ak.every((k) => Object.hasOwn(b.defaults, k) && a.defaults[k] === b.defaults[k]);
|
|
47
|
+
return ak.length === bk.length && ak.every((k) => Object.hasOwn(b.defaults, k) && JSON.stringify(a.defaults[k]) === JSON.stringify(b.defaults[k]));
|
|
48
48
|
}
|
|
49
49
|
/** Record the process setup, once. Call it before the first open; see this module's header for the rule. */
|
|
50
50
|
export function setup(options = {}) {
|
|
51
51
|
const timezone = options.timezone ?? '';
|
|
52
52
|
if (typeof timezone !== 'string')
|
|
53
53
|
throw new TypeError(`chtypes: setup timezone must be a string, got ${typeof timezone}`);
|
|
54
|
-
const defaults = options.defaults ?? {};
|
|
55
|
-
validateDefaults(defaults);
|
|
54
|
+
const defaults = validateDefaults(options.defaults ?? {});
|
|
56
55
|
const next = { timezone, defaults: { ...defaults } };
|
|
57
56
|
if (recorded !== undefined && same(recorded, next))
|
|
58
57
|
return;
|
package/dist/setup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAiB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OA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Q,CAAC;AAClB,CAAC;AAED,kEAAkE;AAClE,MAAM,UAAU,eAAe;IAC7B,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,wMAAwM;AACxM,MAAM,UAAU,UAAU;IACxB,OAAO,GAAG,IAAI,CAAC;IACf,WAAW,GAAG,KAAK,CAAC;AACtB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAa;IAC5C,IAAI,OAAO,IAAI,QAAQ,KAAK,SAAS,IAAI,UAAU,KAAK,KAAK;QAAE,OAAO;IACtE,WAAW,GAAG,IAAI,CAAC;AACrB,CAAC;AAED,kGAAkG;AAClG,MAAM,UAAU,kBAAkB;IAChC,QAAQ,GAAG,SAAS,CAAC;IACrB,OAAO,GAAG,KAAK,CAAC;IAChB,WAAW,GAAG,KAAK,CAAC;AACtB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wavehouse/chtypes",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.12",
|
|
4
4
|
"description": "ClickHouse's own type system, per version, over the frozen chs_* C ABI",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/node": "^26.5.0",
|
|
32
32
|
"typescript": "^7.0.2",
|
|
33
|
-
"vite": "^8.
|
|
34
|
-
"vitest": "^5.0.
|
|
33
|
+
"vite": "^8.3.4",
|
|
34
|
+
"vitest": "^5.0.5"
|
|
35
35
|
},
|
|
36
36
|
"repository": {
|
|
37
37
|
"type": "git",
|