MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / bindQueryPart

Method bindQueryPart

src/binder/bind/bind_query.cpp:89–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87}
88
89NormalizedQueryPart Binder::bindQueryPart(const QueryPart& queryPart) {
90 auto normalizedQueryPart = NormalizedQueryPart();
91 for (auto i = 0u; i < queryPart.getNumReadingClauses(); i++) {
92 normalizedQueryPart.addReadingClause(bindReadingClause(*queryPart.getReadingClause(i)));
93 }
94 for (auto i = 0u; i < queryPart.getNumUpdatingClauses(); ++i) {
95 normalizedQueryPart.addUpdatingClause(bindUpdatingClause(*queryPart.getUpdatingClause(i)));
96 }
97 auto boundWithClause = bindWithClause(*queryPart.getWithClause());
98 normalizedQueryPart.setProjectionBody(boundWithClause.getProjectionBody()->copy());
99 if (boundWithClause.hasWhereExpression()) {
100 normalizedQueryPart.setProjectionBodyPredicate(boundWithClause.getWhereExpression());
101 }
102 return normalizedQueryPart;
103}
104
105} // namespace binder
106} // namespace lbug

Callers

nothing calls this directly

Calls 14

getWithClauseMethod · 0.80
setProjectionBodyMethod · 0.80
NormalizedQueryPartClass · 0.50
getNumReadingClausesMethod · 0.45
addReadingClauseMethod · 0.45
getReadingClauseMethod · 0.45
getNumUpdatingClausesMethod · 0.45
addUpdatingClauseMethod · 0.45
getUpdatingClauseMethod · 0.45
copyMethod · 0.45
getProjectionBodyMethod · 0.45

Tested by

no test coverage detected