sqlite

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

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 DeploySqliteStatements(dsn string, statements []string) error

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

type AlterDropColumnStatement

type AlterDropColumnStatement struct {
	TableName string
	Column    types.Column
}

func (AlterDropColumnStatement) DDL

func (s AlterDropColumnStatement) DDL() []string

type AlterModifyColumnStatement

type AlterModifyColumnStatement struct {
	TableName      string
	ExistingColumn types.Column
	Column         types.Column
}

func (AlterModifyColumnStatement) DDL

type AlterRemoveConstrantStatement

type AlterRemoveConstrantStatement struct {
	TableName  string
	Constraint types.KeyConstraint
}

func (AlterRemoveConstrantStatement) 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()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL