MCPcopy Create free account
hub / github.com/AmrDeveloper/GQL / execute_having_statement

Function execute_having_statement

crates/gitql-engine/src/engine_executor.rs:233–256  ·  view source on GitHub ↗
(
    env: &mut Environment,
    statement: &HavingStatement,
    gitql_object: &mut GitQLObject,
)

Source from the content-addressed store, hash-verified

231}
232
233fn execute_having_statement(
234 env: &mut Environment,
235 statement: &HavingStatement,
236 gitql_object: &mut GitQLObject,
237) -> Result<(), String> {
238 if gitql_object.is_empty() {
239 return Ok(());
240 }
241
242 if gitql_object.len() > 1 {
243 gitql_object.flat()
244 }
245
246 // Perform where command only on the first group
247 // because group by command not executed yet
248 apply_filter_operation(
249 env,
250 &statement.condition,
251 &gitql_object.titles,
252 &mut gitql_object.groups[0].rows,
253 )?;
254
255 Ok(())
256}
257
258fn execute_qualify_statement(
259 env: &mut Environment,

Callers 1

execute_statementFunction · 0.85

Calls 4

apply_filter_operationFunction · 0.85
flatMethod · 0.80
is_emptyMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…