mirror of
https://github.com/theoludwig/kysely-typegen.git
synced 2026-10-16 19:16:47 +02:00
feat: add SQLite support
Adds `KyselyTypegenSQLiteDialect`, exported from `kysely-typegen/sqlite`.
This commit is contained in:
8 files changed
+499
-4
No files matched your search
+6
-1
@@ -55,6 +55,10 @@ export abstract class KyselyTypegenDialect {
|
||||
})
|
||||
}
|
||||
|
||||
protected normalizeDataType(dataType: string): string {
|
||||
return dataType
|
||||
}
|
||||
|
||||
protected resolveColumnType(
|
||||
table: TableMetadata,
|
||||
column: ColumnMetadata,
|
||||
@@ -65,7 +69,8 @@ export abstract class KyselyTypegenDialect {
|
||||
if (inlineUnion != null) {
|
||||
return inlineUnion
|
||||
}
|
||||
return scalars[column.dataType] ?? "unknown"
|
||||
const dataType = this.normalizeDataType(column.dataType)
|
||||
return scalars[dataType] ?? "unknown"
|
||||
}
|
||||
|
||||
public getTablesTypegen(
|
||||
|
||||
Reference in new issue
Block a user