builders

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	Create(c core.Context, name string, blueprint func(table *blueprint.Blueprint)) error
	Table(c core.Context, name string, blueprint func(table *blueprint.Blueprint)) error
	Drop(c core.Context, name string) error
	DropIfExists(c core.Context, name string) error
	Rename(c core.Context, from, to string) error
	HasTable(c core.Context, name string) (bool, error)
	HasColumn(c core.Context, table, column string) (bool, error)
	HasColumns(c core.Context, table string, columns []string) (bool, error)
	HasIndex(c core.Context, table string, columns []string) (bool, error)
	GetColumns(c core.Context, table string) ([]*core.Column, error)
	GetIndexes(c core.Context, table string) ([]*core.Index, error)
	GetTables(c core.Context) ([]*core.TableInfo, error)
}

Builder is an interface that defines methods for creating, dropping, and managing database tables.

func NewBuilder

func NewBuilder(dialectValue string) (Builder, error)

func NewMariadbBuilder

func NewMariadbBuilder() Builder

func NewMysqlBuilder

func NewMysqlBuilder() Builder

func NewPostgresBuilder

func NewPostgresBuilder() Builder

func NewSqliteBuilder

func NewSqliteBuilder() Builder

Jump to

Keyboard shortcuts

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