| 37 | } |
| 38 | |
| 39 | static std::unique_ptr<TableFuncBindData> bindFunc(const main::ClientContext* context, |
| 40 | const TableFuncBindInput* input) { |
| 41 | std::vector<std::string> columnNames; |
| 42 | std::vector<LogicalType> columnTypes; |
| 43 | columnNames.emplace_back("name"); |
| 44 | columnTypes.emplace_back(LogicalType::STRING()); |
| 45 | columnNames.emplace_back("database type"); |
| 46 | columnTypes.emplace_back(LogicalType::STRING()); |
| 47 | auto attachedDatabases = main::DatabaseManager::Get(*context)->getAttachedDatabases(); |
| 48 | columnNames = TableFunction::extractYieldVariables(columnNames, input->yieldVariables); |
| 49 | auto columns = input->binder->createVariables(columnNames, columnTypes); |
| 50 | return std::make_unique<ShowAttachedDatabasesBindData>(attachedDatabases, columns, |
| 51 | attachedDatabases.size()); |
| 52 | } |
| 53 | |
| 54 | function_set ShowAttachedDatabasesFunction::getFunctionSet() { |
| 55 | function_set functionSet; |
nothing calls this directly
no test coverage detected