@prisma-next/adapter-postgres 0.8.0 → 0.9.0-dev.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/dist/column-types.d.mts +2 -6
- package/dist/column-types.d.mts.map +1 -1
- package/dist/column-types.mjs +5 -4
- package/dist/column-types.mjs.map +1 -1
- package/dist/control.d.mts +8 -0
- package/dist/control.d.mts.map +1 -1
- package/dist/control.mjs +103 -3
- package/dist/control.mjs.map +1 -1
- package/dist/descriptor-meta-ZIv9PU-5.mjs +314 -0
- package/dist/descriptor-meta-ZIv9PU-5.mjs.map +1 -0
- package/dist/runtime.mjs +1 -1
- package/package.json +22 -22
- package/src/core/control-adapter.ts +15 -3
- package/src/core/descriptor-meta.ts +0 -3
- package/src/core/enum-control-hooks.ts +54 -657
- package/src/exports/column-types.ts +3 -7
- package/dist/descriptor-meta-DvzAuIyE.mjs +0 -799
- package/dist/descriptor-meta-DvzAuIyE.mjs.map +0 -1
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import type { ColumnTypeDescriptor } from '@prisma-next/framework-components/codec';
|
|
8
|
-
import type { StorageTypeInstance } from '@prisma-next/sql-contract/types';
|
|
9
8
|
import {
|
|
10
9
|
PG_BIT_CODEC_ID,
|
|
11
10
|
PG_BOOL_CODEC_ID,
|
|
@@ -29,6 +28,7 @@ import {
|
|
|
29
28
|
SQL_CHAR_CODEC_ID,
|
|
30
29
|
SQL_VARCHAR_CODEC_ID,
|
|
31
30
|
} from '@prisma-next/target-postgres/codec-ids';
|
|
31
|
+
import { PostgresEnumType } from '@prisma-next/target-postgres/types';
|
|
32
32
|
|
|
33
33
|
export const textColumn = {
|
|
34
34
|
codecId: PG_TEXT_CODEC_ID,
|
|
@@ -189,12 +189,8 @@ export const jsonbColumn = {
|
|
|
189
189
|
export function enumType<const Values extends readonly string[]>(
|
|
190
190
|
name: string,
|
|
191
191
|
values: Values,
|
|
192
|
-
):
|
|
193
|
-
return {
|
|
194
|
-
codecId: PG_ENUM_CODEC_ID,
|
|
195
|
-
nativeType: name,
|
|
196
|
-
typeParams: { values },
|
|
197
|
-
} as const;
|
|
192
|
+
): PostgresEnumType {
|
|
193
|
+
return new PostgresEnumType({ name, nativeType: name, values });
|
|
198
194
|
}
|
|
199
195
|
|
|
200
196
|
export function enumColumn<TypeName extends string>(
|