Documentation
¶
Index ¶
- func AddIndexStatement(tableName string, schemaIndex *schemasv1alpha4.SqliteTableIndex) string
- func BuildAlterIndexStatements(r *SqliteConnection, tableName string, ...) ([]string, error)
- func CreateTableStatements(tableName string, tableSchema *schemasv1alpha4.SqliteTableSchema) ([]string, error)
- func DeploySqliteStatements(dsn string, statements []string) error
- func DropColumnStatement(tableName string, existingColumn types.Column) (string, error)
- func InsertColumnStatement(tableName string, desiredColumn *schemasv1alpha4.SqliteTableColumn) (string, error)
- func PlanSqliteTable(dsn string, tableName string, ...) ([]string, error)
- func PlanSqliteView(dsn string, viewName string, ...) ([]string, error)
- func RecreateTableStatements(tableName string, sqliteTableSchema *schemasv1alpha4.SqliteTableSchema) ([]string, error)
- func RemoveIndexStatement(tableName string, index *types.Index) string
- func SeedDataStatements(tableName string, seedData *schemasv1alpha4.SeedData) ([]string, error)
- type SqliteConnection
- func (s SqliteConnection) Close()
- func (s *SqliteConnection) GetTablePrimaryKey(tableName string) (*types.KeyConstraint, error)
- func (s *SqliteConnection) GetTablePrimaryKeyColumns(tableName string) ([]string, error)
- func (s *SqliteConnection) GetTableSchema(tableName string) ([]*types.Column, error)
- func (s *SqliteConnection) IndexIsAConstraint(tableName string, indexName string) (bool, error)
- func (s *SqliteConnection) ListTableForeignKeys(_ string, tableName string) ([]*types.ForeignKey, error)
- func (s *SqliteConnection) ListTableIndexes(_ string, tableName string) ([]*types.Index, error)
- func (s *SqliteConnection) ListTables() ([]*types.Table, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddIndexStatement ¶ added in v0.13.3
func AddIndexStatement(tableName string, schemaIndex *schemasv1alpha4.SqliteTableIndex) string
func BuildAlterIndexStatements ¶ added in v0.13.3
func BuildAlterIndexStatements(r *SqliteConnection, tableName string, sqliteTableSchema *schemasv1alpha4.SqliteTableSchema) ([]string, error)
func CreateTableStatements ¶
func CreateTableStatements(tableName string, tableSchema *schemasv1alpha4.SqliteTableSchema) ([]string, error)
func DeploySqliteStatements ¶
func DropColumnStatement ¶ added in v0.13.3
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 PlanSqliteView ¶ added in v0.15.0
func PlanSqliteView(dsn string, viewName string, sqliteViewSchema *schemasv1alpha4.NotImplementedViewSchema) ([]string, error)
func RecreateTableStatements ¶
func RecreateTableStatements(tableName string, sqliteTableSchema *schemasv1alpha4.SqliteTableSchema) ([]string, error)
func RemoveIndexStatement ¶ added in v0.13.3
func SeedDataStatements ¶ added in v0.13.0
func SeedDataStatements(tableName string, seedData *schemasv1alpha4.SeedData) ([]string, error)
Types ¶
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()
func (*SqliteConnection) GetTablePrimaryKey ¶ added in v0.13.3
func (s *SqliteConnection) GetTablePrimaryKey(tableName string) (*types.KeyConstraint, error)
func (*SqliteConnection) GetTablePrimaryKeyColumns ¶ added in v0.13.3
func (s *SqliteConnection) GetTablePrimaryKeyColumns(tableName string) ([]string, error)
func (*SqliteConnection) GetTableSchema ¶ added in v0.13.3
func (s *SqliteConnection) GetTableSchema(tableName string) ([]*types.Column, error)
func (*SqliteConnection) IndexIsAConstraint ¶ added in v0.13.3
func (s *SqliteConnection) IndexIsAConstraint(tableName string, indexName string) (bool, error)
func (*SqliteConnection) ListTableForeignKeys ¶ added in v0.13.3
func (s *SqliteConnection) ListTableForeignKeys(_ string, tableName string) ([]*types.ForeignKey, error)
func (*SqliteConnection) ListTableIndexes ¶ added in v0.13.3
func (*SqliteConnection) ListTables ¶ added in v0.13.3
func (s *SqliteConnection) ListTables() ([]*types.Table, error)
Click to show internal directories.
Click to hide internal directories.