ts-sql-codegen / FieldMapping
-
TypeOf
<typeofFieldMappingSchema
>↳
FieldMapping
• Optional
columnName: null
| string
| RegExp
Optional criteria (string or regex) to match column name
z.TypeOf.columnName
• Optional
columnType: null
| string
| RegExp
Optional criteria (string or regex) to match column type (in database)
This will be used to match against the type name as present in the tbls output schema yaml file.
z.TypeOf.columnType
• Optional
comment: null
| string
z.TypeOf.comment
• generatedField: false
| { hasDefault?
: null
| boolean
; isComputed?
: null
| boolean
; isOptional?
: null
| boolean
; name?
: null
| string
; type?
: null
| { adapter?
: null
| { importPath?
: null
| string
; isDefault?
: null
| boolean
; isRelative?
: null
| boolean
; name
: string
} ; dbType?
: null
| { name
: string
} ; kind?
: null
| "custom"
| "customComparable"
| "enum"
| "customInt"
| "customDouble"
| "customUuid"
| "customLocalDate"
| "customLocalTime"
| "customLocalDateTime"
; tsType?
: null
| { importPath?
: null
| string
; isDefault?
: null
| boolean
; isRelative?
: null
| boolean
; name
: string
} } }
Can be used to customize the field name or type mapping in the generated field.
Set to false to omit mapping of this field
z.TypeOf.generatedField
• Optional
tableName: null
| string
| RegExp
Optional criteria (string or regex) to match table name
z.TypeOf.tableName