@prisma-next/adapter-postgres 0.7.0 → 0.8.0-dev.1

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.
@@ -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
- ): StorageTypeInstance & { readonly typeParams: { readonly values: Values } } {
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>(