code

package
v0.79.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: BSD-2-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EndType added in v0.61.0

func EndType(w1, w2 io.Writer, view View)

func ImportsForFields

func ImportsForFields(table *schema.TableDescription, packages collection.StringSet)

func ImportsForSetters

func ImportsForSetters(setters schema.FieldList, packages collection.StringSet)

func WriteConstructInsert

func WriteConstructInsert(w io.Writer, view View)

func WriteConstructUpdate

func WriteConstructUpdate(w io.Writer, view View)

func WriteCountRowsFuncs added in v0.49.0

func WriteCountRowsFuncs(w1, w2 io.Writer, view View)

func WriteDeleteFunc

func WriteDeleteFunc(w1, w2 io.Writer, view View)

func WriteExecFunc

func WriteExecFunc(w1, w2 io.Writer, view View)

func WriteGetRow

func WriteGetRow(w1, w2 io.Writer, view View)

func WriteImports

func WriteImports(w io.Writer, packages collection.StringSet)

func WriteInsertFunc

func WriteInsertFunc(w1, w2 io.Writer, view View)

func WritePackageHeader

func WritePackageHeader(w io.Writer, name, version string)

func WritePrimaryDeclarations

func WritePrimaryDeclarations(w io.Writer, view View)

func WriteQueryRows

func WriteQueryRows(w1, w2 io.Writer, view View)

func WriteQueryThings

func WriteQueryThings(w1, w2 io.Writer, view View)

func WriteScanRows

func WriteScanRows(w io.Writer, view View)

func WriteSchemaDeclarations

func WriteSchemaDeclarations(w io.Writer, view View)

func WriteSchemaFunctions

func WriteSchemaFunctions(w1, w2 io.Writer, view View)

func WriteSelectRowsFuncs

func WriteSelectRowsFuncs(w1, w2 io.Writer, view View)

func WriteSetters

func WriteSetters(w1, w2 io.Writer, view View, fields schema.FieldList)

func WriteSliceColumn

func WriteSliceColumn(w1, w2 io.Writer, view View)

func WriteType

func WriteType(w1, w2, w3 io.Writer, view View)

func WriteUpdateFunc

func WriteUpdateFunc(w1, w2 io.Writer, view View)

func WriteUpsertFunc added in v0.49.0

func WriteUpsertFunc(w1, w2 io.Writer, view View)

Types

type ConstView

type ConstView struct {
	Name string
	Body interface{}
}

type SetterView

type SetterView struct {
	TypePkg string
	Type    string
	Setter  *schema.Field
}

type View

type View struct {
	TypePkg        string
	TablePkg       string
	Prefix         string
	Type           string
	Types          string
	DbName         string
	HasConstraints bool
	Thing          string
	Thinger        string
	Interface1     string
	List           string
	Suffix         string
	Sql            string
	Sqlapi         string
	Scan           string
	Body1          []string
	Body2          []string
	Body3          []string
	Dialects       []driver.Dialect
	Table          *schema.TableDescription
	Setter         *schema.Field
}

func NewView

func NewView(typePkg, tablePkg, name, prefix, tableName, list, sql, api string) View

func (View) CamelName

func (v View) CamelName() string

func (View) Constraints

func (v View) Constraints() (list constraint.Constraints)

func (View) FilterSetters

func (v View) FilterSetters(genSetters string) schema.FieldList

Jump to

Keyboard shortcuts

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