MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / function_args_exprs

Function function_args_exprs

nodedb-sql/src/planner/aggregate.rs:328–340  ·  view source on GitHub ↗

Extract the positional expression arguments from a function call.

(f: &ast::Function)

Source from the content-addressed store, hash-verified

326
327/// Extract the positional expression arguments from a function call.
328fn function_args_exprs(f: &ast::Function) -> Vec<&ast::Expr> {
329 match &f.args {
330 ast::FunctionArguments::List(list) => list
331 .args
332 .iter()
333 .filter_map(|a| match a {
334 ast::FunctionArg::Unnamed(ast::FunctionArgExpr::Expr(e)) => Some(e),
335 _ => None,
336 })
337 .collect(),
338 _ => Vec::new(),
339 }
340}
341
342/// Return the simple lowercase name of a function (unqualified part only).
343fn normalize_function_name(f: &ast::Function) -> String {

Callers 1

Calls 2

collectMethod · 0.80
iterMethod · 0.45

Tested by

no test coverage detected