Skip to content

Commit

Permalink
Fix: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
esadek committed Nov 7, 2024
1 parent cb1ff51 commit dd40939
Show file tree
Hide file tree
Showing 8 changed files with 1,443 additions and 1,415 deletions.
20 changes: 10 additions & 10 deletions src/delta_extension.cpp
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
#define DUCKDB_EXTENSION_MAIN

#include "delta_extension.hpp"
#include "delta_functions.hpp"

#include "delta_functions.hpp"
#include "duckdb.hpp"
#include "duckdb/common/exception.hpp"
#include "duckdb/main/extension_util.hpp"

namespace duckdb {

static void LoadInternal(DatabaseInstance &instance) {
// Load functions
for (const auto &function : DeltaFunctions::GetTableFunctions(instance)) {
ExtensionUtil::RegisterFunction(instance, function);
}
// Load functions
for (const auto &function : DeltaFunctions::GetTableFunctions(instance)) {
ExtensionUtil::RegisterFunction(instance, function);
}
}

void DeltaExtension::Load(DuckDB &db) {
LoadInternal(*db.instance);
LoadInternal(*db.instance);
}

std::string DeltaExtension::Name() {
return "delta";
return "delta";
}

} // namespace duckdb

extern "C" {

DUCKDB_EXTENSION_API void delta_init(duckdb::DatabaseInstance &db) {
duckdb::DuckDB db_wrapper(db);
db_wrapper.LoadExtension<duckdb::DeltaExtension>();
duckdb::DuckDB db_wrapper(db);
db_wrapper.LoadExtension<duckdb::DeltaExtension>();
}

DUCKDB_EXTENSION_API const char *delta_version() {
return duckdb::DuckDB::LibraryVersion();
return duckdb::DuckDB::LibraryVersion();
}
}

Expand Down
9 changes: 5 additions & 4 deletions src/delta_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@

#include "duckdb.hpp"
#include "duckdb/main/extension_util.hpp"

#include <duckdb/parser/parsed_data/create_scalar_function_info.hpp>

namespace duckdb {

vector<TableFunctionSet> DeltaFunctions::GetTableFunctions(DatabaseInstance &instance) {
vector<TableFunctionSet> functions;
vector<TableFunctionSet> functions;

functions.push_back(GetDeltaScanFunction(instance));
functions.push_back(GetDeltaScanFunction(instance));

return functions;
return functions;
}

};
}; // namespace duckdb
Loading

0 comments on commit dd40939

Please sign in to comment.