language

package
v0.0.0-...-72f7963 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Error = errors.NewClass("language")
)

Functions

func GolangArgName

func GolangArgName(column *dbx.Column) string

func GolangFieldInit

func GolangFieldInit(column *dbx.Column) string

func GolangFieldName

func GolangFieldName(column *dbx.Column) string

func GolangFieldTag

func GolangFieldTag(column *dbx.Column) string

func GolangFieldType

func GolangFieldType(column *dbx.Column) string

func GolangFuncSuffix

func GolangFuncSuffix(table *dbx.Table, args []GolangArg) (suffix string)

func GolangStructName

func GolangStructName(table *dbx.Table) string

Types

type Golang

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

func NewGolang

func NewGolang(loader dbx.Loader, options *GolangOptions) (*Golang, error)

func (*Golang) Format

func (g *Golang) Format(in []byte) (out []byte, err error)

func (*Golang) Name

func (g *Golang) Name() string

func (*Golang) RenderCount

func (g *Golang) RenderCount(w io.Writer, dialects []dbx.Dialect,
	params *dbx.SelectParams) (err error)

func (*Golang) RenderDelete

func (g *Golang) RenderDelete(w io.Writer, dialects []dbx.Dialect,
	params *dbx.DeleteParams) (err error)

func (*Golang) RenderFooter

func (g *Golang) RenderFooter(w io.Writer) (err error)

func (*Golang) RenderHeader

func (g *Golang) RenderHeader(w io.Writer, dialects []dbx.Dialect,
	schema *dbx.Schema) (err error)

func (*Golang) RenderInsert

func (g *Golang) RenderInsert(w io.Writer, dialects []dbx.Dialect,
	params *dbx.InsertParams) (err error)

func (*Golang) RenderSelect

func (g *Golang) RenderSelect(w io.Writer, dialects []dbx.Dialect,
	params *dbx.SelectParams) (err error)

func (*Golang) RenderUpdate

func (g *Golang) RenderUpdate(w io.Writer, dialects []dbx.Dialect,
	params *dbx.UpdateParams) (err error)

type GolangArg

type GolangArg struct {
	Name string
	Type string
	// contains filtered or unexported fields
}

func GolangArgFromColumn

func GolangArgFromColumn(column *dbx.Column) GolangArg

func GolangArgsFromColumns

func GolangArgsFromColumns(columns []*dbx.Column) (out []GolangArg)

func GolangArgsFromConditions

func GolangArgsFromConditions(conditions []*dbx.ConditionParams) (
	out []GolangArg)

type GolangAutoParam

type GolangAutoParam struct {
	Name   string
	Init   string
	Column string
	// contains filtered or unexported fields
}

type GolangField

type GolangField struct {
	Name   string
	Type   string
	Tag    string
	Column string
}

type GolangFunc

type GolangFunc struct {
	GolangFuncBase
	Dialect string
	SQL     string
}

func MakeGolangFunc

func MakeGolangFunc(base GolangFuncBase, dialect, sql string) GolangFunc

type GolangFuncBase

type GolangFuncBase struct {
	Struct     string
	FuncSuffix string
	Args       []GolangArg
}

func MakeGolangFuncBase

func MakeGolangFuncBase(table *dbx.Table, args []GolangArg) GolangFuncBase

type GolangInsert

type GolangInsert struct {
	GolangFunc
	ReturnBy *GolangReturnBy
	NeedsNow bool
	Inserts  []GolangArg
	Autos    []GolangAutoParam
}

type GolangInsertBase

type GolangInsertBase struct {
	GolangFuncBase
	Inserts []GolangArg
}

type GolangOptions

type GolangOptions struct {
	Package string
}

type GolangReturnBy

type GolangReturnBy struct {
	Pk     string
	Getter *GolangFuncBase
}

type GolangSelect

type GolangSelect struct {
	GolangFunc
	PagedOn string
}

type GolangStruct

type GolangStruct struct {
	Name            string
	Fields          []GolangField
	Updatable       bool
	UpdatableFields []GolangField
}

type GolangUpdate

type GolangUpdate struct {
	GolangFunc
	SupportsReturning bool
	NeedsNow          bool
	Autos             []GolangAutoParam
}

Jump to

Keyboard shortcuts

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