Skip to content

Add Dux.exec/1 for raw DDL execution#29

Merged
cigrainger merged 1 commit into
mainfrom
feat/exec
Mar 24, 2026
Merged

Add Dux.exec/1 for raw DDL execution#29
cigrainger merged 1 commit into
mainfrom
feat/exec

Conversation

@cigrainger

Copy link
Copy Markdown
Contributor

Summary

  • Add Dux.exec/1 for executing raw SQL that isn't a query — SET, INSTALL, LOAD, CREATE SECRET, CREATE TABLE, etc.
  • These statements can't go through from_query/1 because it wraps SQL in SELECT * FROM (...)

Examples

Dux.exec("INSTALL httpfs; LOAD httpfs;")
Dux.exec("SET s3_region = 'us-east-1'")
Dux.exec("CREATE SECRET (TYPE s3, PROVIDER config, REGION 'us-east-1')")

Test plan

  • Compiles with --warnings-as-errors
  • Manual test in Livebook

🤖 Generated with Claude Code

Executes arbitrary SQL against the DuckDB connection without wrapping
it in SELECT * FROM (...). Needed for SET, INSTALL, LOAD, CREATE SECRET,
CREATE TABLE, and other DDL that can't go through from_query/1.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cigrainger
cigrainger merged commit 65a0fc0 into main Mar 24, 2026
5 checks passed
@cigrainger
cigrainger deleted the feat/exec branch March 24, 2026 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant