sqlserver

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: MIT Imports: 9 Imported by: 3

Documentation

Index

Constants

View Source
const ArgumentPrefix = "p_"
View Source
const Proto = "sqlserver"

Variables

This section is empty.

Functions

func New

func New(name, prefix string, matcher xdb.TemplateMatcher) xdb.SQLTemplate

func NewSqlState added in v0.7.0

func NewSqlState(placeHolder xdb.Placeholder) xdb.SqlState

新建一个SqlState

Types

type MssqlSqlState added in v0.7.0

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

func (*MssqlSqlState) AppendExpr added in v0.7.0

func (s *MssqlSqlState) AppendExpr(propName string, value any) (phName string)

func (*MssqlSqlState) BuildCache added in v0.7.0

func (s *MssqlSqlState) BuildCache(sql string) xdb.ExpressionCache

func (*MssqlSqlState) CanCache added in v0.7.0

func (s *MssqlSqlState) CanCache() bool

func (*MssqlSqlState) GetNames added in v0.7.0

func (s *MssqlSqlState) GetNames() []string

func (*MssqlSqlState) GetValues added in v0.7.0

func (s *MssqlSqlState) GetValues() []any

func (*MssqlSqlState) HasDynamic added in v0.7.0

func (s *MssqlSqlState) HasDynamic(dynamicType xdb.DynamicType) bool

func (*MssqlSqlState) Reset added in v0.7.0

func (s *MssqlSqlState) Reset()

func (*MssqlSqlState) SetDynamic added in v0.7.0

func (s *MssqlSqlState) SetDynamic(dynamicType xdb.DynamicType)

func (*MssqlSqlState) UseExprCache added in v0.7.0

func (s *MssqlSqlState) UseExprCache() bool

func (*MssqlSqlState) WithPlaceholder added in v0.7.0

func (s *MssqlSqlState) WithPlaceholder(placeholder xdb.Placeholder)

func (*MssqlSqlState) WithTemplateOptions added in v0.7.0

func (s *MssqlSqlState) WithTemplateOptions(tplOpts *xdb.TemplateOptions)

type MssqlTemplate added in v0.7.0

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

MssqlTemplate 模板

func (*MssqlTemplate) GetSQLContext added in v0.7.0

func (template *MssqlTemplate) GetSQLContext(sqlTpl string, input map[string]any, opts ...xdb.TemplateOption) (query string, args []any, err error)

GetSQLContext 获取查询串

func (*MssqlTemplate) GetSqlState added in v0.7.0

func (template *MssqlTemplate) GetSqlState(tplOpts *xdb.TemplateOptions) xdb.SqlState

func (*MssqlTemplate) HandleExpr added in v0.7.0

func (template *MssqlTemplate) HandleExpr(item xdb.SqlState, sqlTpl string, input xdb.DBParam) (sql string, err error)

func (*MssqlTemplate) Name added in v0.7.0

func (template *MssqlTemplate) Name() string

func (*MssqlTemplate) Placeholder added in v0.7.0

func (template *MssqlTemplate) Placeholder() xdb.Placeholder

func (*MssqlTemplate) RegistExpressionMatcher added in v0.7.0

func (template *MssqlTemplate) RegistExpressionMatcher(matchers ...xdb.ExpressionMatcher)

func (*MssqlTemplate) ReleaseSqlState added in v0.7.0

func (template *MssqlTemplate) ReleaseSqlState(state xdb.SqlState)

Jump to

Keyboard shortcuts

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