table

package
v1.2.10 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeTable

func ChangeTable(name string, con *sqlx.DB) contract.Table

func DropTable

func DropTable(name string, con *sqlx.DB) contract.Table

func NewTable

func NewTable(name string, con *sqlx.DB) contract.Table

func RenameTable

func RenameTable(oldName, newName string, con *sqlx.DB) contract.Table

Types

type Table

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

func (*Table) Column

func (t *Table) Column(name string) contract.Column

Functions for table columns

func (*Table) DropColumn

func (t *Table) DropColumn(name string) contract.Column

func (*Table) DropForeignKey

func (t *Table) DropForeignKey(name string) contract.Table

func (*Table) Exec

func (t *Table) Exec() error

Execution functions

func (*Table) ForeignKey

func (t *Table) ForeignKey(Column string) contract.ForeignKey

func (*Table) GetSQL

func (t *Table) GetSQL() string

Generate SQL functions

func (*Table) Integer

func (t *Table) Integer(name string) contract.Column

func (*Table) MustExec

func (t *Table) MustExec()

func (*Table) PrimaryKey

func (t *Table) PrimaryKey(Column string) contract.Column

Functions for keys

func (*Table) RenameColumn

func (t *Table) RenameColumn(oldName, newName string) contract.Column

func (*Table) String

func (t *Table) String(name string, length int) contract.Column

func (*Table) WithTimestamps

func (t *Table) WithTimestamps() contract.Table

Jump to

Keyboard shortcuts

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