Skip to content

Commit eec600c

Browse files
committed
webmacro
1 parent 34378f5 commit eec600c

File tree

8 files changed

+23
-23
lines changed

8 files changed

+23
-23
lines changed

.github/workflows/MainDistributionPipeline.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ jobs:
1818
with:
1919
duckdb_version: main
2020
ci_tools_version: main
21-
extension_name: webxtension
21+
extension_name: webmacro
2222

2323
duckdb-stable-build:
2424
name: Build extension binaries
2525
uses: duckdb/extension-ci-tools/.github/workflows/[email protected]
2626
with:
2727
duckdb_version: v1.1.3
2828
ci_tools_version: v1.1.3
29-
extension_name: webxtension
29+
extension_name: webmacro
3030

3131
duckdb-stable-deploy:
3232
name: Deploy extension binaries
@@ -35,5 +35,5 @@ jobs:
3535
secrets: inherit
3636
with:
3737
duckdb_version: v1.1.3
38-
extension_name: webxtension
38+
extension_name: webmacro
3939
deploy_latest: ${{ startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' }}

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.5)
22

33
# Set extension name here
4-
set(TARGET_NAME webxtension)
4+
set(TARGET_NAME webmacro)
55

66
# DuckDB's extension distribution supports vcpkg. As such, dependencies can be added in ./vcpkg.json and then
77
# used in cmake with find_package. Feel free to remove or replace with other dependencies.
@@ -14,7 +14,7 @@ set(LOADABLE_EXTENSION_NAME ${TARGET_NAME}_loadable_extension)
1414
project(${TARGET_NAME})
1515
include_directories(src/include duckdb/third_party/httplib)
1616

17-
set(EXTENSION_SOURCES src/webxtension_extension.cpp)
17+
set(EXTENSION_SOURCES src/webmacro_extension.cpp)
1818

1919
if(MINGW)
2020
set(OPENSSL_USE_STATIC_LIBS TRUE)

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
PROJ_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
22

33
# Configuration of extension
4-
EXT_NAME=webxtension
4+
EXT_NAME=webmacro
55
EXT_CONFIG=${PROJ_DIR}extension_config.cmake
66

77
# Include the Makefile from extension-ci-tools
8-
include extension-ci-tools/makefiles/duckdb_extension.Makefile
8+
include extension-ci-tools/makefiles/duckdb_extension.Makefile

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# DuckDB Webxtension
1+
# DuckDB WebMacro
22

33
This extension allows loading DuckDB Macros (both scalar and table) from URLs, gists, pasties, etc.
44

extension_config.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# This file is included by DuckDB's build system. It specifies which extension to load
22

33
# Extension from this repo
4-
duckdb_extension_load(webxtension
4+
duckdb_extension_load(webmacro
55
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}
66
LOAD_TESTS
77
)
88

99
# Any extra extensions that should be built
10-
# e.g.: duckdb_extension_load(json)
10+
# e.g.: duckdb_extension_load(json)

src/include/webxtension_extension.hpp renamed to src/include/webmacro_extension.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace duckdb {
66

7-
class WebxtensionExtension : public Extension {
7+
class WebmacroExtension : public Extension {
88
public:
99
void Load(DuckDB &db) override;
1010
std::string Name() override;

src/webxtension_extension.cpp renamed to src/webmacro_extension.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#define DUCKDB_EXTENSION_MAIN
22

3-
#include "webxtension_extension.hpp"
3+
#include "webmacro_extension.hpp"
44
#include "duckdb.hpp"
55
#include "duckdb/common/exception.hpp"
66
#include "duckdb/common/string_util.hpp"
@@ -229,17 +229,17 @@ static void LoadInternal(DatabaseInstance &instance) {
229229
);
230230
}
231231

232-
void WebxtensionExtension::Load(DuckDB &db) {
232+
void WebmacroExtension::Load(DuckDB &db) {
233233
LoadInternal(*db.instance);
234234
}
235235

236-
std::string WebxtensionExtension::Name() {
237-
return "webxtension";
236+
std::string WebmacroExtension::Name() {
237+
return "webmacro";
238238
}
239239

240-
std::string WebxtensionExtension::Version() const {
241-
#ifdef EXT_VERSION_WEBXTENSION
242-
return EXT_VERSION_WEBXTENSION;
240+
std::string WebmacroExtension::Version() const {
241+
#ifdef EXT_VERSION_WEBMACRO
242+
return EXT_VERSION_WEBMACRO;
243243
#else
244244
return "";
245245
#endif
@@ -248,12 +248,12 @@ std::string WebxtensionExtension::Version() const {
248248
} // namespace duckdb
249249

250250
extern "C" {
251-
DUCKDB_EXTENSION_API void webxtension_init(duckdb::DatabaseInstance &db) {
251+
DUCKDB_EXTENSION_API void webmacro_init(duckdb::DatabaseInstance &db) {
252252
duckdb::DuckDB db_wrapper(db);
253-
db_wrapper.LoadExtension<duckdb::WebxtensionExtension>();
253+
db_wrapper.LoadExtension<duckdb::WebmacroExtension>();
254254
}
255255

256-
DUCKDB_EXTENSION_API const char *webxtension_version() {
256+
DUCKDB_EXTENSION_API const char *webmacro_version() {
257257
return duckdb::DuckDB::LibraryVersion();
258258
}
259259
}

test/sql/webxtension.test renamed to test/sql/webmacro.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
# Before we load the extension, this will fail
66
statement error
7-
SELECT webxtension('Sam');
7+
SELECT load_macro_from_url('Sam');
88
----
9-
Catalog Error: Scalar Function with name webxtension does not exist!
9+
Catalog Error: Scalar Function with name load_macro_from_url does not exist!

0 commit comments

Comments
 (0)