@prisma-next/sql-orm-client 0.5.0-dev.8 → 0.5.0-dev.9
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 +11 -1
- package/dist/index.d.mts +3 -7
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +18 -19
- package/src/collection-dispatch.ts +2 -2
- package/src/collection-mutation-dispatch.ts +1 -1
- package/src/collection-runtime.ts +3 -2
- package/src/collection.ts +1 -1
- package/src/execute-query-plan.ts +4 -5
- package/src/mutation-executor.ts +1 -1
- package/src/types.ts +2 -10
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma-next/sql-orm-client",
|
|
3
|
-
"version": "0.5.0-dev.
|
|
3
|
+
"version": "0.5.0-dev.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"description": "ORM client for Prisma Next — fluent, type-safe model collections",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@prisma-next/
|
|
9
|
-
"@prisma-next/
|
|
10
|
-
"@prisma-next/
|
|
11
|
-
"@prisma-next/
|
|
12
|
-
"@prisma-next/
|
|
13
|
-
"@prisma-next/sql-
|
|
14
|
-
"@prisma-next/
|
|
15
|
-
"@prisma-next/
|
|
8
|
+
"@prisma-next/contract": "0.5.0-dev.9",
|
|
9
|
+
"@prisma-next/operations": "0.5.0-dev.9",
|
|
10
|
+
"@prisma-next/sql-operations": "0.5.0-dev.9",
|
|
11
|
+
"@prisma-next/sql-contract": "0.5.0-dev.9",
|
|
12
|
+
"@prisma-next/framework-components": "0.5.0-dev.9",
|
|
13
|
+
"@prisma-next/sql-relational-core": "0.5.0-dev.9",
|
|
14
|
+
"@prisma-next/sql-runtime": "0.5.0-dev.9",
|
|
15
|
+
"@prisma-next/utils": "0.5.0-dev.9"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/pg": "8.16.0",
|
|
@@ -20,17 +20,16 @@
|
|
|
20
20
|
"tsdown": "0.18.4",
|
|
21
21
|
"typescript": "5.9.3",
|
|
22
22
|
"vitest": "4.0.17",
|
|
23
|
-
"@prisma-next/adapter-postgres": "0.5.0-dev.
|
|
24
|
-
"@prisma-next/
|
|
25
|
-
"@prisma-next/
|
|
26
|
-
"@prisma-next/
|
|
27
|
-
"@prisma-next/
|
|
28
|
-
"@prisma-next/
|
|
29
|
-
"@prisma-next/
|
|
30
|
-
"@prisma-next/
|
|
31
|
-
"@prisma-next/target-postgres": "0.5.0-dev.8",
|
|
32
|
-
"@prisma-next/test-utils": "0.0.1",
|
|
23
|
+
"@prisma-next/adapter-postgres": "0.5.0-dev.9",
|
|
24
|
+
"@prisma-next/driver-postgres": "0.5.0-dev.9",
|
|
25
|
+
"@prisma-next/extension-pgvector": "0.5.0-dev.9",
|
|
26
|
+
"@prisma-next/family-sql": "0.5.0-dev.9",
|
|
27
|
+
"@prisma-next/ids": "0.5.0-dev.9",
|
|
28
|
+
"@prisma-next/cli": "0.5.0-dev.9",
|
|
29
|
+
"@prisma-next/sql-contract-ts": "0.5.0-dev.9",
|
|
30
|
+
"@prisma-next/target-postgres": "0.5.0-dev.9",
|
|
33
31
|
"@prisma-next/tsconfig": "0.0.0",
|
|
32
|
+
"@prisma-next/test-utils": "0.0.1",
|
|
34
33
|
"@prisma-next/tsdown": "0.0.0"
|
|
35
34
|
},
|
|
36
35
|
"files": [
|
|
@@ -15,8 +15,9 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import type { Contract } from '@prisma-next/contract/types';
|
|
18
|
-
import { AsyncIterableResult } from '@prisma-next/runtime
|
|
18
|
+
import { AsyncIterableResult } from '@prisma-next/framework-components/runtime';
|
|
19
19
|
import type { SqlStorage } from '@prisma-next/sql-contract/types';
|
|
20
|
+
import type { RuntimeScope } from '@prisma-next/sql-relational-core/types';
|
|
20
21
|
import { isToOneCardinality, resolvePolymorphismInfo } from './collection-contract';
|
|
21
22
|
import {
|
|
22
23
|
acquireRuntimeScope,
|
|
@@ -41,7 +42,6 @@ import type {
|
|
|
41
42
|
IncludeExpr,
|
|
42
43
|
IncludeScalar,
|
|
43
44
|
RelationCardinalityTag,
|
|
44
|
-
RuntimeScope,
|
|
45
45
|
} from './types';
|
|
46
46
|
|
|
47
47
|
export function dispatchCollectionRows<Row>(options: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Contract } from '@prisma-next/contract/types';
|
|
2
|
-
import { AsyncIterableResult } from '@prisma-next/runtime
|
|
2
|
+
import { AsyncIterableResult } from '@prisma-next/framework-components/runtime';
|
|
3
3
|
import type { SqlStorage } from '@prisma-next/sql-contract/types';
|
|
4
4
|
import type { SqlQueryPlan } from '@prisma-next/sql-relational-core/plan';
|
|
5
5
|
import { stitchIncludes } from './collection-dispatch';
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { Contract } from '@prisma-next/contract/types';
|
|
2
|
-
import { AsyncIterableResult } from '@prisma-next/runtime
|
|
2
|
+
import { AsyncIterableResult } from '@prisma-next/framework-components/runtime';
|
|
3
3
|
import type { SqlStorage } from '@prisma-next/sql-contract/types';
|
|
4
|
+
import type { RuntimeScope } from '@prisma-next/sql-relational-core/types';
|
|
4
5
|
import {
|
|
5
6
|
getColumnToFieldMap,
|
|
6
7
|
getCompleteColumnToFieldMap,
|
|
7
8
|
getFieldToColumnMap,
|
|
8
9
|
type PolymorphismInfo,
|
|
9
10
|
} from './collection-contract';
|
|
10
|
-
import type { CollectionContext, RuntimeConnection
|
|
11
|
+
import type { CollectionContext, RuntimeConnection } from './types';
|
|
11
12
|
|
|
12
13
|
export interface RowEnvelope {
|
|
13
14
|
readonly raw: Record<string, unknown>;
|
package/src/collection.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Contract } from '@prisma-next/contract/types';
|
|
2
|
-
import { AsyncIterableResult } from '@prisma-next/runtime
|
|
2
|
+
import { AsyncIterableResult } from '@prisma-next/framework-components/runtime';
|
|
3
3
|
import type { SqlStorage } from '@prisma-next/sql-contract/types';
|
|
4
4
|
import {
|
|
5
5
|
BinaryExpr,
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type { RuntimeScope } from './types';
|
|
1
|
+
import type { AsyncIterableResult } from '@prisma-next/framework-components/runtime';
|
|
2
|
+
import type { SqlExecutionPlan, SqlQueryPlan } from '@prisma-next/sql-relational-core/plan';
|
|
3
|
+
import type { RuntimeScope } from '@prisma-next/sql-relational-core/types';
|
|
5
4
|
|
|
6
5
|
export function executeQueryPlan<Row>(
|
|
7
6
|
scope: RuntimeScope,
|
|
8
|
-
plan:
|
|
7
|
+
plan: SqlExecutionPlan<Row> | SqlQueryPlan<Row>,
|
|
9
8
|
): AsyncIterableResult<Row> {
|
|
10
9
|
return scope.execute(plan);
|
|
11
10
|
}
|
package/src/mutation-executor.ts
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
LiteralExpr,
|
|
8
8
|
} from '@prisma-next/sql-relational-core/ast';
|
|
9
9
|
import type { ExecutionContext } from '@prisma-next/sql-relational-core/query-lane-context';
|
|
10
|
+
import type { RuntimeScope } from '@prisma-next/sql-relational-core/types';
|
|
10
11
|
import {
|
|
11
12
|
getColumnToFieldMap,
|
|
12
13
|
resolveFieldToColumn,
|
|
@@ -40,7 +41,6 @@ import type {
|
|
|
40
41
|
RelationMutation,
|
|
41
42
|
RelationMutator,
|
|
42
43
|
RuntimeQueryable,
|
|
43
|
-
RuntimeScope,
|
|
44
44
|
} from './types';
|
|
45
45
|
import { emptyState } from './types';
|
|
46
46
|
|
package/src/types.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { Contract
|
|
2
|
-
import type { AsyncIterableResult } from '@prisma-next/runtime-executor';
|
|
1
|
+
import type { Contract } from '@prisma-next/contract/types';
|
|
3
2
|
import type {
|
|
4
3
|
ExtractCodecTypes,
|
|
5
4
|
ExtractQueryOperationTypes,
|
|
@@ -17,9 +16,8 @@ import {
|
|
|
17
16
|
OrderByItem,
|
|
18
17
|
ParamRef,
|
|
19
18
|
} from '@prisma-next/sql-relational-core/ast';
|
|
20
|
-
import type { SqlQueryPlan } from '@prisma-next/sql-relational-core/plan';
|
|
21
19
|
import type { ExecutionContext } from '@prisma-next/sql-relational-core/query-lane-context';
|
|
22
|
-
import type { ComputeColumnJsType } from '@prisma-next/sql-relational-core/types';
|
|
20
|
+
import type { ComputeColumnJsType, RuntimeScope } from '@prisma-next/sql-relational-core/types';
|
|
23
21
|
import type { RowSelection } from './collection-internal-types';
|
|
24
22
|
|
|
25
23
|
// ---------------------------------------------------------------------------
|
|
@@ -117,12 +115,6 @@ export type DefaultCollectionTypeState = {
|
|
|
117
115
|
// CollectionContext — bundles lane context + runtime
|
|
118
116
|
// ---------------------------------------------------------------------------
|
|
119
117
|
|
|
120
|
-
export interface RuntimeScope {
|
|
121
|
-
execute<Row = Record<string, unknown>>(
|
|
122
|
-
plan: ExecutionPlan<Row> | SqlQueryPlan<Row>,
|
|
123
|
-
): AsyncIterableResult<Row>;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
118
|
export interface RuntimeConnection extends RuntimeScope {
|
|
127
119
|
release?(): Promise<void>;
|
|
128
120
|
transaction?(): Promise<RuntimeTransaction>;
|