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

Method generateKey

query/sql/sql_parser.go:1725–1727  ·  view source on GitHub ↗

generateKey constructs mapKey based on levelQuery and index of the query at the current levelQuery

(qLevel, qType, index int)

Source from the content-addressed store, hash-verified

1723
1724// generateKey constructs mapKey based on levelQuery and index of the query at the current levelQuery
1725func (v *ASTBuilder) generateKey(qLevel, qType, index int) int {
1726 return qLevel*1000 + qType*100 + index
1727}
1728
1729func (v *ASTBuilder) getInfoByKey(mapKey int) (qLevel, qType, index int) {
1730 qLevel = mapKey / 1000

Callers 8

VisitWithMethod · 0.95
VisitAliasedRelationMethod · 0.95
VisitSubqueryRelationMethod · 0.95
isValidWithOrSubQueryMethod · 0.95
isSameFromTablesMethod · 0.95
isSameGroupByMethod · 0.95
isSameOrderByMethod · 0.95
isWithQueryIdentifierMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected