Documentation
¶
Index ¶
- func AddForeignKeyStatement(tableName string, schemaForeignKey *schemasv1alpha4.MysqlTableForeignKey) string
- func AddIndexStatement(tableName string, schemaIndex *schemasv1alpha4.MysqlTableIndex) string
- func AlterColumnStatements(tableName string, primaryKeys []string, ...) ([]string, error)
- func CreateTableStatements(tableName string, tableSchema *schemasv1alpha4.MysqlTableSchema) ([]string, error)
- func DatabaseNameFromURI(uri string) (string, error)
- func DeployMysqlStatements(uri string, statements []string) error
- func HostnameFromURI(uri string) (string, error)
- func InsertColumnStatement(tableName string, desiredColumn *schemasv1alpha4.MysqlTableColumn) (string, error)
- func PasswordFromURI(uri string) (string, error)
- func PlanMysqlTable(uri string, tableName string, ...) ([]string, error)
- func PlanMysqlView(uri string, viewName string, ...) ([]string, error)
- func PortFromURI(uri string) (string, error)
- func RemoveForeignKeyStatement(tableName string, foreignKey *types.ForeignKey) string
- func RemoveIndexStatement(tableName string, index *types.Index) string
- func RenameIndexStatement(tableName string, index *types.Index, ...) string
- func SeedDataStatements(tableName string, seedData *schemasv1alpha4.SeedData) ([]string, error)
- func UsernameFromURI(uri string) (string, error)
- type AlterAddConstrantStatement
- type AlterDropColumnStatement
- type AlterModifyColumnStatement
- type AlterRemoveConstrantStatement
- type MysqlConnection
- func (m *MysqlConnection) Close() error
- func (m *MysqlConnection) DatabaseName() string
- func (m *MysqlConnection) EngineVersion() string
- func (m *MysqlConnection) GetDB() *sql.DB
- func (m *MysqlConnection) GetTablePrimaryKey(tableName string) (*types.KeyConstraint, error)
- func (m *MysqlConnection) GetTableSchema(tableName string) ([]*types.Column, error)
- func (m *MysqlConnection) ListTableForeignKeys(databaseName string, tableName string) ([]*types.ForeignKey, error)
- func (m *MysqlConnection) ListTableIndexes(databaseName string, tableName string) ([]*types.Index, error)
- func (m *MysqlConnection) ListTables() ([]*types.Table, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddForeignKeyStatement ¶ added in v0.2.0
func AddForeignKeyStatement(tableName string, schemaForeignKey *schemasv1alpha4.MysqlTableForeignKey) string
func AddIndexStatement ¶ added in v0.2.0
func AddIndexStatement(tableName string, schemaIndex *schemasv1alpha4.MysqlTableIndex) string
func AlterColumnStatements ¶ added in v0.8.2
func AlterColumnStatements(tableName string, primaryKeys []string, desiredColumns []*schemasv1alpha4.MysqlTableColumn, existingColumn *types.Column, defaultCharset string, defaultCollation string) ([]string, error)
func CreateTableStatements ¶ added in v0.12.0
func CreateTableStatements(tableName string, tableSchema *schemasv1alpha4.MysqlTableSchema) ([]string, error)
func DatabaseNameFromURI ¶
func DeployMysqlStatements ¶ added in v0.8.0
func HostnameFromURI ¶ added in v0.9.0
func InsertColumnStatement ¶
func InsertColumnStatement(tableName string, desiredColumn *schemasv1alpha4.MysqlTableColumn) (string, error)
func PasswordFromURI ¶ added in v0.9.0
func PlanMysqlTable ¶ added in v0.8.0
func PlanMysqlTable(uri string, tableName string, mysqlTableSchema *schemasv1alpha4.MysqlTableSchema, seedData *schemasv1alpha4.SeedData) ([]string, error)
func PlanMysqlView ¶ added in v0.15.0
func PlanMysqlView(uri string, viewName string, mysqlViewSchema *schemasv1alpha4.NotImplementedViewSchema) ([]string, error)
func PortFromURI ¶ added in v0.13.0
func RemoveForeignKeyStatement ¶ added in v0.2.0
func RemoveForeignKeyStatement(tableName string, foreignKey *types.ForeignKey) string
func RemoveIndexStatement ¶ added in v0.2.0
func RenameIndexStatement ¶ added in v0.2.0
func RenameIndexStatement(tableName string, index *types.Index, schemaIndex *schemasv1alpha4.MysqlTableIndex) string
func SeedDataStatements ¶ added in v0.13.0
func SeedDataStatements(tableName string, seedData *schemasv1alpha4.SeedData) ([]string, error)
func UsernameFromURI ¶ added in v0.9.0
Types ¶
type AlterAddConstrantStatement ¶ added in v0.3.0
type AlterAddConstrantStatement struct { TableName string Constraint types.KeyConstraint }
func (AlterAddConstrantStatement) String ¶ added in v0.3.0
func (s AlterAddConstrantStatement) String() string
type AlterDropColumnStatement ¶ added in v0.3.0
func (AlterDropColumnStatement) DDL ¶ added in v0.8.2
func (s AlterDropColumnStatement) DDL() []string
type AlterModifyColumnStatement ¶ added in v0.3.0
type AlterModifyColumnStatement struct { TableName string ExistingColumn types.Column Column types.Column }
func (AlterModifyColumnStatement) DDL ¶ added in v0.8.2
func (s AlterModifyColumnStatement) DDL() []string
type AlterRemoveConstrantStatement ¶ added in v0.3.0
type AlterRemoveConstrantStatement struct { TableName string Constraint types.KeyConstraint }
func (AlterRemoveConstrantStatement) String ¶ added in v0.3.0
func (s AlterRemoveConstrantStatement) String() string
type MysqlConnection ¶
type MysqlConnection struct {
// contains filtered or unexported fields
}
func Connect ¶
func Connect(uri string) (*MysqlConnection, error)
func (*MysqlConnection) Close ¶ added in v0.11.0
func (m *MysqlConnection) Close() error
func (*MysqlConnection) DatabaseName ¶
func (m *MysqlConnection) DatabaseName() string
func (*MysqlConnection) EngineVersion ¶
func (m *MysqlConnection) EngineVersion() string
func (*MysqlConnection) GetDB ¶
func (m *MysqlConnection) GetDB() *sql.DB
func (*MysqlConnection) GetTablePrimaryKey ¶ added in v0.2.0
func (m *MysqlConnection) GetTablePrimaryKey(tableName string) (*types.KeyConstraint, error)
func (*MysqlConnection) GetTableSchema ¶ added in v0.2.0
func (m *MysqlConnection) GetTableSchema(tableName string) ([]*types.Column, error)
func (*MysqlConnection) ListTableForeignKeys ¶ added in v0.2.0
func (m *MysqlConnection) ListTableForeignKeys(databaseName string, tableName string) ([]*types.ForeignKey, error)
func (*MysqlConnection) ListTableIndexes ¶ added in v0.2.0
func (*MysqlConnection) ListTables ¶ added in v0.2.0
func (m *MysqlConnection) ListTables() ([]*types.Table, error)
Click to show internal directories.
Click to hide internal directories.