Documentation
¶
Index ¶
- func ColumnToSchemaColumn(column *Column) (*schemasv1alpha4.SQLTableColumn, error)
- func ForeignKeyToSchemaForeignKey(foreignKey *ForeignKey) *schemasv1alpha4.SQLTableForeignKey
- func GenerateFKName(tableName string, schemaForeignKey *schemasv1alpha4.SQLTableForeignKey) string
- func GenerateIndexName(tableName string, schemaIndex *schemasv1alpha4.SQLTableIndex) string
- func IndexToSchemaIndex(index *Index) *schemasv1alpha4.SQLTableIndex
- func NotNullConstraintEquals(a, b *bool) bool
- type Column
- type ColumnConstraints
- type ForeignKey
- type Index
- type KeyConstraint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColumnToSchemaColumn ¶
func ColumnToSchemaColumn(column *Column) (*schemasv1alpha4.SQLTableColumn, error)
func ForeignKeyToSchemaForeignKey ¶
func ForeignKeyToSchemaForeignKey(foreignKey *ForeignKey) *schemasv1alpha4.SQLTableForeignKey
func GenerateFKName ¶
func GenerateFKName(tableName string, schemaForeignKey *schemasv1alpha4.SQLTableForeignKey) string
func GenerateIndexName ¶
func GenerateIndexName(tableName string, schemaIndex *schemasv1alpha4.SQLTableIndex) string
func IndexToSchemaIndex ¶
func IndexToSchemaIndex(index *Index) *schemasv1alpha4.SQLTableIndex
func NotNullConstraintEquals ¶ added in v0.3.0
Types ¶
type Column ¶
type Column struct { Name string DataType string ColumnDefault *string Constraints *ColumnConstraints IsArray bool }
type ColumnConstraints ¶
type ColumnConstraints struct {
NotNull *bool
}
type ForeignKey ¶
type ForeignKey struct { ChildColumns []string ParentTable string ParentColumns []string Name string OnDelete string }
func SchemaForeignKeyToForeignKey ¶
func SchemaForeignKeyToForeignKey(schemaForeignKey *schemasv1alpha4.SQLTableForeignKey) *ForeignKey
func (*ForeignKey) Equals ¶
func (fk *ForeignKey) Equals(other *ForeignKey) bool
type Index ¶
func SchemaIndexToIndex ¶
func SchemaIndexToIndex(schemaIndex *schemasv1alpha4.SQLTableIndex) *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.