Documentation
¶
Index ¶
- func BoolsEqual(a, b *bool) bool
- func ColumnToMysqlSchemaColumn(column *Column) (*schemasv1alpha4.MysqlTableColumn, error)
- func ColumnToPostgresqlSchemaColumn(column *Column) (*schemasv1alpha4.PostgresqlTableColumn, error)
- func ForeignKeyToMysqlSchemaForeignKey(foreignKey *ForeignKey) *schemasv1alpha4.MysqlTableForeignKey
- func ForeignKeyToPostgresqlSchemaForeignKey(foreignKey *ForeignKey) *schemasv1alpha4.PostgresqlTableForeignKey
- func GenerateMysqlFKName(tableName string, schemaForeignKey *schemasv1alpha4.MysqlTableForeignKey) string
- func GenerateMysqlIndexName(tableName string, schemaIndex *schemasv1alpha4.MysqlTableIndex) string
- func GeneratePostgresqlFKName(tableName string, schemaForeignKey *schemasv1alpha4.PostgresqlTableForeignKey) string
- func GeneratePostgresqlIndexName(tableName string, schemaIndex *schemasv1alpha4.PostgresqlTableIndex) string
- func GenerateSqliteFKName(tableName string, schemaForeignKey *schemasv1alpha4.SqliteTableForeignKey) string
- func IndexToMysqlSchemaIndex(index *Index) *schemasv1alpha4.MysqlTableIndex
- func IndexToPostgresqlSchemaIndex(index *Index) *schemasv1alpha4.PostgresqlTableIndex
- type Column
- type ColumnAttributes
- type ColumnConstraints
- type ForeignKey
- type Index
- type KeyConstraint
- type Table
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoolsEqual ¶ added in v0.10.4
func ColumnToMysqlSchemaColumn ¶ added in v0.11.0
func ColumnToMysqlSchemaColumn(column *Column) (*schemasv1alpha4.MysqlTableColumn, error)
func ColumnToPostgresqlSchemaColumn ¶ added in v0.12.0
func ColumnToPostgresqlSchemaColumn(column *Column) (*schemasv1alpha4.PostgresqlTableColumn, error)
func ForeignKeyToMysqlSchemaForeignKey ¶ added in v0.12.0
func ForeignKeyToMysqlSchemaForeignKey(foreignKey *ForeignKey) *schemasv1alpha4.MysqlTableForeignKey
func ForeignKeyToPostgresqlSchemaForeignKey ¶ added in v0.12.0
func ForeignKeyToPostgresqlSchemaForeignKey(foreignKey *ForeignKey) *schemasv1alpha4.PostgresqlTableForeignKey
func GenerateMysqlFKName ¶ added in v0.12.0
func GenerateMysqlFKName(tableName string, schemaForeignKey *schemasv1alpha4.MysqlTableForeignKey) string
func GenerateMysqlIndexName ¶ added in v0.12.0
func GenerateMysqlIndexName(tableName string, schemaIndex *schemasv1alpha4.MysqlTableIndex) string
func GeneratePostgresqlFKName ¶ added in v0.12.0
func GeneratePostgresqlFKName(tableName string, schemaForeignKey *schemasv1alpha4.PostgresqlTableForeignKey) string
func GeneratePostgresqlIndexName ¶ added in v0.12.0
func GeneratePostgresqlIndexName(tableName string, schemaIndex *schemasv1alpha4.PostgresqlTableIndex) string
func GenerateSqliteFKName ¶ added in v0.12.0
func GenerateSqliteFKName(tableName string, schemaForeignKey *schemasv1alpha4.SqliteTableForeignKey) string
func IndexToMysqlSchemaIndex ¶ added in v0.12.0
func IndexToMysqlSchemaIndex(index *Index) *schemasv1alpha4.MysqlTableIndex
func IndexToPostgresqlSchemaIndex ¶ added in v0.12.0
func IndexToPostgresqlSchemaIndex(index *Index) *schemasv1alpha4.PostgresqlTableIndex
Types ¶
type Column ¶
type Column struct { Name string DataType string ColumnDefault *string Constraints *ColumnConstraints Attributes *ColumnAttributes IsArray bool Charset string Collation string IsStatic bool }
type ColumnAttributes ¶ added in v0.10.4
type ColumnAttributes struct {
AutoIncrement *bool
}
type ColumnConstraints ¶
type ColumnConstraints struct {
NotNull *bool
}
type ForeignKey ¶
type ForeignKey struct { ChildColumns []string ParentTable string ParentColumns []string Name string OnDelete string }
func MysqlSchemaForeignKeyToForeignKey ¶ added in v0.12.0
func MysqlSchemaForeignKeyToForeignKey(schemaForeignKey *schemasv1alpha4.MysqlTableForeignKey) *ForeignKey
func PostgresqlSchemaForeignKeyToForeignKey ¶ added in v0.12.0
func PostgresqlSchemaForeignKeyToForeignKey(schemaForeignKey *schemasv1alpha4.PostgresqlTableForeignKey) *ForeignKey
func (*ForeignKey) Equals ¶
func (fk *ForeignKey) Equals(other *ForeignKey) bool
type Index ¶
func MysqlSchemaIndexToIndex ¶ added in v0.12.0
func MysqlSchemaIndexToIndex(schemaIndex *schemasv1alpha4.MysqlTableIndex) *Index
func PostgresqlSchemaIndexToIndex ¶ added in v0.12.0
func PostgresqlSchemaIndexToIndex(schemaIndex *schemasv1alpha4.PostgresqlTableIndex) *Index
type KeyConstraint ¶ added in v0.3.0
func (*KeyConstraint) Equals ¶ added in v0.3.0
func (k *KeyConstraint) Equals(other *KeyConstraint) bool
func (*KeyConstraint) GenerateName ¶ added in v0.3.0
func (k *KeyConstraint) GenerateName(tableName string) string
Click to show internal directories.
Click to hide internal directories.