jet/generator/metadata/column_meta_data.go

33 lines
757 B
Go
Raw Normal View History

package metadata
// Column struct
type Column struct {
Name string `sql:"primary_key"`
IsPrimaryKey bool
IsNullable bool
IsGenerated bool
2024-08-13 14:52:54 -06:00
HasDefault bool
DataType DataType
Comment string
}
// DataTypeKind is database type kind(base, enum, user-defined, array)
type DataTypeKind string
// DataTypeKind possible values
const (
BaseType DataTypeKind = "base"
EnumType DataTypeKind = "enum"
UserDefinedType DataTypeKind = "user-defined"
ArrayType DataTypeKind = "array"
2024-02-01 15:20:49 +01:00
RangeType DataTypeKind = "range"
)
// DataType contains information about column data type
type DataType struct {
Name string
Kind DataTypeKind
IsUnsigned bool
2024-09-03 15:39:36 +02:00
Dimensions int // The number of array dimensions
}