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

Function gen_cursor_open

src/gpre/obj_cxx.cpp:1376–1408  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1374//
1375
1376static int gen_cursor_open( const act* action, const gpre_req* request, int column)
1377{
1378 PAT args;
1379 TEXT s[MAX_CURSOR_SIZE];
1380 ObjectNotImplemented();
1381 const TEXT* pattern1 = "if (!%RIs && %RH%IF && %DH%EN)";
1382 const TEXT* pattern2 = "if (!%RIs%IF && %DH%EN)";
1383 const TEXT* pattern3 = "isc_dsql_alloc_statement2 (%V1, &%DH, &%RIs);";
1384 const TEXT* pattern4 = "if (%RIs%IF && %S3%EN)";
1385 const TEXT* pattern5 = "if (!isc_dsql_set_cursor_name (%V1, &%RIs, %S1, 0) &&";
1386 const TEXT* pattern6 = "!isc_dsql_execute_m (%V1, &%S3, &%RIs, 0, %S2, %N2, 0, %S2))";
1387
1388 args.pat_request = request;
1389 args.pat_database = request->req_database;
1390 args.pat_vector1 = status_vector(action);
1391 args.pat_condition = gpreGlob.sw_auto;
1392 args.pat_string1 = make_name(s, ((open_cursor*) action->act_object)->opn_cursor);
1393 args.pat_string2 = NULL_STRING;
1394 args.pat_string3 = request_trans(action, request);
1395 args.pat_value2 = -1;
1396
1397 PATTERN_expand((USHORT) column, (action->act_type == ACT_open) ? pattern1 : pattern2, &args);
1398 PATTERN_expand((USHORT) (column + INDENT), pattern3, &args);
1399 PATTERN_expand((USHORT) column, pattern4, &args);
1400 column += INDENT;
1401 begin(column);
1402 PATTERN_expand((USHORT) column, pattern5, &args);
1403 column += INDENT;
1404 PATTERN_expand((USHORT) column, pattern6, &args);
1405 begin(column);
1406
1407 return column;
1408}
1409
1410
1411//____________________________________________________________

Callers 2

gen_blob_openFunction · 0.70
gen_s_startFunction · 0.70

Calls 6

ObjectNotImplementedFunction · 0.85
PATTERN_expandFunction · 0.85
status_vectorFunction · 0.70
make_nameFunction · 0.70
request_transFunction · 0.70
beginFunction · 0.70

Tested by

no test coverage detected