Documentation
¶
Index ¶
- type ChildrenNode
- type ChooseNode
- type ConditionStmt
- type Context
- type Data
- type DataNode
- type DynamicStmt
- type ForeachNode
- type IBatisData
- type IfNode
- type IncludeNode
- type IterateStmt
- type Mapper
- type Mappers
- type MyBatisData
- type Node
- type OtherwiseNode
- type Param
- type PropertyNode
- type QueryNode
- type SqlNode
- type StmtInfo
- type TrimNode
- type Value
- type Variable
- type WhenNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChildrenNode ¶
type ChildrenNode struct {
Children []Node
}
func NewNode ¶
func NewNode() *ChildrenNode
func (*ChildrenNode) AddChildren ¶
func (n *ChildrenNode) AddChildren(ns ...Node) error
type ChooseNode ¶
type ChooseNode struct { When []*WhenNode Otherwise *OtherwiseNode }
func NewChooseNode ¶
func NewChooseNode() *ChooseNode
func (*ChooseNode) AddChildren ¶
func (n *ChooseNode) AddChildren(ns ...Node) error
func (*ChooseNode) Scan ¶
func (n *ChooseNode) Scan(start *xml.StartElement) error
type ConditionStmt ¶ added in v0.2.0
type ConditionStmt struct { *ChildrenNode // contains filtered or unexported fields }
func NewConditionStmt ¶ added in v0.2.0
func NewConditionStmt() *ConditionStmt
func (*ConditionStmt) GetStmt ¶ added in v0.2.0
func (n *ConditionStmt) GetStmt(ctx *Context) (string, error)
func (*ConditionStmt) Scan ¶ added in v0.2.0
func (n *ConditionStmt) Scan(start *xml.StartElement) error
type Context ¶
type Context struct { QueryType string // select, insert, update, delete Variable map[string]string Sqls map[string]*SqlNode DefaultNamespace string // namespace of current mapper }
func NewContext ¶
func NewContext() *Context
func (*Context) SetVariable ¶
type Data ¶
type Data struct { Nodes []DataNode // contains filtered or unexported fields }
func (*Data) AddChildren ¶
type DynamicStmt ¶ added in v0.2.0
type DynamicStmt struct { *ChildrenNode // contains filtered or unexported fields }
func NewDynamicStmt ¶ added in v0.2.0
func NewDynamicStmt() *DynamicStmt
func (*DynamicStmt) GetStmt ¶ added in v0.2.0
func (n *DynamicStmt) GetStmt(ctx *Context) (string, error)
func (*DynamicStmt) Scan ¶ added in v0.2.0
func (n *DynamicStmt) Scan(start *xml.StartElement) error
type ForeachNode ¶
type ForeachNode struct { *ChildrenNode Open string Close string Separator string }
func NewForeachNode ¶
func NewForeachNode() *ForeachNode
func (*ForeachNode) Scan ¶
func (n *ForeachNode) Scan(start *xml.StartElement) error
type IBatisData ¶ added in v0.2.0
type IBatisData struct {
*Data
}
func NewIBatisData ¶ added in v0.2.0
func NewIBatisData(data []byte) *IBatisData
func (*IBatisData) ScanData ¶ added in v0.2.0
func (d *IBatisData) ScanData() error
type IfNode ¶
type IfNode struct { *ChildrenNode Expression string }
type IncludeNode ¶
type IncludeNode struct { RefId DataNode Properties map[string]*PropertyNode }
func NewIncludeNode ¶
func NewIncludeNode() *IncludeNode
func (*IncludeNode) AddChildren ¶
func (i *IncludeNode) AddChildren(ns ...Node) error
func (*IncludeNode) Scan ¶
func (i *IncludeNode) Scan(start *xml.StartElement) error
type IterateStmt ¶ added in v0.2.0
type IterateStmt struct { *ForeachNode // contains filtered or unexported fields }
func NewIterateStmt ¶ added in v0.2.0
func NewIterateStmt() *IterateStmt
func (*IterateStmt) GetStmt ¶ added in v0.2.0
func (n *IterateStmt) GetStmt(ctx *Context) (string, error)
func (*IterateStmt) Scan ¶ added in v0.2.0
func (n *IterateStmt) Scan(start *xml.StartElement) error
type Mapper ¶
type Mapper struct { NameSpace string SqlNodes map[string]*SqlNode QueryNodeIndex map[string]*QueryNode QueryNodes []*QueryNode FilePath string // contains filtered or unexported fields }
func (*Mapper) AddChildren ¶
type Mappers ¶ added in v0.4.0
type Mappers struct {
// contains filtered or unexported fields
}
func NewMappers ¶ added in v0.4.0
func NewMappers() *Mappers
type MyBatisData ¶ added in v0.2.0
type MyBatisData struct {
*Data
}
func NewMyBatisData ¶ added in v0.2.0
func NewMyBatisData(data []byte) *MyBatisData
func (*MyBatisData) ScanData ¶ added in v0.2.0
func (d *MyBatisData) ScanData() error
type OtherwiseNode ¶
type OtherwiseNode struct {
*ChildrenNode
}
func NewOtherwiseNode ¶
func NewOtherwiseNode() *OtherwiseNode
func (*OtherwiseNode) Scan ¶
func (n *OtherwiseNode) Scan(start *xml.StartElement) error
type PropertyNode ¶
func NewPropertyNode ¶
func NewPropertyNode() *PropertyNode
func (*PropertyNode) AddChildren ¶
func (p *PropertyNode) AddChildren(ns ...Node) error
func (*PropertyNode) Scan ¶
func (p *PropertyNode) Scan(start *xml.StartElement) error
type QueryNode ¶
type QueryNode struct { *ChildrenNode Id string Type string }
func NewQueryNode ¶
func NewQueryNode() *QueryNode
type SqlNode ¶
type SqlNode struct { *ChildrenNode Id string }
func NewSqlNode ¶
func NewSqlNode() *SqlNode
type TrimNode ¶
type TrimNode struct { *ChildrenNode Name string Prefix string Suffix string PrefixOverrides []string SuffixOverrides []string }
func NewTrimNode ¶
func NewTrimNode() *TrimNode
type WhenNode ¶
type WhenNode struct { *ChildrenNode Expression string }
func NewWhenNode ¶
func NewWhenNode() *WhenNode
Click to show internal directories.
Click to hide internal directories.