@sqlbraid/core 1.0.0-rc.1 → 1.0.2
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/LICENSE +1 -1
- package/README.md +3 -6
- package/dist/driver.d.ts +55 -0
- package/dist/driver.d.ts.map +1 -0
- package/dist/driver.js +156 -0
- package/dist/driver.js.map +1 -0
- package/dist/index.d.ts +674 -311
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +503 -184
- package/dist/index.js.map +1 -1
- package/package.json +22 -18
package/LICENSE
CHANGED
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
|
187
187
|
identification within third-party archives.
|
|
188
188
|
|
|
189
|
-
Copyright
|
|
189
|
+
Copyright 2026 Clickin
|
|
190
190
|
|
|
191
191
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
192
|
you may not use this file except in compliance with the License.
|
package/README.md
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
# @sqlbraid/core
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
execution boundaries, result mapping, and adapter capabilities.
|
|
3
|
+
Low-level TypeScript interfaces for SQLBraid. This package defines the types for templates, rendered statements and adapter capabilities.
|
|
5
4
|
|
|
6
5
|
```sh
|
|
7
6
|
npm install @sqlbraid/core
|
|
8
7
|
```
|
|
9
8
|
|
|
10
|
-
Use
|
|
11
|
-
contracts only and does not connect to a database or execute queries; use
|
|
12
|
-
`@sqlbraid/runtime` for application execution.
|
|
9
|
+
This package gives common types, errors and utilities for statements and parameters. It does not connect to databases and does not execute queries. Use it to write a new driver adapter or a deep integration.
|
|
13
10
|
|
|
14
|
-
See the [SQLBraid documentation](https://clickin.github.io/SQLBraid/).
|
|
11
|
+
See the [SQLBraid documentation](https://clickin.github.io/SQLBraid/) for details.
|
package/dist/driver.d.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
//#region src/driver.d.ts
|
|
2
|
+
/** Cleanup callback owned by a driver resource; synchronous actions stay synchronous. */
|
|
3
|
+
export type CleanupAction = () => void | PromiseLike<void>;
|
|
4
|
+
/**
|
|
5
|
+
* LIFO cleanup scope for driver-owned resources.
|
|
6
|
+
* Cleanup continues after individual failures so every owned handle is attempted; the primary operation error remains first.
|
|
7
|
+
*
|
|
8
|
+
* @throws {Error} With code `BRAID_RESOURCE_CLEANUP` when cleanup fails.
|
|
9
|
+
*/
|
|
10
|
+
export interface CleanupScope {
|
|
11
|
+
add(action: CleanupAction): void;
|
|
12
|
+
disarm(): void;
|
|
13
|
+
/**
|
|
14
|
+
* Runs cleanup once. Calls made again while asynchronous cleanup is pending
|
|
15
|
+
* return the same Promise; cleanup actions must not await this scope's run.
|
|
16
|
+
*/
|
|
17
|
+
run(primary?: unknown): void | Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
/** Create a one-shot LIFO cleanup scope with explicit ownership transfer via `disarm()`. */
|
|
20
|
+
export declare function createCleanupScope(): CleanupScope;
|
|
21
|
+
/** Define an enumerable own result property without invoking driver-specific row prototypes. */
|
|
22
|
+
export declare function defineResultProperty(row: Record<string, unknown>, key: string, value: unknown): void;
|
|
23
|
+
/** One column's prepared read operation for a result-row projector. */
|
|
24
|
+
export interface ResultProjectorColumn<Row> {
|
|
25
|
+
readonly name: string;
|
|
26
|
+
readonly read: (row: Row) => unknown;
|
|
27
|
+
}
|
|
28
|
+
/** One prepared output column backed by a positional driver row. */
|
|
29
|
+
export interface PositionalResultProjectorColumn {
|
|
30
|
+
readonly name: string;
|
|
31
|
+
readonly index: number;
|
|
32
|
+
readonly decode: (value: unknown) => unknown;
|
|
33
|
+
}
|
|
34
|
+
/** Identity decoder shared by columns that need no representation conversion. @internal */
|
|
35
|
+
export declare function identityResultValue(value: unknown): unknown;
|
|
36
|
+
/**
|
|
37
|
+
* Prepare a result-set projector with a stable plain-object shape.
|
|
38
|
+
*
|
|
39
|
+
* The shape template is copied with object spread so aliases such as `__proto__`
|
|
40
|
+
* remain own data properties. Each row then overwrites those existing slots,
|
|
41
|
+
* avoiding per-row property definition and preserving ordinary object semantics.
|
|
42
|
+
* One-row results at any width, plus results with at least thirty-two columns
|
|
43
|
+
* and at most ten rows, use fixed-order safe insertion when template setup
|
|
44
|
+
* costs more than it saves.
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
export declare function prepareResultProjector<Row>(columns: readonly ResultProjectorColumn<Row>[], rowCountHint?: number): (row: Row) => Record<string, unknown>;
|
|
48
|
+
/** Prepare a result-set projector for array rows without a per-column row-reader closure. @internal */
|
|
49
|
+
export declare function preparePositionalResultProjector<Row extends {
|
|
50
|
+
readonly [index: number]: unknown;
|
|
51
|
+
} = readonly unknown[]>(columns: readonly PositionalResultProjectorColumn[], rowCountHint?: number): (row: Row) => Record<string, unknown>;
|
|
52
|
+
/** Validate a generated savepoint name before embedding it in transaction-control SQL. */
|
|
53
|
+
export declare function assertSavepointName(name: string): string;
|
|
54
|
+
//#endregion
|
|
55
|
+
//# sourceMappingURL=driver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"driver.d.ts","names":[],"sources":["../src/driver.ts"],"mappings":";;YACY,6BAA6B;;;;;;;iBAQxB;EACf,IAAI,QAAQ;EACZ;;;;;EAKA,IAAI,2BAA2B;;;wBAgEjB,sBAAsB;;wBA+CtB,qBAAqB,KAAK,yBAAyB,aAAa;;iBAU/D,sBAAsB;WAC5B;WACA,OAAO,KAAK;;;iBAIN;WACN;WACA;WACA,SAAS;;;wBAIJ,oBAAoB;;;;;;;;;;;;wBAepB,uBAAuB,KACrC,kBAAkB,sBAAsB,QACxC,yBACE,KAAK,QAAQ;;wBA6BD,iCACd;YAAwB;wBACxB,kBAAkB,mCAAmC,yBAAyB,KAAK,QAAQ;;wBA6B7E,oBAAoB"}
|
package/dist/driver.js
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
//#region src/driver.ts
|
|
2
|
+
const NO_PRIMARY = Symbol("sqlbraid.no-primary");
|
|
3
|
+
const RESOURCE_CLEANUP_CODE = "BRAID_RESOURCE_CLEANUP";
|
|
4
|
+
const SAVEPOINT_NAME = /^[A-Za-z_][A-Za-z0-9_]*$/u;
|
|
5
|
+
function resourceCleanupError(primary, failures) {
|
|
6
|
+
const hasPrimary = primary !== NO_PRIMARY;
|
|
7
|
+
const values = hasPrimary ? [primary, ...failures] : failures;
|
|
8
|
+
const error = values.length === 1 && !hasPrimary ? new Error("BRAID_RESOURCE_CLEANUP: resource cleanup failed.", { cause: failures[0] }) : new AggregateError(values, "BRAID_RESOURCE_CLEANUP: resource cleanup failed.", { cause: hasPrimary ? primary : failures[0] });
|
|
9
|
+
Object.defineProperty(error, "code", {
|
|
10
|
+
configurable: false,
|
|
11
|
+
enumerable: true,
|
|
12
|
+
value: RESOURCE_CLEANUP_CODE,
|
|
13
|
+
writable: false
|
|
14
|
+
});
|
|
15
|
+
return error;
|
|
16
|
+
}
|
|
17
|
+
function finish(primary, failures) {
|
|
18
|
+
if (failures.length === 0) {
|
|
19
|
+
if (primary !== NO_PRIMARY) throw primary;
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
throw resourceCleanupError(primary, failures);
|
|
23
|
+
}
|
|
24
|
+
function isThenable(value) {
|
|
25
|
+
return typeof value === "object" && value !== null || typeof value === "function" ? typeof value.then === "function" : false;
|
|
26
|
+
}
|
|
27
|
+
async function finishAsync(current, pending, nextIndex, primary, failures) {
|
|
28
|
+
try {
|
|
29
|
+
await current;
|
|
30
|
+
} catch (error) {
|
|
31
|
+
failures.push(error);
|
|
32
|
+
}
|
|
33
|
+
for (let index = nextIndex; index < pending.length; index += 1) try {
|
|
34
|
+
await pending[index]();
|
|
35
|
+
} catch (error) {
|
|
36
|
+
failures.push(error);
|
|
37
|
+
}
|
|
38
|
+
finish(primary, failures);
|
|
39
|
+
}
|
|
40
|
+
/** Create a one-shot LIFO cleanup scope with explicit ownership transfer via `disarm()`. */
|
|
41
|
+
function createCleanupScope() {
|
|
42
|
+
let actions = [];
|
|
43
|
+
let state = "open";
|
|
44
|
+
let inFlight;
|
|
45
|
+
return {
|
|
46
|
+
add(action) {
|
|
47
|
+
if (state !== "open") throw new Error("Cannot register cleanup after scope closure.");
|
|
48
|
+
if (typeof action !== "function") throw new TypeError("Cleanup action must be a function.");
|
|
49
|
+
actions.push(action);
|
|
50
|
+
},
|
|
51
|
+
disarm() {
|
|
52
|
+
if (state !== "open") return;
|
|
53
|
+
state = "disarmed";
|
|
54
|
+
actions = [];
|
|
55
|
+
},
|
|
56
|
+
run(primary) {
|
|
57
|
+
if (inFlight !== void 0) return inFlight;
|
|
58
|
+
if (state !== "open") return;
|
|
59
|
+
state = "running";
|
|
60
|
+
const pending = actions.reverse();
|
|
61
|
+
actions = [];
|
|
62
|
+
const failures = [];
|
|
63
|
+
const primaryValue = arguments.length === 0 ? NO_PRIMARY : primary;
|
|
64
|
+
for (let index = 0; index < pending.length; index += 1) try {
|
|
65
|
+
const result = pending[index]();
|
|
66
|
+
if (isThenable(result)) {
|
|
67
|
+
state = "closed";
|
|
68
|
+
inFlight = finishAsync(result, pending, index + 1, primaryValue, failures);
|
|
69
|
+
return inFlight;
|
|
70
|
+
}
|
|
71
|
+
} catch (error) {
|
|
72
|
+
failures.push(error);
|
|
73
|
+
}
|
|
74
|
+
state = "closed";
|
|
75
|
+
finish(primaryValue, failures);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
/** Define an enumerable own result property without invoking driver-specific row prototypes. */
|
|
80
|
+
function defineResultProperty(row, key, value) {
|
|
81
|
+
Object.defineProperty(row, key, {
|
|
82
|
+
configurable: true,
|
|
83
|
+
enumerable: true,
|
|
84
|
+
value,
|
|
85
|
+
writable: true
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
/** Identity decoder shared by columns that need no representation conversion. @internal */
|
|
89
|
+
function identityResultValue(value) {
|
|
90
|
+
return value;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Prepare a result-set projector with a stable plain-object shape.
|
|
94
|
+
*
|
|
95
|
+
* The shape template is copied with object spread so aliases such as `__proto__`
|
|
96
|
+
* remain own data properties. Each row then overwrites those existing slots,
|
|
97
|
+
* avoiding per-row property definition and preserving ordinary object semantics.
|
|
98
|
+
* One-row results at any width, plus results with at least thirty-two columns
|
|
99
|
+
* and at most ten rows, use fixed-order safe insertion when template setup
|
|
100
|
+
* costs more than it saves.
|
|
101
|
+
* @internal
|
|
102
|
+
*/
|
|
103
|
+
function prepareResultProjector(columns, rowCountHint) {
|
|
104
|
+
const useTemplate = rowCountHint === void 0 || !(rowCountHint <= 1 || columns.length >= 32 && rowCountHint <= 10);
|
|
105
|
+
let template;
|
|
106
|
+
if (useTemplate) {
|
|
107
|
+
template = {};
|
|
108
|
+
for (const column of columns) if (!Object.hasOwn(template, column.name)) defineResultProperty(template, column.name, void 0);
|
|
109
|
+
}
|
|
110
|
+
if (template === void 0) return (rawRow) => {
|
|
111
|
+
const row = {};
|
|
112
|
+
for (const column of columns) {
|
|
113
|
+
const value = column.read(rawRow);
|
|
114
|
+
if (column.name === "__proto__") defineResultProperty(row, column.name, value);
|
|
115
|
+
else row[column.name] = value;
|
|
116
|
+
}
|
|
117
|
+
return row;
|
|
118
|
+
};
|
|
119
|
+
return (rawRow) => {
|
|
120
|
+
const row = { ...template };
|
|
121
|
+
for (const column of columns) row[column.name] = column.read(rawRow);
|
|
122
|
+
return row;
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
/** Prepare a result-set projector for array rows without a per-column row-reader closure. @internal */
|
|
126
|
+
function preparePositionalResultProjector(columns, rowCountHint) {
|
|
127
|
+
const useTemplate = rowCountHint === void 0 || !(rowCountHint <= 1 || columns.length >= 32 && rowCountHint <= 10);
|
|
128
|
+
let template;
|
|
129
|
+
if (useTemplate) {
|
|
130
|
+
template = {};
|
|
131
|
+
for (const column of columns) if (!Object.hasOwn(template, column.name)) defineResultProperty(template, column.name, void 0);
|
|
132
|
+
}
|
|
133
|
+
if (template === void 0) return (rawRow) => {
|
|
134
|
+
const row = {};
|
|
135
|
+
for (const column of columns) {
|
|
136
|
+
const value = column.decode(rawRow[column.index]);
|
|
137
|
+
if (column.name === "__proto__") defineResultProperty(row, column.name, value);
|
|
138
|
+
else row[column.name] = value;
|
|
139
|
+
}
|
|
140
|
+
return row;
|
|
141
|
+
};
|
|
142
|
+
return (rawRow) => {
|
|
143
|
+
const row = { ...template };
|
|
144
|
+
for (const column of columns) row[column.name] = column.decode(rawRow[column.index]);
|
|
145
|
+
return row;
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
/** Validate a generated savepoint name before embedding it in transaction-control SQL. */
|
|
149
|
+
function assertSavepointName(name) {
|
|
150
|
+
if (typeof name !== "string" || !SAVEPOINT_NAME.test(name)) throw new TypeError("Invalid SQLBraid savepoint name.");
|
|
151
|
+
return name;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
//#endregion
|
|
155
|
+
export { assertSavepointName, createCleanupScope, defineResultProperty, identityResultValue, preparePositionalResultProjector, prepareResultProjector };
|
|
156
|
+
//# sourceMappingURL=driver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"driver.js","names":[],"sources":["../src/driver.ts"],"sourcesContent":["/** Cleanup callback owned by a driver resource; synchronous actions stay synchronous. */\nexport type CleanupAction = () => void | PromiseLike<void>;\n\n/**\n * LIFO cleanup scope for driver-owned resources.\n * Cleanup continues after individual failures so every owned handle is attempted; the primary operation error remains first.\n *\n * @throws {Error} With code `BRAID_RESOURCE_CLEANUP` when cleanup fails.\n */\nexport interface CleanupScope {\n add(action: CleanupAction): void;\n disarm(): void;\n /**\n * Runs cleanup once. Calls made again while asynchronous cleanup is pending\n * return the same Promise; cleanup actions must not await this scope's run.\n */\n run(primary?: unknown): void | Promise<void>;\n}\n\nconst NO_PRIMARY = Symbol(\"sqlbraid.no-primary\");\nconst RESOURCE_CLEANUP_CODE = \"BRAID_RESOURCE_CLEANUP\" as const;\nconst SAVEPOINT_NAME = /^[A-Za-z_][A-Za-z0-9_]*$/u;\n\nfunction resourceCleanupError(primary: unknown | typeof NO_PRIMARY, failures: readonly unknown[]): Error {\n const hasPrimary = primary !== NO_PRIMARY;\n const values = hasPrimary ? [primary, ...failures] : failures;\n const error =\n values.length === 1 && !hasPrimary\n ? new Error(\"BRAID_RESOURCE_CLEANUP: resource cleanup failed.\", { cause: failures[0] })\n : new AggregateError(values, \"BRAID_RESOURCE_CLEANUP: resource cleanup failed.\", {\n cause: hasPrimary ? primary : failures[0],\n });\n Object.defineProperty(error, \"code\", {\n configurable: false,\n enumerable: true,\n value: RESOURCE_CLEANUP_CODE,\n writable: false,\n });\n return error;\n}\n\nfunction finish(primary: unknown | typeof NO_PRIMARY, failures: readonly unknown[]): void {\n if (failures.length === 0) {\n if (primary !== NO_PRIMARY) throw primary;\n return;\n }\n throw resourceCleanupError(primary, failures);\n}\n\nfunction isThenable(value: unknown): value is PromiseLike<void> {\n return (typeof value === \"object\" && value !== null) || typeof value === \"function\"\n ? typeof (value as { readonly then?: unknown }).then === \"function\"\n : false;\n}\n\nasync function finishAsync(\n current: PromiseLike<void>,\n pending: readonly CleanupAction[],\n nextIndex: number,\n primary: unknown | typeof NO_PRIMARY,\n failures: unknown[],\n): Promise<void> {\n try {\n // Continue cleanup after an async action fails; releasing later resources is required even when the primary cleanup fails.\n await current;\n } catch (error) {\n failures.push(error);\n }\n for (let index = nextIndex; index < pending.length; index += 1) {\n try {\n // oxlint-disable-next-line no-await-in-loop -- Cleanup must complete sequentially in LIFO order.\n await pending[index]!();\n } catch (error) {\n failures.push(error);\n }\n }\n finish(primary, failures);\n}\n\n/** Create a one-shot LIFO cleanup scope with explicit ownership transfer via `disarm()`. */\nexport function createCleanupScope(): CleanupScope {\n let actions: CleanupAction[] = [];\n let state: \"open\" | \"running\" | \"closed\" | \"disarmed\" = \"open\";\n let inFlight: Promise<void> | undefined;\n\n return {\n add(action: CleanupAction): void {\n if (state !== \"open\") throw new Error(\"Cannot register cleanup after scope closure.\");\n if (typeof action !== \"function\") throw new TypeError(\"Cleanup action must be a function.\");\n actions.push(action);\n },\n\n disarm(): void {\n if (state !== \"open\") return;\n state = \"disarmed\";\n actions = [];\n },\n\n run(primary?: unknown): void | Promise<void> {\n if (inFlight !== undefined) return inFlight;\n if (state !== \"open\") return;\n state = \"running\";\n // oxlint-disable-next-line unicorn/no-array-reverse -- Consume this owned action array in LIFO order without copying.\n const pending = actions.reverse();\n actions = [];\n const failures: unknown[] = [];\n const primaryValue = arguments.length === 0 ? NO_PRIMARY : primary;\n\n for (let index = 0; index < pending.length; index += 1) {\n try {\n const result = pending[index]!();\n if (isThenable(result)) {\n state = \"closed\";\n inFlight = finishAsync(result, pending, index + 1, primaryValue, failures);\n return inFlight;\n }\n } catch (error) {\n failures.push(error);\n }\n }\n state = \"closed\";\n finish(primaryValue, failures);\n },\n };\n}\n\n/** Define an enumerable own result property without invoking driver-specific row prototypes. */\nexport function defineResultProperty(row: Record<string, unknown>, key: string, value: unknown): void {\n Object.defineProperty(row, key, {\n configurable: true,\n enumerable: true,\n value,\n writable: true,\n });\n}\n\n/** One column's prepared read operation for a result-row projector. */\nexport interface ResultProjectorColumn<Row> {\n readonly name: string;\n readonly read: (row: Row) => unknown;\n}\n\n/** One prepared output column backed by a positional driver row. */\nexport interface PositionalResultProjectorColumn {\n readonly name: string;\n readonly index: number;\n readonly decode: (value: unknown) => unknown;\n}\n\n/** Identity decoder shared by columns that need no representation conversion. @internal */\nexport function identityResultValue(value: unknown): unknown {\n return value;\n}\n\n/**\n * Prepare a result-set projector with a stable plain-object shape.\n *\n * The shape template is copied with object spread so aliases such as `__proto__`\n * remain own data properties. Each row then overwrites those existing slots,\n * avoiding per-row property definition and preserving ordinary object semantics.\n * One-row results at any width, plus results with at least thirty-two columns\n * and at most ten rows, use fixed-order safe insertion when template setup\n * costs more than it saves.\n * @internal\n */\nexport function prepareResultProjector<Row>(\n columns: readonly ResultProjectorColumn<Row>[],\n rowCountHint?: number,\n): (row: Row) => Record<string, unknown> {\n const useTemplate =\n rowCountHint === undefined || !(rowCountHint <= 1 || (columns.length >= 32 && rowCountHint <= 10));\n let template: Record<string, unknown> | undefined;\n if (useTemplate) {\n template = {};\n for (const column of columns) {\n if (!Object.hasOwn(template, column.name)) defineResultProperty(template, column.name, undefined);\n }\n }\n if (template === undefined) {\n return (rawRow): Record<string, unknown> => {\n const row: Record<string, unknown> = {};\n for (const column of columns) {\n const value = column.read(rawRow);\n if (column.name === \"__proto__\") defineResultProperty(row, column.name, value);\n else row[column.name] = value;\n }\n return row;\n };\n }\n return (rawRow): Record<string, unknown> => {\n const row: Record<string, unknown> = { ...template };\n for (const column of columns) row[column.name] = column.read(rawRow);\n return row;\n };\n}\n\n/** Prepare a result-set projector for array rows without a per-column row-reader closure. @internal */\nexport function preparePositionalResultProjector<\n Row extends { readonly [index: number]: unknown } = readonly unknown[],\n>(columns: readonly PositionalResultProjectorColumn[], rowCountHint?: number): (row: Row) => Record<string, unknown> {\n const useTemplate =\n rowCountHint === undefined || !(rowCountHint <= 1 || (columns.length >= 32 && rowCountHint <= 10));\n let template: Record<string, unknown> | undefined;\n if (useTemplate) {\n template = {};\n for (const column of columns) {\n if (!Object.hasOwn(template, column.name)) defineResultProperty(template, column.name, undefined);\n }\n }\n if (template === undefined) {\n return (rawRow: Row): Record<string, unknown> => {\n const row: Record<string, unknown> = {};\n for (const column of columns) {\n const value = column.decode(rawRow[column.index]);\n if (column.name === \"__proto__\") defineResultProperty(row, column.name, value);\n else row[column.name] = value;\n }\n return row;\n };\n }\n return (rawRow: Row): Record<string, unknown> => {\n const row: Record<string, unknown> = { ...template };\n for (const column of columns) row[column.name] = column.decode(rawRow[column.index]);\n return row;\n };\n}\n\n/** Validate a generated savepoint name before embedding it in transaction-control SQL. */\nexport function assertSavepointName(name: string): string {\n if (typeof name !== \"string\" || !SAVEPOINT_NAME.test(name)) {\n throw new TypeError(\"Invalid SQLBraid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