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

Function PASS1_limit

src/dsql/pass1.cpp:1527–1552  ·  view source on GitHub ↗

Process the limit clause (FIRST/SKIP/ROWS)

Source from the content-addressed store, hash-verified

1525
1526// Process the limit clause (FIRST/SKIP/ROWS)
1527void PASS1_limit(DsqlCompilerScratch* dsqlScratch, NestConst<ValueExprNode> firstNode,
1528 NestConst<ValueExprNode> skipNode, RseNode* rse)
1529{
1530 DEV_BLKCHK(dsqlScratch, dsql_type_req);
1531 DEV_BLKCHK(firstNode, dsql_type_nod);
1532 DEV_BLKCHK(skipNode, dsql_type_nod);
1533
1534 dsc descNode;
1535
1536 if (dsqlScratch->clientDialect <= SQL_DIALECT_V5)
1537 descNode.makeLong(0);
1538 else
1539 descNode.makeInt64(0);
1540
1541 rse->dsqlFirst = Node::doDsqlPass(dsqlScratch, firstNode, false);
1542
1543 PASS1_set_parameter_type(dsqlScratch, rse->dsqlFirst,
1544 [&] (dsc* desc) { *desc = descNode; },
1545 false);
1546
1547 rse->dsqlSkip = Node::doDsqlPass(dsqlScratch, skipNode, false);
1548
1549 PASS1_set_parameter_type(dsqlScratch, rse->dsqlSkip,
1550 [&] (dsc* desc) { *desc = descNode; },
1551 false);
1552}
1553
1554
1555// Lookup a matching item in the select list. Return node if found else return NULL.

Callers 4

pass1_rse_implFunction · 0.85
pass1_unionFunction · 0.85
dsqlPassMethod · 0.85
internalDsqlPassMethod · 0.85

Calls 3

PASS1_set_parameter_typeFunction · 0.85
makeLongMethod · 0.80
makeInt64Method · 0.80

Tested by

no test coverage detected