Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code formatting #114

Merged
merged 2 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .clang-format
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
Loading