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

Function gen_cursor_open

src/gpre/languages/rmc.cpp:1637–1676  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1635//
1636
1637static void gen_cursor_open( const act* action, const gpre_req* request)
1638{
1639 if (action->act_type != ACT_open)
1640 printa(names[COLUMN], false, "IF %s%dS = 0 THEN",
1641 names[isc_a_pos], request->req_ident);
1642 else
1643 printa(names[COLUMN], false, "IF (%s%dS = 0) AND %s NOT = 0 THEN",
1644 names[isc_a_pos], request->req_ident, request->req_handle);
1645 if (gpreGlob.sw_auto)
1646 printa(names[COLUMN], false, "IF %s NOT = 0 THEN",
1647 request->req_database->dbb_name->sym_string);
1648 printa(names[COLUMN], true, "CALL \"%s\" USING %s, %s, %s%dS",
1649 ISC_DSQL_ALLOCATE,
1650 status_vector(action),
1651 request->req_database->dbb_name->sym_string,
1652 names[isc_a_pos], request->req_ident);
1653 if (gpreGlob.sw_auto)
1654 printa(names[COLUMN], false, "END-IF");
1655 printa(names[COLUMN], false, "END-IF");
1656
1657 printa(names[COLUMN], false, "IF %s%dS NOT = 0 THEN", names[isc_a_pos], request->req_ident);
1658 if (gpreGlob.sw_auto)
1659 printa(names[COLUMN], false, "IF %s NOT = 0 THEN", request_trans(action, request));
1660
1661 TEXT s[MAX_CURSOR_SIZE];
1662 make_name_formatted(s, "ISC-CONST-%s", ((open_cursor*) action->act_object)->opn_cursor);
1663 printa(names[COLUMN], true, "CALL \"%s\" USING %s, %s%dS, %s, 0",
1664 ISC_DSQL_SET_CURSOR,
1665 status_vector(action),
1666 names[isc_a_pos], request->req_ident,
1667 s);
1668 printa(names[COLUMN], false, "IF %s(2) = 0 THEN", names[isc_status_pos]);
1669 printa(names[COLUMN], true, "CALL \"%s\" USING %s, %s, %s%dS, 0, %s, -1, 0, %s",
1670 ISC_DSQL_EXECUTE,
1671 status_vector(action),
1672 request_trans(action, request),
1673 names[isc_a_pos], request->req_ident,
1674 OMITTED, OMITTED);
1675 printa(names[COLUMN], false, "IF %s(2) = 0 THEN", names[isc_status_pos]);
1676}
1677
1678
1679//____________________________________________________________

Callers 2

gen_blob_openFunction · 0.70
gen_s_startFunction · 0.70

Calls 4

printaFunction · 0.70
status_vectorFunction · 0.70
request_transFunction · 0.70
make_name_formattedFunction · 0.70

Tested by

no test coverage detected