Skip to content

Commit

Permalink
name the extension salesforce
Browse files Browse the repository at this point in the history
  • Loading branch information
warrenbhw committed Nov 24, 2024
1 parent 76ceb49 commit c67695c
Show file tree
Hide file tree
Showing 13 changed files with 60 additions and 469 deletions.
178 changes: 0 additions & 178 deletions .github/workflows/ExtensionTemplate.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/MainDistributionPipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ jobs:
with:
duckdb_version: main
ci_tools_version: main
extension_name: quack
extension_name: salesforce

duckdb-stable-build:
name: Build extension binaries
uses: duckdb/extension-ci-tools/.github/workflows/[email protected]
with:
duckdb_version: v1.1.3
ci_tools_version: v1.1.3
extension_name: quack
extension_name: salesforce

duckdb-stable-deploy:
name: Deploy extension binaries
Expand All @@ -35,5 +35,5 @@ jobs:
secrets: inherit
with:
duckdb_version: v1.1.3
extension_name: quack
extension_name: salesforce
deploy_latest: ${{ startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' }}
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.5)

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

# 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.
Expand All @@ -14,7 +14,7 @@ set(LOADABLE_EXTENSION_NAME ${TARGET_NAME}_loadable_extension)
project(${TARGET_NAME})
include_directories(src/include)

set(EXTENSION_SOURCES src/quack_extension.cpp)
set(EXTENSION_SOURCES src/salesforce_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=salesforce
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
# Salesforce

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, Salesforce, 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/salesforce/salesforce.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.
- `salesforce.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 `salesforce()` that takes a string arguments and returns a string:
```
D select quack('Jane') as result;
D select salesforce('Jane') as result;
┌───────────────┐
│ result │
│ varchar │
├───────────────┤
Quack Jane 🐥 │
Salesforce 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 salesforce
LOAD salesforce
```
Loading

0 comments on commit c67695c

Please sign in to comment.