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

Function bindFunc

src/function/table/file_info.cpp:29–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29static std::unique_ptr<TableFuncBindData> bindFunc(const main::ClientContext* context,
30 const TableFuncBindInput* input) {
31 auto numPages = storage::StorageManager::Get(*context)->getDataFH()->getNumPages();
32 std::vector<common::LogicalType> returnTypes;
33 returnTypes.emplace_back(common::LogicalType::UINT64());
34 auto returnColumnNames = std::vector<std::string>{"num_pages"};
35 returnColumnNames =
36 TableFunction::extractYieldVariables(returnColumnNames, input->yieldVariables);
37 auto columns = input->binder->createVariables(returnColumnNames, returnTypes);
38 return std::make_unique<FileInfoBindData>(numPages, columns);
39}
40
41function_set FileInfoFunction::getFunctionSet() {
42 function_set functionSet;

Callers

nothing calls this directly

Calls 4

emplace_backMethod · 0.80
createVariablesMethod · 0.80
getNumPagesMethod · 0.45
getDataFHMethod · 0.45

Tested by

no test coverage detected