Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add webmacro #198

Merged
merged 1 commit into from
Nov 18, 2024
Merged
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
47 changes: 47 additions & 0 deletions extensions/webmacro/description.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
extension:
name: webmacro
description: Load DuckDB Macros from the web
version: 0.0.1
language: C++
build: cmake
license: MIT
maintainers:
- lmangani

repo:
github: quackscience/duckdb-extension-webmacro
ref: eec600cbbd313453f79c8b271bfe8f576aa851f6

docs:
hello_world: |
-- Create a DuckDB Scalar or Table macro statement and save it to a gist;

-- Load your remote macro onto your system using the gist url

D SELECT load_macro_from_url('https://gist.github.com/lmangani/518215a68e674ac662537d518799b893/raw/5f305480fdd7468f4ecda3686011bab8e8e711bf/bsky.sql') as res;
┌─────────────────────────────────────────┐
│ res │
│ varchar │
├─────────────────────────────────────────┤
│ Successfully loaded macro: search_posts │
└─────────────────────────────────────────┘

-- Use your new macro and have fun:
D SELECT * FROM search_posts('qxip.bsky.social', text := 'quack');
┌──────────────────┬──────────────┬──────────────────────┬───┬─────────┬─────────┬───────┬────────┐
│ author_handle │ display_name │ post_text │ … │ replies │ reposts │ likes │ quotes │
│ varchar │ varchar │ varchar │ │ int64 │ int64 │ int64 │ int64 │
├──────────────────┼──────────────┼──────────────────────┼───┼─────────┼─────────┼───────┼────────┤
│ qxip.bsky.social │ qxip │ This is super cool… │ … │ 1 │ 0 │ 1 │ 0 │
│ qxip.bsky.social │ qxip │ github.com/quacksc… │ … │ 0 │ 1 │ 2 │ 0 │
│ qxip.bsky.social │ qxip │ #DuckDB works grea… │ … │ 2 │ 3 │ 24 │ 0 │
│ qxip.bsky.social │ qxip │ github.com/quacksc… │ … │ 1 │ 0 │ 0 │ 0 │
│ qxip.bsky.social │ qxip │ The latest #Quackp… │ … │ 0 │ 0 │ 2 │ 0 │
│ qxip.bsky.social │ qxip │ The #DuckDB Ecosys… │ … │ 0 │ 0 │ 5 │ 0 │
│ qxip.bsky.social │ qxip │ Ladies and Gents, … │ … │ 1 │ 0 │ 4 │ 0 │
├──────────────────┴──────────────┴──────────────────────┴───┴─────────┴─────────┴───────┴────────┤
│ 7 rows 9 columns (7 shown) │
└─────────────────────────────────────────────────────────────────────────────────────────────────┘

extended_description: |
The HTTP Client Extension is experimental, use at your own risk!
Loading