MCPcopy Create free account
hub / github.com/PostHog/duckgres / quoteIdentifier

Function quoteIdentifier

transpiler/transform/writablecte.go:959–963  ·  view source on GitHub ↗

quoteIdentifier quotes an identifier for safe use in SQL

(name string)

Source from the content-addressed store, hash-verified

957
958// quoteIdentifier quotes an identifier for safe use in SQL
959func quoteIdentifier(name string) string {
960 // Double any existing quotes and wrap in quotes
961 escaped := strings.ReplaceAll(name, `"`, `""`)
962 return `"` + escaped + `"`
963}

Callers 2

rewriteWritableCTEMethod · 0.70
buildTableRefMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected