postgres

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2025 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Type__bool

func Type__bool(f attrs.Field) string

func Type__datetime

func Type__datetime(f attrs.Field) string

func Type__float

func Type__float(f attrs.Field) string

func Type__int

func Type__int(f attrs.Field) string

func Type__string

func Type__string(f attrs.Field) string

Types

type PostgresSchemaEditor

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

func NewPostgresSchemaEditor

func NewPostgresSchemaEditor(db *sql.DB) *PostgresSchemaEditor

func (*PostgresSchemaEditor) AddField

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

func (*PostgresSchemaEditor) AddIndex

func (m *PostgresSchemaEditor) AddIndex(table migrator.Table, index migrator.Index) error

func (*PostgresSchemaEditor) AlterField

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

func (*PostgresSchemaEditor) CreateTable

func (m *PostgresSchemaEditor) CreateTable(table migrator.Table) error

func (*PostgresSchemaEditor) DropIndex

func (m *PostgresSchemaEditor) DropIndex(table migrator.Table, index migrator.Index) error

func (*PostgresSchemaEditor) DropTable

func (m *PostgresSchemaEditor) DropTable(table migrator.Table) 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(appName string, modelName string, migrationName string) (bool, error)

func (*PostgresSchemaEditor) RemoveField

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

func (*PostgresSchemaEditor) RemoveMigration

func (m *PostgresSchemaEditor) RemoveMigration(appName string, modelName string, migrationName string) error

func (*PostgresSchemaEditor) RenameIndex

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

func (*PostgresSchemaEditor) RenameTable

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

func (*PostgresSchemaEditor) Setup

func (m *PostgresSchemaEditor) Setup() error

func (*PostgresSchemaEditor) StoreMigration

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