| 1 | #include "duckdb/execution/operator/helper/physical_load.hpp" |
|---|---|
| 2 | #include "duckdb/main/extension_helper.hpp" |
| 3 | |
| 4 | namespace duckdb { |
| 5 | |
| 6 | SourceResultType PhysicalLoad::GetData(ExecutionContext &context, DataChunk &chunk, OperatorSourceInput &input) const { |
| 7 | if (info->load_type == LoadType::INSTALL || info->load_type == LoadType::FORCE_INSTALL) { |
| 8 | ExtensionHelper::InstallExtension(context&: context.client, extension: info->filename, force_install: info->load_type == LoadType::FORCE_INSTALL); |
| 9 | } else { |
| 10 | ExtensionHelper::LoadExternalExtension(context&: context.client, extension: info->filename); |
| 11 | } |
| 12 | |
| 13 | return SourceResultType::FINISHED; |
| 14 | } |
| 15 | |
| 16 | } // namespace duckdb |
| 17 |