53 lines
884 B
Go
53 lines
884 B
Go
package main
|
|
|
|
type ColumnType struct {
|
|
name string
|
|
|
|
hasMaxLength bool
|
|
hasPrecisionScale bool
|
|
|
|
userType string
|
|
systemType string
|
|
unifiedType string
|
|
nullable bool
|
|
maxLength int64
|
|
precision int64
|
|
scale int64
|
|
}
|
|
|
|
func (c *ColumnType) Name() string {
|
|
return c.name
|
|
}
|
|
|
|
func (c *ColumnType) UserType() string {
|
|
return c.userType
|
|
}
|
|
|
|
func (c *ColumnType) SystemType() string {
|
|
return c.systemType
|
|
}
|
|
|
|
func (c *ColumnType) Length() (length int64, ok bool) {
|
|
return c.maxLength, c.hasMaxLength
|
|
}
|
|
|
|
func (c *ColumnType) DecimalSize() (precision, scale int64, ok bool) {
|
|
return c.precision, c.scale, c.hasPrecisionScale
|
|
}
|
|
|
|
func (c *ColumnType) Nullable() bool {
|
|
return c.nullable
|
|
}
|
|
|
|
func (c *ColumnType) Type() string {
|
|
return c.unifiedType
|
|
}
|
|
|
|
type MigrationJob struct {
|
|
Schema string
|
|
Table string
|
|
PrimaryKey string
|
|
}
|
|
|
|
type UnknownRowValues = []any
|