Documentation ¶
Index ¶
- func AddForeignKeyStatement(tableName string, schemaForeignKey *schemasv1alpha4.SqliteTableForeignKey) string
- func CreateTableStatements(tableName string, tableSchema *schemasv1alpha4.SqliteTableSchema) ([]string, error)
- func DeploySqliteStatements(dsn string, statements []string) error
- func InsertColumnStatement(tableName string, desiredColumn *schemasv1alpha4.SqliteTableColumn) (string, error)
- func PlanSqliteTable(dsn string, tableName string, ...) ([]string, error)
- func RecreateTableStatements(tableName string, sqliteTableSchema *schemasv1alpha4.SqliteTableSchema) ([]string, error)
- func RemoveForeignKeyStatement(tableName string, foreignKey *types.ForeignKey) string
- func SeedDataStatements(tableName string, seedData *schemasv1alpha4.SeedData) ([]string, error)
- type AlterAddConstrantStatement
- type AlterDropColumnStatement
- type AlterModifyColumnStatement
- type AlterRemoveConstrantStatement
- type SqliteConnection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddForeignKeyStatement ¶
func AddForeignKeyStatement(tableName string, schemaForeignKey *schemasv1alpha4.SqliteTableForeignKey) string
func CreateTableStatements ¶
func CreateTableStatements(tableName string, tableSchema *schemasv1alpha4.SqliteTableSchema) ([]string, error)
func DeploySqliteStatements ¶
func InsertColumnStatement ¶
func InsertColumnStatement(tableName string, desiredColumn *schemasv1alpha4.SqliteTableColumn) (string, error)
func PlanSqliteTable ¶
func PlanSqliteTable(dsn string, tableName string, sqliteTableSchema *schemasv1alpha4.SqliteTableSchema, seedData *schemasv1alpha4.SeedData) ([]string, error)
func RecreateTableStatements ¶
func RecreateTableStatements(tableName string, sqliteTableSchema *schemasv1alpha4.SqliteTableSchema) ([]string, error)
func RemoveForeignKeyStatement ¶
func RemoveForeignKeyStatement(tableName string, foreignKey *types.ForeignKey) string
func SeedDataStatements ¶ added in v0.13.0
func SeedDataStatements(tableName string, seedData *schemasv1alpha4.SeedData) ([]string, error)
Types ¶
type AlterAddConstrantStatement ¶
type AlterAddConstrantStatement struct { TableName string Constraint types.KeyConstraint }
func (AlterAddConstrantStatement) String ¶
func (s AlterAddConstrantStatement) String() string
type AlterDropColumnStatement ¶
func (AlterDropColumnStatement) DDL ¶
func (s AlterDropColumnStatement) DDL() []string
type AlterModifyColumnStatement ¶
type AlterModifyColumnStatement struct { TableName string ExistingColumn types.Column Column types.Column }
func (AlterModifyColumnStatement) DDL ¶
func (s AlterModifyColumnStatement) DDL() []string
type AlterRemoveConstrantStatement ¶
type AlterRemoveConstrantStatement struct { TableName string Constraint types.KeyConstraint }
func (AlterRemoveConstrantStatement) String ¶
func (s AlterRemoveConstrantStatement) String() string
type SqliteConnection ¶
type SqliteConnection struct {
// contains filtered or unexported fields
}
func Connect ¶
func Connect(dsn string) (*SqliteConnection, error)
func (SqliteConnection) Close ¶
func (s SqliteConnection) Close()
Click to show internal directories.
Click to hide internal directories.