directives

package
v0.7.10 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArgInfo

type ArgInfo argDirective

ArgInfo contains single wrapper function argument information in a statement.

func (*ArgInfo) ArgName

func (info *ArgInfo) ArgName() string

ArgName returns the argument's name.

func (*ArgInfo) ArgType

func (info *ArgInfo) ArgType() string

ArgType returns the argument's type.

type ArgsInfo

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

ArgsInfo contains wrapper function arguments information in a statement.

func ExtractArgsInfo

func ExtractArgsInfo(stmt *infos.StmtInfo) *ArgsInfo

ExtractArgsInfo extracts arg information from a statement or nil if not exists.

func (*ArgsInfo) Args

func (info *ArgsInfo) Args() []*ArgInfo

Args returns all ArgInfo in the statement.

func (*ArgsInfo) Valid

func (info *ArgsInfo) Valid() bool

Valid returns true if info != nil.

type VarsInfo

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

VarsInfo contains custom variables in a statement.

func ExtractVarsInfo

func ExtractVarsInfo(stmt *infos.StmtInfo) *VarsInfo

ExtractVarsInfo extracts custom var information from a statement or nil if not exists.

func (*VarsInfo) Has

func (info *VarsInfo) Has(name string) bool

Has returns true if the named var exists. It returns false if info is nil or not exists.

func (*VarsInfo) Valid

func (info *VarsInfo) Valid() bool

Valid returns true if info != nil

func (*VarsInfo) Value

func (info *VarsInfo) Value(name string) string

Value returns the named var's value. It returns "" if info is nil or not exists or the value is just "".

type WildcardInfo

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

WildcardInfo contains a single wildcard expansion information in a SELECT statement.

func (*WildcardInfo) Alias

func (info *WildcardInfo) Alias() string

Alias returns the optinal wildcard alias.

func (*WildcardInfo) CamelName

func (info *WildcardInfo) CamelName() string

CamelName is the camel case of WildcardName.

func (*WildcardInfo) Offset

func (info *WildcardInfo) Offset() int

Offset returns the offset of this wildcard expansion in query result columns. It returns -1 if info is nil.

func (*WildcardInfo) Table

func (info *WildcardInfo) Table() *infos.TableInfo

Table returns the wildcard table.

func (*WildcardInfo) Valid

func (info *WildcardInfo) Valid() bool

Valid returns true if info is not nil.

func (*WildcardInfo) WildcardName

func (info *WildcardInfo) WildcardName() string

WildcardName returns alias/table name.

type WildcardsInfo

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

WildcardsInfo contains wildcard expansions information in a SELECT statement.

func ExtractWildcardsInfo

func ExtractWildcardsInfo(stmt *infos.StmtInfo) *WildcardsInfo

ExtractWildcardsInfo extracts wildcards information from a statement or nil if not exists.

func (*WildcardsInfo) NumWildcard

func (info *WildcardsInfo) NumWildcard() int

NumWildcard returns the number of wildcards or 0 if info is nil.

func (*WildcardsInfo) ResultCol2Wildcard

func (info *WildcardsInfo) ResultCol2Wildcard(i int) *WildcardInfo

ResultCol2Wildcard returns the wildcard expansion of the i-th query result column. It returns nil if info is nil or i is out of range, or the i-th query result column is not from a wildcard expansion.

func (*WildcardsInfo) ResultCol2WildcardCol

func (info *WildcardsInfo) ResultCol2WildcardCol(i int) *infos.ColumnInfo

ResultCol2WildcardCol returns the wildcard column of the i-th query result column. It returns nil if info is nil or i is out of range, or the i-th query result column is not from a wildcard expansion.

func (*WildcardsInfo) SingleWildcard

func (info *WildcardsInfo) SingleWildcard() bool

SingleWildcard returns true if result columns of the statement are all from a single wildcard expansion.

func (*WildcardsInfo) Valid

func (info *WildcardsInfo) Valid() bool

Valid returns true if info != nil.

func (*WildcardsInfo) Wildcard

func (info *WildcardsInfo) Wildcard(i int) *WildcardInfo

Wildcard returns the i-th wildcard in the statement or nil if info is nil or i is out of range [0, NumWildcard()).

func (*WildcardsInfo) Wildcards

func (info *WildcardsInfo) Wildcards() []*WildcardInfo

Wildcards returns all WildcardInfo in a statement.

Jump to

Keyboard shortcuts

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