MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / getMorsel

Method getMorsel

src/function/table/simple_table_function.cpp:8–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6namespace function {
7
8TableFuncMorsel SimpleTableFuncSharedState::getMorsel() {
9 std::lock_guard lck{mtx};
10 DASSERT(curRowIdx <= numRows);
11 if (curRowIdx == numRows) {
12 return TableFuncMorsel::createInvalidMorsel();
13 }
14 const auto numValuesToOutput = std::min(maxMorselSize, numRows - curRowIdx);
15 curRowIdx += numValuesToOutput;
16 return {curRowIdx - numValuesToOutput, curRowIdx};
17}
18
19std::unique_ptr<TableFuncSharedState> SimpleTableFunc::initSharedState(
20 const TableFuncInitSharedStateInput& input) {

Callers 3

tableFuncFunction · 0.45
tableFuncFunction · 0.45
tableFuncFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected