@prisma-next/sql-operations 0.5.0-dev.14 → 0.5.0-dev.15

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/dist/index.d.mts CHANGED
@@ -1,4 +1,5 @@
1
- import { OperationDescriptor, OperationEntry, OperationRegistry } from "@prisma-next/operations";
1
+ import { OperationDescriptor, OperationRegistry } from "@prisma-next/operations";
2
+ import { QueryOperationTypeEntry } from "@prisma-next/sql-contract/types";
2
3
 
3
4
  //#region src/index.d.ts
4
5
  interface SqlLoweringSpec {
@@ -6,9 +7,14 @@ interface SqlLoweringSpec {
6
7
  readonly strategy: 'infix' | 'function';
7
8
  readonly template: string;
8
9
  }
9
- interface SqlOperationEntry extends OperationEntry {
10
- readonly lowering: SqlLoweringSpec;
11
- }
10
+ /**
11
+ * Runtime shape of a SQL operation entry — tightened beyond the framework's
12
+ * target-agnostic `OperationEntry` so `impl` returns a codec-exact
13
+ * `QueryOperationReturn` instead of `unknown`. Consumers (ORM column helper,
14
+ * sql-builder `fns` dispatch) can read `result.returnType.codecId` without a
15
+ * cast.
16
+ */
17
+ type SqlOperationEntry = QueryOperationTypeEntry;
12
18
  type SqlOperationDescriptor = OperationDescriptor<SqlOperationEntry>;
13
19
  type SqlOperationRegistry = OperationRegistry<SqlOperationEntry>;
14
20
  declare function createSqlOperationRegistry(): SqlOperationRegistry;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;UAOiB,eAAA;;EAAA,SAAA,QAAA,EAAe,OAAA,GAAA,UAAA;EAMf,SAAA,QAAA,EAAA,MAAkB;AAInC;AAEY,UANK,iBAAA,SAA0B,cAMR,CAAA;EAEnB,SAAA,QAAA,EAPK,eAOqB;;KAJ9B,sBAAA,GAAyB,oBAAoB;KAE7C,oBAAA,GAAuB,kBAAkB;iBAErC,0BAAA,CAAA,GAA8B"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;UAIiB,eAAA;;EAAA,SAAA,QAAA,EAAe,OAAA,GAAA,UAAA;EAapB,SAAA,QAAA,EAAA,MAAiB;AAE7B;AAEA;AAEA;;;;;;KANY,iBAAA,GAAoB;KAEpB,sBAAA,GAAyB,oBAAoB;KAE7C,oBAAA,GAAuB,kBAAkB;iBAErC,0BAAA,CAAA,GAA8B"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import type {\n OperationDescriptor,\n OperationEntry,\n OperationRegistry,\n} from '@prisma-next/operations';\nimport { createOperationRegistry } from '@prisma-next/operations';\n\nexport interface SqlLoweringSpec {\n readonly targetFamily: 'sql';\n readonly strategy: 'infix' | 'function';\n readonly template: string;\n}\n\nexport interface SqlOperationEntry extends OperationEntry {\n readonly lowering: SqlLoweringSpec;\n}\n\nexport type SqlOperationDescriptor = OperationDescriptor<SqlOperationEntry>;\n\nexport type SqlOperationRegistry = OperationRegistry<SqlOperationEntry>;\n\nexport function createSqlOperationRegistry(): SqlOperationRegistry {\n return createOperationRegistry<SqlOperationEntry>();\n}\n"],"mappings":";;;AAqBA,SAAgB,6BAAmD;AACjE,QAAO,yBAA4C"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import type { OperationDescriptor, OperationRegistry } from '@prisma-next/operations';\nimport { createOperationRegistry } from '@prisma-next/operations';\nimport type { QueryOperationTypeEntry } from '@prisma-next/sql-contract/types';\n\nexport interface SqlLoweringSpec {\n readonly targetFamily: 'sql';\n readonly strategy: 'infix' | 'function';\n readonly template: string;\n}\n\n/**\n * Runtime shape of a SQL operation entry — tightened beyond the framework's\n * target-agnostic `OperationEntry` so `impl` returns a codec-exact\n * `QueryOperationReturn` instead of `unknown`. Consumers (ORM column helper,\n * sql-builder `fns` dispatch) can read `result.returnType.codecId` without a\n * cast.\n */\nexport type SqlOperationEntry = QueryOperationTypeEntry;\n\nexport type SqlOperationDescriptor = OperationDescriptor<SqlOperationEntry>;\n\nexport type SqlOperationRegistry = OperationRegistry<SqlOperationEntry>;\n\nexport function createSqlOperationRegistry(): SqlOperationRegistry {\n return createOperationRegistry<SqlOperationEntry>();\n}\n"],"mappings":";;;AAuBA,SAAgB,6BAAmD;AACjE,QAAO,yBAA4C"}
package/package.json CHANGED
@@ -1,21 +1,22 @@
1
1
  {
2
2
  "name": "@prisma-next/sql-operations",
3
- "version": "0.5.0-dev.14",
3
+ "version": "0.5.0-dev.15",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "description": "SQL-specific operations for Prisma Next",
7
7
  "dependencies": {
8
8
  "arktype": "^2.1.26",
9
- "@prisma-next/operations": "0.5.0-dev.14"
9
+ "@prisma-next/operations": "0.5.0-dev.15",
10
+ "@prisma-next/sql-contract": "0.5.0-dev.15"
10
11
  },
11
12
  "devDependencies": {
12
13
  "tsdown": "0.18.4",
13
14
  "typescript": "5.9.3",
14
15
  "vitest": "4.0.17",
15
- "@prisma-next/emitter": "0.5.0-dev.14",
16
- "@prisma-next/tsdown": "0.0.0",
16
+ "@prisma-next/emitter": "0.5.0-dev.15",
17
17
  "@prisma-next/test-utils": "0.0.1",
18
- "@prisma-next/tsconfig": "0.0.0"
18
+ "@prisma-next/tsconfig": "0.0.0",
19
+ "@prisma-next/tsdown": "0.0.0"
19
20
  },
20
21
  "files": [
21
22
  "dist",
package/src/index.ts CHANGED
@@ -1,9 +1,6 @@
1
- import type {
2
- OperationDescriptor,
3
- OperationEntry,
4
- OperationRegistry,
5
- } from '@prisma-next/operations';
1
+ import type { OperationDescriptor, OperationRegistry } from '@prisma-next/operations';
6
2
  import { createOperationRegistry } from '@prisma-next/operations';
3
+ import type { QueryOperationTypeEntry } from '@prisma-next/sql-contract/types';
7
4
 
8
5
  export interface SqlLoweringSpec {
9
6
  readonly targetFamily: 'sql';
@@ -11,9 +8,14 @@ export interface SqlLoweringSpec {
11
8
  readonly template: string;
12
9
  }
13
10
 
14
- export interface SqlOperationEntry extends OperationEntry {
15
- readonly lowering: SqlLoweringSpec;
16
- }
11
+ /**
12
+ * Runtime shape of a SQL operation entry — tightened beyond the framework's
13
+ * target-agnostic `OperationEntry` so `impl` returns a codec-exact
14
+ * `QueryOperationReturn` instead of `unknown`. Consumers (ORM column helper,
15
+ * sql-builder `fns` dispatch) can read `result.returnType.codecId` without a
16
+ * cast.
17
+ */
18
+ export type SqlOperationEntry = QueryOperationTypeEntry;
17
19
 
18
20
  export type SqlOperationDescriptor = OperationDescriptor<SqlOperationEntry>;
19
21