@prisma-next/sql-relational-core 0.5.0-dev.60 → 0.5.0-dev.61
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 +45 -47
- package/dist/{errors-p3Ou_n9J.d.mts → errors-Chs-ph28.d.mts} +2 -2
- package/dist/errors-Chs-ph28.d.mts.map +1 -0
- package/dist/{errors-D6kqqjHM.mjs → errors-kgKOaDM1.mjs} +1 -1
- package/dist/{errors-D6kqqjHM.mjs.map → errors-kgKOaDM1.mjs.map} +1 -1
- package/dist/exports/ast.d.mts +141 -87
- package/dist/exports/ast.d.mts.map +1 -1
- package/dist/exports/ast.mjs +242 -272
- package/dist/exports/ast.mjs.map +1 -1
- package/dist/exports/codec-descriptor-registry.d.mts +18 -0
- package/dist/exports/codec-descriptor-registry.d.mts.map +1 -0
- package/dist/exports/codec-descriptor-registry.mjs +40 -0
- package/dist/exports/codec-descriptor-registry.mjs.map +1 -0
- package/dist/exports/errors.d.mts +4 -4
- package/dist/exports/errors.mjs +1 -1
- package/dist/exports/expression.d.mts +29 -24
- package/dist/exports/expression.d.mts.map +1 -1
- package/dist/exports/expression.mjs +33 -11
- package/dist/exports/expression.mjs.map +1 -1
- package/dist/exports/plan.d.mts +2 -2
- package/dist/exports/query-lane-context.d.mts +2 -3
- package/dist/exports/types.d.mts +5 -4
- package/dist/index.d.mts +10 -11
- package/dist/index.mjs +5 -5
- package/dist/{plan-C7SiEWkN.d.mts → plan-nwFE15re.d.mts} +2 -2
- package/dist/plan-nwFE15re.d.mts.map +1 -0
- package/dist/query-lane-context-DlWgKvvt.d.mts +175 -0
- package/dist/query-lane-context-DlWgKvvt.d.mts.map +1 -0
- package/dist/{sql-execution-plan-Dgx7BGin.d.mts → sql-execution-plan-DTfj23Tj.d.mts} +2 -2
- package/dist/{sql-execution-plan-Dgx7BGin.d.mts.map → sql-execution-plan-DTfj23Tj.d.mts.map} +1 -1
- package/dist/{types-DUL-3vy6.mjs → types-CO7zrXfK.mjs} +15 -7
- package/dist/types-CO7zrXfK.mjs.map +1 -0
- package/dist/{types-DviRR7AL.d.mts → types-G3hdNPZZ.d.mts} +4 -4
- package/dist/{types-DviRR7AL.d.mts.map → types-G3hdNPZZ.d.mts.map} +1 -1
- package/dist/{types-B4dL4lc3.d.mts → types-U74HFwNI.d.mts} +22 -4
- package/dist/types-U74HFwNI.d.mts.map +1 -0
- package/dist/{types-BUlUvdIU.d.mts → types-dPxXIUPS.d.mts} +3 -3
- package/dist/{types-BUlUvdIU.d.mts.map → types-dPxXIUPS.d.mts.map} +1 -1
- package/package.json +10 -8
- package/src/ast/adapter-types.ts +3 -19
- package/src/ast/codec-types.ts +53 -541
- package/src/ast/sql-codec-helpers.ts +79 -0
- package/src/ast/sql-codecs.ts +280 -137
- package/src/ast/types.ts +33 -8
- package/src/ast/validate-param-refs.ts +39 -0
- package/src/codec-descriptor-registry.ts +52 -0
- package/src/exports/ast.ts +2 -0
- package/src/exports/codec-descriptor-registry.ts +1 -0
- package/src/expression.ts +40 -23
- package/src/query-lane-context.ts +14 -96
- package/dist/codec-types-DJEaWT36.d.mts +0 -313
- package/dist/codec-types-DJEaWT36.d.mts.map +0 -1
- package/dist/errors-p3Ou_n9J.d.mts.map +0 -1
- package/dist/plan-C7SiEWkN.d.mts.map +0 -1
- package/dist/query-lane-context-Bwca4sc8.d.mts +0 -150
- package/dist/query-lane-context-Bwca4sc8.d.mts.map +0 -1
- package/dist/types-B4dL4lc3.d.mts.map +0 -1
- package/dist/types-DUL-3vy6.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as SqlExecutionPlan } from "./sql-execution-plan-
|
|
2
|
-
import { t as SqlQueryPlan } from "./plan-
|
|
1
|
+
import { t as SqlExecutionPlan } from "./sql-execution-plan-DTfj23Tj.mjs";
|
|
2
|
+
import { t as SqlQueryPlan } from "./plan-nwFE15re.mjs";
|
|
3
3
|
import { RuntimeExecutor } from "@prisma-next/framework-components/runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/runtime-scope.d.ts
|
|
@@ -21,4 +21,4 @@ type SqlOrmPlan = SqlExecutionPlan | SqlQueryPlan;
|
|
|
21
21
|
type RuntimeScope = Pick<RuntimeExecutor<SqlOrmPlan>, 'execute'>;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { SqlOrmPlan as n, RuntimeScope as t };
|
|
24
|
-
//# sourceMappingURL=types-
|
|
24
|
+
//# sourceMappingURL=types-dPxXIUPS.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-
|
|
1
|
+
{"version":3,"file":"types-dPxXIUPS.d.mts","names":[],"sources":["../src/runtime-scope.ts"],"sourcesContent":[],"mappings":";;;;;;;;AASA;AAUA;;AAAgC,KAVpB,UAAA,GAAa,gBAUO,GAVY,YAUZ;;;;;;;;;KAApB,YAAA,GAAe,KAAK,gBAAgB"}
|
package/package.json
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma-next/sql-relational-core",
|
|
3
|
-
"version": "0.5.0-dev.
|
|
3
|
+
"version": "0.5.0-dev.61",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"description": "AST types, query lane context, and type utilities for Prisma Next SQL lanes",
|
|
8
8
|
"dependencies": {
|
|
9
|
+
"@standard-schema/spec": "^1.1.0",
|
|
9
10
|
"arktype": "^2.1.29",
|
|
10
11
|
"ts-toolbelt": "^9.6.0",
|
|
11
|
-
"@prisma-next/
|
|
12
|
-
"@prisma-next/
|
|
13
|
-
"@prisma-next/sql-
|
|
14
|
-
"@prisma-next/
|
|
15
|
-
"@prisma-next/
|
|
16
|
-
"@prisma-next/
|
|
12
|
+
"@prisma-next/contract": "0.5.0-dev.61",
|
|
13
|
+
"@prisma-next/framework-components": "0.5.0-dev.61",
|
|
14
|
+
"@prisma-next/sql-contract": "0.5.0-dev.61",
|
|
15
|
+
"@prisma-next/operations": "0.5.0-dev.61",
|
|
16
|
+
"@prisma-next/sql-operations": "0.5.0-dev.61",
|
|
17
|
+
"@prisma-next/utils": "0.5.0-dev.61"
|
|
17
18
|
},
|
|
18
19
|
"devDependencies": {
|
|
19
20
|
"tsdown": "0.18.4",
|
|
20
21
|
"typescript": "5.9.3",
|
|
21
22
|
"vitest": "4.0.17",
|
|
22
|
-
"@prisma-next/sql-contract-ts": "0.5.0-dev.
|
|
23
|
+
"@prisma-next/sql-contract-ts": "0.5.0-dev.61",
|
|
23
24
|
"@prisma-next/test-utils": "0.0.1",
|
|
24
25
|
"@prisma-next/tsdown": "0.0.0",
|
|
25
26
|
"@prisma-next/tsconfig": "0.0.0"
|
|
@@ -31,6 +32,7 @@
|
|
|
31
32
|
"exports": {
|
|
32
33
|
".": "./dist/index.mjs",
|
|
33
34
|
"./ast": "./dist/exports/ast.mjs",
|
|
35
|
+
"./codec-descriptor-registry": "./dist/exports/codec-descriptor-registry.mjs",
|
|
34
36
|
"./errors": "./dist/exports/errors.mjs",
|
|
35
37
|
"./expression": "./dist/exports/expression.mjs",
|
|
36
38
|
"./plan": "./dist/exports/plan.mjs",
|
package/src/ast/adapter-types.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { ContractMarkerRecord } from '@prisma-next/contract/types';
|
|
2
|
-
import type { CodecRegistry } from './codec-types';
|
|
3
2
|
import type { LoweredStatement } from './types';
|
|
4
3
|
|
|
5
4
|
export type AdapterTarget = string;
|
|
@@ -14,22 +13,11 @@ export interface AdapterProfile<TTarget extends AdapterTarget = AdapterTarget> {
|
|
|
14
13
|
readonly target: TTarget;
|
|
15
14
|
readonly capabilities: Record<string, unknown>;
|
|
16
15
|
/**
|
|
17
|
-
* Returns the adapter
|
|
18
|
-
* The registry contains codecs provided by the adapter for converting
|
|
19
|
-
* between wire types and JavaScript types.
|
|
20
|
-
*/
|
|
21
|
-
codecs(): CodecRegistry;
|
|
22
|
-
/**
|
|
23
|
-
* Returns the SQL statement to read the contract marker from the database.
|
|
24
|
-
* Each adapter provides target-specific SQL (e.g. schema-qualified table names,
|
|
25
|
-
* parameter placeholder style).
|
|
16
|
+
* Returns the SQL statement to read the contract marker from the database. Each adapter provides target-specific SQL (e.g. schema-qualified table names, parameter placeholder style).
|
|
26
17
|
*/
|
|
27
18
|
readMarkerStatement(): MarkerStatement;
|
|
28
19
|
/**
|
|
29
|
-
* Parses a row returned by the adapter's `readMarkerStatement()` into a
|
|
30
|
-
* `ContractMarkerRecord`. Each adapter is responsible for any
|
|
31
|
-
* target-specific decoding before delegating to the shared row schema.
|
|
32
|
-
* Throws on shape violation.
|
|
20
|
+
* Parses a row returned by the adapter's `readMarkerStatement()` into a `ContractMarkerRecord`. Each adapter is responsible for any target-specific decoding before delegating to the shared row schema. Throws on shape violation.
|
|
33
21
|
*/
|
|
34
22
|
parseMarkerRow(row: unknown): ContractMarkerRecord;
|
|
35
23
|
}
|
|
@@ -45,11 +33,7 @@ export type Lowerer<Ast = unknown, TContract = unknown, TBody = LoweredStatement
|
|
|
45
33
|
) => TBody;
|
|
46
34
|
|
|
47
35
|
/**
|
|
48
|
-
* Lowers a query AST into a target-specific executable body (typically
|
|
49
|
-
* `LoweredStatement` for SQL adapters). The `lower` method returns the body
|
|
50
|
-
* directly; per-statement metadata, when needed, lives on the body itself
|
|
51
|
-
* (e.g. `LoweredStatement.annotations`). Adapter-level metadata such as the
|
|
52
|
-
* profile id is reachable via `profile.id` for callers that genuinely need it.
|
|
36
|
+
* Lowers a query AST into a target-specific executable body (typically `LoweredStatement` for SQL adapters). The `lower` method returns the body directly; per-statement metadata, when needed, lives on the body itself (e.g. `LoweredStatement.annotations`). Adapter-level metadata such as the profile id is reachable via `profile.id` for callers that genuinely need it.
|
|
53
37
|
*/
|
|
54
38
|
export interface Adapter<Ast = unknown, TContract = unknown, TBody = LoweredStatement> {
|
|
55
39
|
readonly profile: AdapterProfile;
|