Documentation ¶
Index ¶
- Constants
- func New(name, prefix string) tpl.SQLTemplate
- type MssqlContext
- func (ctx *MssqlContext) AnalyzeTPL(template string, input map[string]interface{}, ph tpl.Placeholder) (string, *tpl.ReplaceItem, error)
- func (ctx *MssqlContext) GetSQLContext(template string, input map[string]interface{}) (query string, args []any, err error)
- func (ctx *MssqlContext) Name() string
- func (ctx *MssqlContext) Placeholder() tpl.Placeholder
- func (ctx *MssqlContext) RegisterOperator(oper tpl.Operator) error
- func (ctx *MssqlContext) RegisterSymbol(symbol tpl.Symbol) error
Constants ¶
View Source
const ArgumentPrefix = "p_"
View Source
const Proto = "sqlserver"
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(name, prefix string) tpl.SQLTemplate
Types ¶
type MssqlContext ¶
type MssqlContext struct {
// contains filtered or unexported fields
}
MssqlContext 模板
func (*MssqlContext) AnalyzeTPL ¶
func (ctx *MssqlContext) AnalyzeTPL(template string, input map[string]interface{}, ph tpl.Placeholder) (string, *tpl.ReplaceItem, error)
func (*MssqlContext) GetSQLContext ¶
func (ctx *MssqlContext) GetSQLContext(template string, input map[string]interface{}) (query string, args []any, err error)
GetSQLContext 获取查询串
func (*MssqlContext) Name ¶
func (ctx *MssqlContext) Name() string
func (*MssqlContext) Placeholder ¶
func (ctx *MssqlContext) Placeholder() tpl.Placeholder
func (*MssqlContext) RegisterOperator ¶ added in v0.5.1
func (ctx *MssqlContext) RegisterOperator(oper tpl.Operator) error
func (*MssqlContext) RegisterSymbol ¶ added in v0.5.0
func (ctx *MssqlContext) RegisterSymbol(symbol tpl.Symbol) error
Click to show internal directories.
Click to hide internal directories.