Skip to content

Commit 9c6def5

Browse files
committed
Rename extension to "parser_tools"
1 parent 6221430 commit 9c6def5

File tree

8 files changed

+21
-21
lines changed

8 files changed

+21
-21
lines changed

.github/workflows/MainDistributionPipeline.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ jobs:
1818
with:
1919
duckdb_version: main
2020
ci_tools_version: main
21-
extension_name: parse_tables
21+
extension_name: parser_tools
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.2.1
2828
ci_tools_version: v1.2.1
29-
extension_name: parse_tables
29+
extension_name: parser_tools

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 parse_tables)
4+
set(TARGET_NAME parser_tools)
55

66
set(EXTENSION_NAME ${TARGET_NAME}_extension)
77
set(LOADABLE_EXTENSION_NAME ${TARGET_NAME}_loadable_extension)
@@ -10,7 +10,7 @@ project(${TARGET_NAME})
1010
include_directories(src/include)
1111

1212
set(EXTENSION_SOURCES
13-
src/parse_tables_extension.cpp
13+
src/parser_tools_extension.cpp
1414
src/parse_tables.cpp
1515
)
1616

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PROJ_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
22

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

77
# Include the Makefile from extension-ci-tools

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ParseTables
1+
# Parser Tools
22

33
This repository is based on https://github.com/duckdb/extension-template, check it out if you want to build and ship your own DuckDB extension.
44

@@ -26,11 +26,11 @@ The main binaries that will be built are:
2626
```sh
2727
./build/release/duckdb
2828
./build/release/test/unittest
29-
./build/release/extension/parse_tables/parse_tables.duckdb_extension
29+
./build/release/extension/parser/parser.duckdb_extension
3030
```
3131
- `duckdb` is the binary for the duckdb shell with the extension code automatically loaded.
3232
- `unittest` is the test runner of duckdb. Again, the extension is already linked into the binary.
33-
- `parse_tables.duckdb_extension` is the loadable binary as it would be distributed.
33+
- `parser.duckdb_extension` is the loadable binary as it would be distributed.
3434

3535
## Running the extension
3636
To run the extension code, simply start the shell with `./build/release/duckdb`.

extension_config.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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(parse_tables
4+
duckdb_extension_load(parser_tools
55
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}
66
LOAD_TESTS
77
)
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 ParseTablesExtension : public Extension {
7+
class ParserToolsExtension : public Extension {
88
public:
99
void Load(DuckDB &db) override;
1010
std::string Name() override;
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 "parse_tables_extension.hpp"
3+
#include "parser_tools_extension.hpp"
44
#include "parse_tables.hpp"
55
#include "duckdb.hpp"
66
#include "duckdb/common/exception.hpp"
@@ -24,17 +24,17 @@ static void LoadInternal(DatabaseInstance &instance) {
2424
RegisterParseTablesFunction(instance);
2525
}
2626

27-
void ParseTablesExtension::Load(DuckDB &db) {
27+
void ParserToolsExtension::Load(DuckDB &db) {
2828
LoadInternal(*db.instance);
2929
}
3030

31-
std::string ParseTablesExtension::Name() {
32-
return "parse_tables";
31+
std::string ParserToolsExtension::Name() {
32+
return "parser";
3333
}
3434

35-
std::string ParseTablesExtension::Version() const {
36-
#ifdef EXT_VERSION_PARSE_TABLES
37-
return EXT_VERSION_PARSE_TABLES;
35+
std::string ParserToolsExtension::Version() const {
36+
#ifdef EXT_VERSION_PARSER_TOOLS
37+
return EXT_VERSION_PARSER_TOOLS;
3838
#else
3939
return "";
4040
#endif
@@ -44,12 +44,12 @@ std::string ParseTablesExtension::Version() const {
4444

4545
extern "C" {
4646

47-
DUCKDB_EXTENSION_API void parse_tables_init(duckdb::DatabaseInstance &db) {
47+
DUCKDB_EXTENSION_API void parser_tools_init(duckdb::DatabaseInstance &db) {
4848
duckdb::DuckDB db_wrapper(db);
49-
db_wrapper.LoadExtension<duckdb::ParseTablesExtension>();
49+
db_wrapper.LoadExtension<duckdb::ParserToolsExtension>();
5050
}
5151

52-
DUCKDB_EXTENSION_API const char *parse_tables_version() {
52+
DUCKDB_EXTENSION_API const char *parser_tools_version() {
5353
return duckdb::DuckDB::LibraryVersion();
5454
}
5555
}

test/sql/parse_tables.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ SELECT parse_tables('select 1');
99
Catalog Error: Scalar Function with name parse_tables does not exist!
1010

1111
# Require statement will ensure this test is run with this extension loaded
12-
require parse_tables
12+
require parser_tools
1313

1414
# simple FROM
1515
query III

0 commit comments

Comments
 (0)