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

Function internalTableFunc

src/function/table/storage_version.cpp:12–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10namespace function {
11
12static common::offset_t internalTableFunc(const TableFuncMorsel& /*morsel*/,
13 const TableFuncInput& input, common::DataChunk& output) {
14 auto& outputVector = output.getValueVectorMutable(0);
15 auto pos = outputVector.state->getSelVector()[0];
16 auto* storageManager = storage::StorageManager::Get(*input.context->clientContext);
17 const auto* header = storageManager->getOrInitDatabaseHeader(*input.context->clientContext);
18 outputVector.setValue(pos, header->storageVersion);
19 return 1;
20}
21
22static std::unique_ptr<TableFuncBindData> bindFunc(const main::ClientContext*,
23 const TableFuncBindInput* input) {

Callers

nothing calls this directly

Calls 2

setValueMethod · 0.45

Tested by

no test coverage detected