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

Function bindFunc

src/function/table/disk_size_info.cpp:279–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

277}
278
279static std::unique_ptr<TableFuncBindData> bindFunc(const ClientContext* context,
280 const TableFuncBindInput* input) {
281 std::vector<std::string> columnNames = {"category", "name", "num_pages", "size_bytes"};
282 std::vector<LogicalType> columnTypes;
283 columnTypes.push_back(LogicalType::STRING());
284 columnTypes.push_back(LogicalType::STRING());
285 columnTypes.push_back(LogicalType::UINT64());
286 columnTypes.push_back(LogicalType::UINT64());
287
288 // Get number of entries to report
289 auto entries = collectDiskSizeInfo(context);
290
291 auto columns = input->binder->createVariables(columnNames, columnTypes);
292 return std::make_unique<DiskSizeInfoBindData>(columns, entries.size(), context);
293}
294
295static function_set getDiskSizeInfoFunctionSet(const char* name) {
296 function_set functionSet;

Callers

nothing calls this directly

Calls 4

collectDiskSizeInfoFunction · 0.85
createVariablesMethod · 0.80
push_backMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected