sqlite

package
v0.0.0-...-7301b28 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2025 License: GPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Type__blob

func Type__blob(c *migrator.Column) string

func Type__bool

func Type__bool(c *migrator.Column) string

func Type__datetime

func Type__datetime(c *migrator.Column) string

func Type__decimal

func Type__decimal(c *migrator.Column) string

func Type__float

func Type__float(c *migrator.Column) string

func Type__int

func Type__int(c *migrator.Column) string

func Type__string

func Type__string(c *migrator.Column) string

Types

type SQLiteSchemaEditor

type SQLiteSchemaEditor struct {
	// contains filtered or unexported fields
}

func NewSQLiteSchemaEditor

func NewSQLiteSchemaEditor(db drivers.Database) *SQLiteSchemaEditor

func (*SQLiteSchemaEditor) AddField

func (m *SQLiteSchemaEditor) AddField(ctx context.Context, table migrator.Table, col migrator.Column) error

func (*SQLiteSchemaEditor) AddIndex

func (m *SQLiteSchemaEditor) AddIndex(ctx context.Context, table migrator.Table, index migrator.Index, ifNotExists bool) error

func (*SQLiteSchemaEditor) AlterField

func (m *SQLiteSchemaEditor) AlterField(
	ctx context.Context,
	table migrator.Table,
	oldCol migrator.Column,
	newCol migrator.Column,
) error

func (*SQLiteSchemaEditor) CreateTable

func (m *SQLiteSchemaEditor) CreateTable(ctx context.Context, table migrator.Table, ifNotExists bool) error

func (*SQLiteSchemaEditor) DropIndex

func (m *SQLiteSchemaEditor) DropIndex(ctx context.Context, table migrator.Table, index migrator.Index, ifExists bool) error

func (*SQLiteSchemaEditor) DropTable

func (m *SQLiteSchemaEditor) DropTable(ctx context.Context, table migrator.Table, ifExists bool) error

func (*SQLiteSchemaEditor) Execute

func (m *SQLiteSchemaEditor) Execute(ctx context.Context, query string, args ...any) (sql.Result, error)

func (*SQLiteSchemaEditor) HasMigration

func (m *SQLiteSchemaEditor) HasMigration(ctx context.Context, appName string, modelName string, migrationName string) (bool, error)

func (*SQLiteSchemaEditor) RemoveField

func (m *SQLiteSchemaEditor) RemoveField(ctx context.Context, table migrator.Table, col migrator.Column) error

func (*SQLiteSchemaEditor) RemoveMigration

func (m *SQLiteSchemaEditor) RemoveMigration(ctx context.Context, appName string, modelName string, migrationName string) error

func (*SQLiteSchemaEditor) RenameIndex

func (m *SQLiteSchemaEditor) RenameIndex(ctx context.Context, table migrator.Table, oldName string, newName string) error

func (*SQLiteSchemaEditor) RenameTable

func (m *SQLiteSchemaEditor) RenameTable(ctx context.Context, table migrator.Table, newName string) error

func (*SQLiteSchemaEditor) Setup

func (m *SQLiteSchemaEditor) Setup(ctx context.Context) error

func (*SQLiteSchemaEditor) StartTransaction

func (m *SQLiteSchemaEditor) StartTransaction(ctx context.Context) (drivers.Transaction, error)

func (*SQLiteSchemaEditor) StoreMigration

func (m *SQLiteSchemaEditor) StoreMigration(ctx context.Context, appName string, modelName string, migrationName string) error

func (*SQLiteSchemaEditor) WriteColumn

func (m *SQLiteSchemaEditor) WriteColumn(w *strings.Builder, col migrator.Column)

Jump to

Keyboard shortcuts

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