postgres

package
v0.0.0-...-65700c5 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2025 License: GPL-2.0 Imports: 12 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__char

func Type__char(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__localtime

func Type__localtime(c *migrator.Column) string

func Type__string

func Type__string(c *migrator.Column) string

func Type__timestamp

func Type__timestamp(c *migrator.Column) string

func Type__ulid

func Type__ulid(c *migrator.Column) string

func Type__uuid

func Type__uuid(c *migrator.Column) string

Types

type PostgresSchemaEditor

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

func NewPostgresSchemaEditor

func NewPostgresSchemaEditor(db drivers.Database) *PostgresSchemaEditor

func (*PostgresSchemaEditor) AddField

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

func (*PostgresSchemaEditor) AddIndex

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

func (*PostgresSchemaEditor) AlterField

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

func (*PostgresSchemaEditor) CreateTable

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

func (*PostgresSchemaEditor) DropIndex

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

func (*PostgresSchemaEditor) DropTable

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

func (*PostgresSchemaEditor) Execute

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

func (*PostgresSchemaEditor) HasMigration

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

func (*PostgresSchemaEditor) QueryRow

func (m *PostgresSchemaEditor) QueryRow(ctx context.Context, query string, args ...any) drivers.SQLRow

func (*PostgresSchemaEditor) RemoveField

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

func (*PostgresSchemaEditor) RemoveMigration

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

func (*PostgresSchemaEditor) RenameIndex

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

func (*PostgresSchemaEditor) RenameTable

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

func (*PostgresSchemaEditor) Setup

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

func (*PostgresSchemaEditor) StartTransaction

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

func (*PostgresSchemaEditor) StoreMigration

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

func (*PostgresSchemaEditor) WriteColumn

func (m *PostgresSchemaEditor) 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