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
162 changes: 0 additions & 162 deletions .github/workflows/ExtensionTemplate.yml

This file was deleted.

45 changes: 25 additions & 20 deletions .github/workflows/MainDistributionPipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,43 @@
#
name: Main Extension Distribution Pipeline
on:
push:
branches: [main]
pull_request:
branches:
- main
paths-ignore:
- '**/README.md'
- 'doc/**'
push:
branches:
- main
paths-ignore:
- '**/README.md'
- 'doc/**'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' && github.sha || '' }}
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' || github.sha }}
cancel-in-progress: true


jobs:
duckdb-next-build:
duckdb-latest-build:
name: Build extension binaries
uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@main
if: false # extension-template is currently not compatible with main
with:
duckdb_version: main
extension_name: cactusdb
ci_tools_version: main
extension_name: quack

duckdb-stable-build:
name: Build extension binaries
uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@v1.3.2
with:
duckdb_version: v1.3.2
ci_tools_version: v1.3.2
extension_name: quack
vcpkg_commit: ce613c41372b23b1f51333815feb3edd87ef8a8b

code-quality-check:
name: Code Quality Check
uses: duckdb/extension-ci-tools/.github/workflows/_extension_code_quality.yml@main
duckdb-latest-deploy:
name: Deploy extension binaries
needs: duckdb-latest-build
uses: duckdb/extension-ci-tools/.github/workflows/_extension_deploy.yml@main
secrets: inherit
with:
duckdb_version: v1.3.2
duckdb_version: main
ci_tools_version: main
extension_name: quack
format_checks: 'format;tidy'
extension_name: cactusdb
deploy_latest: ${{ startsWith(github.ref, 'refs/heads/v') || github.ref == 'refs/heads/main' }}

10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
cmake_minimum_required(VERSION 3.5)

# Set extension name here
set(TARGET_NAME quack)
set(TARGET_NAME cactusdb)

# DuckDB's extension distribution supports vcpkg. As such, dependencies can be added in ./vcpkg.json and then
# used in cmake with find_package. Feel free to remove or replace with other dependencies.
# Note that it should also be removed from vcpkg.json to prevent needlessly installing it..

## TO BE REMOVED
find_package(OpenSSL REQUIRED)

set(EXTENSION_NAME ${TARGET_NAME}_extension)

## TO INVESTIGATE
set(LOADABLE_EXTENSION_NAME ${TARGET_NAME}_loadable_extension)


project(${TARGET_NAME})
include_directories(src/include)

set(EXTENSION_SOURCES src/quack_extension.cpp)
## TO BE REPLACED
set(EXTENSION_SOURCES src/cactusdb_extension.cpp)

build_static_extension(${TARGET_NAME} ${EXTENSION_SOURCES})
build_loadable_extension(${TARGET_NAME} " " ${EXTENSION_SOURCES})
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PROJ_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))

# Configuration of extension
EXT_NAME=quack
EXT_NAME=cactusdb
EXT_CONFIG=${PROJ_DIR}extension_config.cmake

# Include the Makefile from extension-ci-tools
Expand Down
18 changes: 9 additions & 9 deletions docs/NEXT_README.md → README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Quack
# Cactusdb

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.

---

This extension, Quack, allow you to ... <extension_goal>.
This extension, Cactusdb, allow you to ... <extension_goal>.


## Building
Expand All @@ -26,23 +26,23 @@ The main binaries that will be built are:
```sh
./build/release/duckdb
./build/release/test/unittest
./build/release/extension/quack/quack.duckdb_extension
./build/release/extension/cactusdb/cactusdb.duckdb_extension
```
- `duckdb` is the binary for the duckdb shell with the extension code automatically loaded.
- `unittest` is the test runner of duckdb. Again, the extension is already linked into the binary.
- `quack.duckdb_extension` is the loadable binary as it would be distributed.
- `cactusdb.duckdb_extension` is the loadable binary as it would be distributed.

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

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:
Now we can use the features from the extension directly in DuckDB. The template contains a single scalar function `cactusdb()` that takes a string arguments and returns a string:
```
D select quack('Jane') as result;
D select cactusdb('Jane') as result;
┌───────────────┐
│ result │
│ varchar │
├───────────────┤
Quack Jane 🐥 │
Cactusdb Jane 🐥 │
└───────────────┘
```

Expand Down Expand Up @@ -81,6 +81,6 @@ DuckDB. To specify a specific version, you can pass the version instead.

After running these steps, you can install and load your extension using the regular INSTALL/LOAD commands in DuckDB:
```sql
INSTALL quack
LOAD quack
INSTALL cactusdb
LOAD cactusdb
```
Loading
Loading