ts-sql-codegen / GeneratedFieldType
-
TypeOf<typeofGeneratedFieldTypeSchema>↳
GeneratedFieldType
• Optional adapter: null | { importPath?: null | string ; isDefault?: null | boolean ; isRelative?: null | boolean ; name: string }
Specify a type adapter for the generated field.
If not present, we will attempt to use GeneratorOpts.common.typeAdapter.importPath or throw if absent.
z.TypeOf.adapter
• Optional dbType: null | { name: string }
This name is a database type identifier as expected by ts-sql-query
These names are not database specific and may not match FieldMappingSchema.columnType eg. for database level type (which tbls outputs in the schema yaml) can be varchar but the columnType that ts-sql-query uses will be 'string'
z.TypeOf.dbType
• Optional kind: null | "custom" | "customComparable" | "enum" | "customInt" | "customDouble" | "customUuid" | "customLocalDate" | "customLocalTime" | "customLocalDateTime"
Specify that this field uses a custom database type or an enum type
z.TypeOf.kind
• Optional tsType: null | { importPath?: null | string ; isDefault?: null | boolean ; isRelative?: null | boolean ; name: string }
If present, used as a generic type argument to field factory. This is typically useful when dealing with custom database types or enum types.
If importPath is not present, then an import will not be added. This can result in a compile time error if the type is not globally available.
z.TypeOf.tsType