Skip to content
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
14 changes: 12 additions & 2 deletions src/vortex_extension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,18 @@

using namespace duckdb;

extern "C" {
DUCKDB_EXTENSION_API void vortex_init(duckdb::DatabaseInstance &db) {
vortex_init_rust(reinterpret_cast<duckdb_database>(&db));
}

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

static void LoadInternal(DatabaseInstance &db_instance) {
vortex_init(reinterpret_cast<duckdb_database>(&db_instance));
vortex_init_rust(reinterpret_cast<duckdb_database>(&db_instance));
}

/// Called when the extension is loaded by DuckDB.
Expand All @@ -32,7 +42,7 @@ std::string VortexExtension::Name() {

//! Returns the version of the Vortex extension.
std::string VortexExtension::Version() const {
return "0.41.2";
return vortex_extension_version_rust();
}

#ifndef DUCKDB_EXTENSION_MAIN
Expand Down
2 changes: 1 addition & 1 deletion vortex
Loading