sqlite

package
v0.17.7 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

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

func DropColumnStatement added in v0.13.3

func DropColumnStatement(tableName string, existingColumn types.Column) (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 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 RemoveIndexStatement(tableName string, index *types.Index) string

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 (s *SqliteConnection) ListTableIndexes(_ string, tableName string) ([]*types.Index, error)

func (*SqliteConnection) ListTables added in v0.13.3

func (s *SqliteConnection) ListTables() ([]*types.Table, error)

Jump to

Keyboard shortcuts

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