MCPcopy
hub / github.com/uber/aresdb / isWithQueryIdentifier

Method isWithQueryIdentifier

query/sql/sql_parser.go:1909–1919  ·  view source on GitHub ↗

isWithQueryIdentifier check if name is a withQuery identifier

(s2aCtx *SQL2AqlContext, name string)

Source from the content-addressed store, hash-verified

1907
1908// isWithQueryIdentifier check if name is a withQuery identifier
1909func (v *ASTBuilder) isWithQueryIdentifier(s2aCtx *SQL2AqlContext, name string) bool {
1910 withKeyMin := v.generateKey(1, typeWithQuery, 0)
1911 if s2aCtx.queryIdentifierSet != nil {
1912 k, exist := s2aCtx.queryIdentifierSet[name]
1913 if exist && k/withKeyMin == 1 {
1914 return true
1915 }
1916 }
1917
1918 return false
1919}
1920
1921// isSubOrWithQueryIdentifier check if name is a subquery/withQuery identifier
1922func (v *ASTBuilder) isSubOrWithQueryIdentifier(s2aCtx *SQL2AqlContext, name string) int {

Callers 1

VisitTableNameMethod · 0.95

Calls 1

generateKeyMethod · 0.95

Tested by

no test coverage detected