MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / par_plan

Function par_plan

src/gpre/sqe.cpp:2345–2377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2343//
2344
2345static gpre_nod* par_plan( gpre_req* request)
2346{
2347 assert_IS_REQ(request);
2348
2349 // parse the join type
2350
2351 nod_t nod_type;
2352 if (MSC_match(KW_JOIN))
2353 nod_type = nod_join;
2354 else if (MSC_match(KW_MERGE))
2355 nod_type = nod_merge;
2356 else if (MSC_match(KW_SORT) && MSC_match(KW_MERGE))
2357 nod_type = nod_merge;
2358 else
2359 nod_type = nod_join;
2360
2361 // make up the plan expression node
2362
2363 gpre_nod* plan_expression = MSC_node(nod_plan_expr, 2);
2364
2365 if (nod_type != nod_join)
2366 plan_expression->nod_arg[0] = MSC_node(nod_type, 0);
2367
2368 // parse the plan items at this level
2369
2370 EXP_left_paren(0);
2371
2372 plan_expression->nod_arg[1] = SQE_list(par_plan_item, request, false);
2373
2374 if (!EXP_match_paren())
2375 return NULL;
2376 return plan_expression;
2377}
2378
2379
2380//____________________________________________________________

Callers 2

par_plan_itemFunction · 0.70
par_rseFunction · 0.70

Calls 5

MSC_matchFunction · 0.85
MSC_nodeFunction · 0.85
EXP_left_parenFunction · 0.85
SQE_listFunction · 0.85
EXP_match_parenFunction · 0.85

Tested by

no test coverage detected