MCPcopy Create free account
hub / github.com/apecloud/myduckserver / getSimpleStringMatchingRegex

Function getSimpleStringMatchingRegex

pgserver/stmt.go:334–343  ·  view source on GitHub ↗

This function will return a regex that matches all type casts in the query.

()

Source from the content-addressed store, hash-verified

332
333 // column conversion
334 "proallargtypes": catalog.SchemaNameSYS + "." + catalog.MacroNameMySplitListStr + "(proallargtypes)",
335 "proargtypes": catalog.SchemaNameSYS + "." + catalog.MacroNameMySplitListStr + "(proargtypes)",
336}
337
338// This function will return a regex that matches all type casts in the query.
339func getSimpleStringMatchingRegex() *regexp.Regexp {
340 initSimpleStrMatchingRegex.Do(func() {
341 var simpleStrings []string
342 for simpleString := range simpleStringsConversion {
343 simpleStrings = append(simpleStrings, regexp.QuoteMeta(simpleString))
344 }
345 simpleStrMatchingRegex = regexp.MustCompile(`(?i)(` + strings.Join(simpleStrings, "|") + `)`)
346 })

Callers 2

SimpleStrReplacementFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected