MCPcopy
hub / github.com/pingcap/tidb / wrapBackTicks

Function wrapBackTicks

dumpling/export/writer_util.go:584–589  ·  view source on GitHub ↗
(identifier string)

Source from the content-addressed store, hash-verified

582}
583
584func wrapBackTicks(identifier string) string {
585 if !strings.HasPrefix(identifier, "`") && !strings.HasSuffix(identifier, "`") {
586 return wrapStringWith(identifier, "`")
587 }
588 return identifier
589}
590
591func wrapStringWith(str string, wrapper string) string {
592 return fmt.Sprintf("%s%s%s", wrapper, str, wrapper)

Callers 4

buildSelectFieldFunction · 0.85
WriteInsertFunction · 0.85
setTableMetaFromRowsFunction · 0.85

Calls 2

wrapStringWithFunction · 0.85
HasPrefixMethod · 0.80

Tested by 1