Documentation
¶
Index ¶
- Constants
- func ExtractParameterHints(text string) option.ParameterHints
- func GetHolderName(identifier string) (string, string)
- func RemoveParameterHints(text string, hints option.ParameterHints) string
- func Sanitize(SQL string, hints option.ParameterHints) string
- func SplitHint(hint string) (marshal string, SQL string)
- type Context
- type ParamContext
- type ParamMatcher
- type ParamMeta
- type ParamMetaIterator
- type ParamMetaType
- type ParamNameHandler
Constants ¶
View Source
const ( InKeyword = "in" OrKeyword = "or" AndKeyword = "and" )
Variables ¶
This section is empty.
Functions ¶
func ExtractParameterHints ¶
func ExtractParameterHints(text string) option.ParameterHints
func GetHolderName ¶
func RemoveParameterHints ¶
func RemoveParameterHints(text string, hints option.ParameterHints) string
Types ¶
type ParamContext ¶
func NewParamContext ¶
func NewParamContext(name string, context Context) *ParamContext
type ParamMatcher ¶
type ParamMatcher struct {
// contains filtered or unexported fields
}
func NewParamMatcher ¶
func NewParamMatcher() *ParamMatcher
func (*ParamMatcher) TryMatchParam ¶
func (p *ParamMatcher) TryMatchParam(cursor *parsly.Cursor) (string, int)
type ParamMetaIterator ¶
type ParamMetaIterator struct {
SQL string
// contains filtered or unexported fields
}
func NewIterator ¶
func NewIterator(SQL string, hints option.ParameterHints) *ParamMetaIterator
func (*ParamMetaIterator) Has ¶
func (i *ParamMetaIterator) Has() bool
func (*ParamMetaIterator) Next ¶
func (i *ParamMetaIterator) Next() *ParamMeta
Click to show internal directories.
Click to hide internal directories.