File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " prisma-kysely " : minor
3
+ ---
4
+
5
+ Added support for the Kysely SQL Server dialect
Original file line number Diff line number Diff line change @@ -52,6 +52,19 @@ export const postgresqlTypeMap: TypeMap = {
52
52
Unsupported : "unknown" ,
53
53
} ;
54
54
55
+ export const sqlServerTypeMap : TypeMap = {
56
+ BigInt : "number" ,
57
+ Boolean : "boolean" ,
58
+ Bytes : "Buffer" ,
59
+ DateTime : "Timestamp" ,
60
+ Decimal : "string" ,
61
+ Float : "number" ,
62
+ Int : "number" ,
63
+ Json : "unknown" ,
64
+ String : "string" ,
65
+ Unsupported : "unknown" ,
66
+ } ;
67
+
55
68
export const overrideType = ( type : string , config : Config ) => {
56
69
switch ( type ) {
57
70
case "String" :
@@ -95,6 +108,10 @@ export const generateFieldTypeInner = (
95
108
return (
96
109
typeOverride || overrideType ( type , config ) || postgresqlTypeMap [ type ]
97
110
) ;
111
+ case "sqlserver" :
112
+ return (
113
+ typeOverride || overrideType ( type , config ) || sqlServerTypeMap [ type ]
114
+ ) ;
98
115
}
99
116
} ;
100
117
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ export const configValidator = z
16
16
z . literal ( "cockroachdb" ) ,
17
17
z . literal ( "mysql" ) ,
18
18
z . literal ( "sqlite" ) ,
19
+ z . literal ( "sqlserver" ) ,
19
20
] ) ,
20
21
21
22
// Output overrides
You can’t perform that action at this time.
0 commit comments