You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`duckdb` is the binary for the duckdb shell with the extension code automatically loaded.
32
32
-`unittest` is the test runner of duckdb. Again, the extension is already linked into the binary.
33
-
-`quack.duckdb_extension` is the loadable binary as it would be distributed.
33
+
-`textplot.duckdb_extension` is the loadable binary as it would be distributed.
34
34
35
35
## Running the extension
36
36
To run the extension code, simply start the shell with `./build/release/duckdb`.
37
37
38
-
Now we can use the features from the extension directly in DuckDB. The template contains a single scalar function `quack()` that takes a string arguments and returns a string:
38
+
Now we can use the features from the extension directly in DuckDB. The template contains a single scalar function `textplot()` that takes a string arguments and returns a string:
39
39
```
40
-
D select quack('Jane') as result;
40
+
D select textplot('Jane') as result;
41
41
┌───────────────┐
42
42
│ result │
43
43
│ varchar │
44
44
├───────────────┤
45
-
│ Quack Jane 🐥 │
45
+
│ Textplot Jane 🐥 │
46
46
└───────────────┘
47
47
```
48
48
@@ -81,6 +81,6 @@ DuckDB. To specify a specific version, you can pass the version instead.
81
81
82
82
After running these steps, you can install and load your extension using the regular INSTALL/LOAD commands in DuckDB:
Copy file name to clipboardExpand all lines: docs/README.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
This repository contains a template for creating a DuckDB extension. The main goal of this template is to allow users to easily develop, test and distribute their own DuckDB extension. The main branch of the template is always based on the latest stable DuckDB allowing you to try out your extension right away.
3
3
4
4
## Getting started
5
-
First step to getting started is to create your own repo from this template by clicking `Use this template`. Then clone your new repository using
5
+
First step to getting started is to create your own repo from this template by clicking `Use this template`. Then clone your new repository using
-`duckdb` is the binary for the duckdb shell with the extension code automatically loaded.
33
+
-`duckdb` is the binary for the duckdb shell with the extension code automatically loaded.
34
34
-`unittest` is the test runner of duckdb. Again, the extension is already linked into the binary.
35
35
-`<extension_name>.duckdb_extension` is the loadable binary as it would be distributed.
36
36
@@ -44,16 +44,16 @@ GEN=ninja make
44
44
```
45
45
46
46
## Running the extension
47
-
To run the extension code, simply start the shell with `./build/release/duckdb`. This shell will have the extension pre-loaded.
47
+
To run the extension code, simply start the shell with `./build/release/duckdb`. This shell will have the extension pre-loaded.
48
48
49
-
Now we can use the features from the extension directly in DuckDB. The template contains a single scalar function `quack()` that takes a string arguments and returns a string:
49
+
Now we can use the features from the extension directly in DuckDB. The template contains a single scalar function `textplot()` that takes a string arguments and returns a string:
50
50
```
51
-
D select quack('Jane') as result;
51
+
D select textplot('Jane') as result;
52
52
┌───────────────┐
53
53
│ result │
54
54
│ varchar │
55
55
├───────────────┤
56
-
│ Quack Jane 🐥 │
56
+
│ Textplot Jane 🐥 │
57
57
└───────────────┘
58
58
```
59
59
@@ -92,7 +92,7 @@ To distribute your extension binaries, there are a few options.
92
92
The recommended way of distributing extensions is through the [community extensions repository](https://github.com/duckdb/community-extensions).
93
93
This repository is designed specifically for extensions that are built using this extension template, meaning that as long as your extension can be
94
94
built using the default CI in this template, submitting it to the community extensions is a very simple process. The process works similarly to popular
95
-
package managers like homebrew and vcpkg, where a PR containing a descriptor file is submitted to the package manager repository. After the CI in the
95
+
package managers like homebrew and vcpkg, where a PR containing a descriptor file is submitted to the package manager repository. After the CI in the
96
96
community extensions repository completes, the extension can be installed and loaded in DuckDB with:
97
97
```SQL
98
98
INSTALL <my_extension>FROM community;
@@ -125,18 +125,18 @@ LOAD <my_extension>
125
125
```
126
126
127
127
### Versioning of your extension
128
-
Extension binaries will only work for the specific DuckDB version they were built for. The version of DuckDB that is targeted
129
-
is set to the latest stable release for the main branch of the template so initially that is all you need. As new releases
128
+
Extension binaries will only work for the specific DuckDB version they were built for. The version of DuckDB that is targeted
129
+
is set to the latest stable release for the main branch of the template so initially that is all you need. As new releases
130
130
of DuckDB are published however, the extension repository will need to be updated. The template comes with a workflow set-up
131
131
that will automatically build the binaries for all DuckDB target architectures that are available in the corresponding DuckDB
132
132
version. This workflow is found in `.github/workflows/MainDistributionPipeline.yml`. It is up to the extension developer to keep
133
-
this up to date with DuckDB. Note also that its possible to distribute binaries for multiple DuckDB versions in this workflow
133
+
this up to date with DuckDB. Note also that its possible to distribute binaries for multiple DuckDB versions in this workflow
134
134
by simply duplicating the jobs.
135
135
136
-
## Setting up CLion
136
+
## Setting up CLion
137
137
138
138
### Opening project
139
-
Configuring CLion with the extension template requires a little work. Firstly, make sure that the DuckDB submodule is available.
139
+
Configuring CLion with the extension template requires a little work. Firstly, make sure that the DuckDB submodule is available.
140
140
Then make sure to open `./duckdb/CMakeLists.txt` (so not the top level `CMakeLists.txt` file from this repo) as a project in CLion.
141
141
Now to fix your project path go to `tools->CMake->Change Project Root`([docs](https://www.jetbrains.com/help/clion/change-project-root-directory.html)) to set the project root to the root dir of this repo.
This directory contains all the tests for this extension. The `sql` directory holds tests that are written as [SQLLogicTests](https://duckdb.org/dev/sqllogictest/intro.html). DuckDB aims to have most its tests in this format as SQL statements, so for the quack extension, this should probably be the goal too.
2
+
This directory contains all the tests for this extension. The `sql` directory holds tests that are written as [SQLLogicTests](https://duckdb.org/dev/sqllogictest/intro.html). DuckDB aims to have most its tests in this format as SQL statements, so for the textplot extension, this should probably be the goal too.
3
3
4
4
The root makefile contains targets to build and run all of these tests. To run the SQLLogicTests:
0 commit comments