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

Function explode_asterisk

src/gpre/sqe.cpp:1335–1363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1333//
1334
1335static gpre_nod* explode_asterisk( gpre_nod* fields, int n, gpre_rse* selection)
1336{
1337 TEXT s[ERROR_LENGTH];
1338
1339 assert_IS_NOD(fields);
1340
1341 gpre_nod* node = fields->nod_arg[n];
1342 tok* q_token = (tok*) node->nod_arg[0];
1343 if (q_token)
1344 {
1345 // expand for single relation
1346 gpre_ctx* context = resolve_asterisk(q_token, selection);
1347 if (context)
1348 fields = merge_fields(fields, MET_fields(context), n, true);
1349 else
1350 {
1351 fb_utils::snprintf(s, sizeof(s), "columns \"%s.*\" cannot be resolved", q_token->tok_string);
1352 PAR_error(s);
1353 }
1354 }
1355 else
1356 {
1357 // expand for all relations in context list
1358
1359 fields = explode_asterisk_all(fields, n, selection, true);
1360 }
1361
1362 return fields;
1363}
1364
1365
1366//____________________________________________________________

Callers 1

resolve_fieldsFunction · 0.85

Calls 6

resolve_asteriskFunction · 0.85
merge_fieldsFunction · 0.85
MET_fieldsFunction · 0.85
explode_asterisk_allFunction · 0.85
PAR_errorFunction · 0.70
snprintfFunction · 0.50

Tested by

no test coverage detected