MCPcopy Create free account
hub / github.com/bytebase/bytebase / identifierKey

Function identifierKey

backend/plugin/parser/tidb/backup.go:167–172  ·  view source on GitHub ↗

identifierKey normalizes an identifier for use as a map key/lookup, honoring the instance's case sensitivity. TiDB resolves table-name and alias qualifiers case-insensitively by default, so a case-mismatched reference (UPDATE test AS T SET t.c = ...) must still resolve to the same table.

(name string, isCaseSensitive bool)

Source from the content-addressed store, hash-verified

165// qualifiers case-insensitively by default, so a case-mismatched reference
166// (UPDATE test AS T SET t.c = ...) must still resolve to the same table.
167func identifierKey(name string, isCaseSensitive bool) string {
168 if isCaseSensitive {
169 return name
170 }
171 return strings.ToLower(name)
172}
173
174// requireTargets fails when a recognized DML statement yields no backup target.
175// Returning an empty list with no error would let the task executor treat the

Callers 3

extractTablesFromDeleteFunction · 0.85
extractTablesFromUpdateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected