SQL builders for DuckDB secrets.
DuckDB uses secrets to configure access to HTTP endpoints, object stores, and
cloud filesystems. These helpers build CREATE SECRET statements with
QuackDB's SQL literal formatting so credentials and scopes are escaped
consistently.
alias QuackDB.Secret
Secret.create(:s3, provider: :credential_chain, scope: "s3://bucket/prefix/")
Secret.create(:http, name: :api, bearer_token: token)Atom values are emitted as DuckDB identifiers, which is useful for options
such as PROVIDER credential_chain. String values are emitted as SQL string
literals.
Summary
Functions
Builds a DuckDB CREATE SECRET statement.
Types
@type option_value() :: QuackDB.SQL.parameter() | atom() | map()
@type secret_type() :: :http | :s3 | :r2 | :gcs | :azure | :huggingface | String.t()
Functions
@spec create( secret_type(), keyword(option_value()) ) :: iodata()
Builds a DuckDB CREATE SECRET statement.