create

package
v0.0.0-...-28ac8a9 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

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

func (*Database) Execute

func (d *Database) Execute() (sql.Result, error)

type DatabaseService

type DatabaseService interface {
	Service
}

func NewDatabase

func NewDatabase(name string, db *sql.DB) DatabaseService

type Service

type Service interface {
	Execute() (sql.Result, error)
	// contains filtered or unexported methods
}

type Table

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

func (*Table) Execute

func (t *Table) Execute() (sql.Result, error)

func (*Table) Field

func (t *Table) Field(name string, dataType *query.DataType, constrain *query.Constrain) *Table

func (*Table) NewForeignKeyConstrain

func (t *Table) NewForeignKeyConstrain(constrain, foreignKey, fkTable string) *Table

func (*Table) SetForeignKey

func (t *Table) SetForeignKey(onUpdate, onDelete interface{}) *Table

SetForeignKey set the foreign key on the table.

func (*Table) SetPrimaryKey

func (t *Table) SetPrimaryKey(fields []string) *Table

SetPrimaryKey function used to set the PK to multiple columns.

type TableService

type TableService interface {
	Field(name string, dataType *query.DataType, constrain *query.Constrain) *Table
	SetPrimaryKey(fields []string) *Table
	NewForeignKeyConstrain(constrain, foreignKey, fkTable string) *Table
	SetForeignKey(onUpdate, onDelete interface{}) *Table
	Service
}

func NewTable

func NewTable(name string, db *sql.DB) TableService

Jump to

Keyboard shortcuts

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