Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Arg ¶
type Arg struct { // argument name Name string `json:"name"` // argument value for sample query Sample string `json:"example"` // Dynamic arguments become "?" in the query and are provided at runtime. // Static arguments are identifiers and have to be known at query construction time // (e.g. table and schema name) Dynamic bool `json:"dynamic,omitempty"` // argument should be quoted Quoted bool `json:"quote,omitempty"` // argument type (string by default) Type reflect.Type `json:"-"` // alternatives ValueType interface{} `json:"-"` Values map[string]interface{} `json:"-"` // description Comment string `json:"-"` }
Arg represents an argument in a MySQL query
type Arglist ¶
type Arglist []*Arg
Arglist represents a sequence of arguments
func (Arglist) Declaration ¶
func (Arglist) QuotedNames ¶
type Query ¶
type Query []interface{}
Query represents a Query a struct should be generated for. It contains the name of the struct to be created as its first argument. The name may be followed by an optional map[int]string to override field names of the respective column indices. Following that are parts of the SQL (string) and Arg or *Arg (parameters).
func (Query) StructName ¶
type TemplateColumn ¶
type TemplateColumn struct { mysqlinternals.Column // contains filtered or unexported fields }
TemplateColumn contains all available information for a column retrievable from a mysql response. nameOverride is filled with the name to use if the one provided by MySQL should not be used
func (TemplateColumn) Bindable ¶
func (c TemplateColumn) Bindable() bool
func (TemplateColumn) Declaration ¶
func (c TemplateColumn) Declaration() (decl string, err error)
func (TemplateColumn) Goname ¶
func (c TemplateColumn) Goname() string
func (TemplateColumn) Name ¶
func (c TemplateColumn) Name() string
Click to show internal directories.
Click to hide internal directories.