MCPcopy Create free account
hub / github.com/datastax/cql-proxy / IdentifierFromString

Function IdentifierFromString

parser/identifier.go:26–33  ·  view source on GitHub ↗

IdentifierFromString creates an identifier from a string

(id string)

Source from the content-addressed store, hash-verified

24
25// IdentifierFromString creates an identifier from a string
26func IdentifierFromString(id string) Identifier {
27 l := len(id)
28 if l > 0 && id[0] == '"' {
29 return Identifier{id: id[1 : l-1], ignoreCase: false}
30 } else {
31 return Identifier{id: id, ignoreCase: true}
32 }
33}
34
35// correctly compares an identifier with a string
36func (i Identifier) equal(id string) bool {

Callers 9

benchmarkIsQueryHandledFunction · 0.92
handlePrepareMethod · 0.92
handleQueryMethod · 0.92
interceptSystemQueryMethod · 0.92
InterceptQueryMethod · 0.92
TestParserFunction · 0.85
identifierMethod · 0.85

Calls

no outgoing calls

Tested by 3

TestParserFunction · 0.68