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

Function pair

src/gpre/sqe.cpp:1648–1683  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1646//
1647
1648static void pair( gpre_nod* expr1, gpre_nod* expr2)
1649{
1650 assert_IS_NOD(expr1);
1651 assert_IS_NOD(expr2);
1652
1653 // Verify that an array field without subscripts is not
1654 // being used inappropriately
1655
1656 if (expr1 && expr2)
1657 {
1658 if (expr1->nod_type == nod_array && !expr1->nod_arg[1])
1659 PAR_error("Invalid array column reference");
1660 if (expr2->nod_type == nod_array && !expr2->nod_arg[1])
1661 PAR_error("Invalid array column reference");
1662 }
1663
1664 gpre_fld* field = 0;
1665 if (expr2)
1666 field = get_ref(expr2);
1667 if (!field)
1668 field = get_ref(expr1);
1669
1670 if (!field)
1671 return;
1672
1673 set_ref(expr1, field);
1674
1675 if (!expr2)
1676 return;
1677
1678 gpre_fld* temp = get_ref(expr1);
1679 if (temp)
1680 field = temp;
1681
1682 set_ref(expr2, field);
1683}
1684
1685
1686//____________________________________________________________

Callers 3

implicit_anyFunction · 0.70
par_relationalFunction · 0.70
resolve_fieldsFunction · 0.70

Calls 3

get_refFunction · 0.85
set_refFunction · 0.85
PAR_errorFunction · 0.70

Tested by

no test coverage detected