MCPcopy
hub / github.com/sqlc-dev/sqlc / hasMixedCase

Function hasMixedCase

internal/engine/postgresql/reserved.go:10–17  ·  view source on GitHub ↗

hasMixedCase returns true if the string has any uppercase letters (identifiers with mixed case need quoting in PostgreSQL)

(s string)

Source from the content-addressed store, hash-verified

8// hasMixedCase returns true if the string has any uppercase letters
9// (identifiers with mixed case need quoting in PostgreSQL)
10func hasMixedCase(s string) bool {
11 for _, r := range s {
12 if r >= 'A' && r <= 'Z' {
13 return true
14 }
15 }
16 return false
17}
18
19// QuoteIdent returns a quoted identifier if it needs quoting.
20// This implements the format.Dialect interface.

Callers 1

QuoteIdentMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected