Liking cljdoc? Tell your friends :D

duckdb.udf

Register-only helpers for Java-backed DuckDB scalar and table functions.

Registrations are process-global. duckdb_jdbc 1.5.4.0 does not expose a working way to remove them, so registered callbacks live for the JVM's lifetime.

Register-only helpers for Java-backed DuckDB scalar and table functions.

Registrations are process-global. duckdb_jdbc 1.5.4.0 does not expose a
working way to remove them, so registered callbacks live for the JVM's
lifetime.
raw docstring

register-scalar!clj

(register-scalar!
  connectable
  name
  f
  {:keys [parameters return-type null-handling volatility]
   :or {parameters [] null-handling :special volatility :immutable}})

Registers f as a typed scalar function and returns the driver's registration.

Options:

  • :parameters is a vector of Class, DuckDBColumnType, or DuckDBLogicalType.
  • :return-type is a required descriptor of the same kinds.
  • :null-handling is :special (default) or :null-in-null-out.
  • :volatility is :immutable (default) or :volatile.

Registrations are PROCESS-GLOBAL and, in duckdb_jdbc 1.5.4.0, CANNOT be removed for the lifetime of the JVM because the driver exposes no working deregistration. Use stable, unique names and avoid re-registering the same name in one JVM.

Registers f as a typed scalar function and returns the driver's registration.

Options:
- :parameters is a vector of Class, DuckDBColumnType, or DuckDBLogicalType.
- :return-type is a required descriptor of the same kinds.
- :null-handling is :special (default) or :null-in-null-out.
- :volatility is :immutable (default) or :volatile.

Registrations are PROCESS-GLOBAL and, in duckdb_jdbc 1.5.4.0, CANNOT be removed
for the lifetime of the JVM because the driver exposes no working
deregistration. Use stable, unique names and avoid re-registering the same
name in one JVM.
sourceraw docstring

register-table!clj

(register-table! connectable
                 name
                 {:keys [parameters named-parameters]
                  :or {parameters [] named-parameters {}}
                  :as opts})

Registers a JVM-backed table function and returns the driver's registration.

Options:

  • :parameters and :named-parameters contain DuckDB type descriptors.
  • :columns is a vector of [name type] result columns.
  • :cardinality is an estimated row count or {:rows n :exact? boolean}.
  • :bind receives converted positional and named parameters and returns bind data.
  • :init receives bind data and returns per-query state.
  • :local-init optionally returns per-thread state.
  • :apply receives bind/state data, capacity, and writable :vectors, and returns the number of rows written. :max-threads is optional.

Registrations are PROCESS-GLOBAL and, in duckdb_jdbc 1.5.4.0, CANNOT be removed for the lifetime of the JVM because the driver exposes no working deregistration. Use stable, unique names and avoid re-registering the same name in one JVM.

Registers a JVM-backed table function and returns the driver's registration.

Options:
- :parameters and :named-parameters contain DuckDB type descriptors.
- :columns is a vector of [name type] result columns.
- :cardinality is an estimated row count or {:rows n :exact? boolean}.
- :bind receives converted positional and named parameters and returns bind data.
- :init receives bind data and returns per-query state.
- :local-init optionally returns per-thread state.
- :apply receives bind/state data, capacity, and writable :vectors, and returns
  the number of rows written. :max-threads is optional.

Registrations are PROCESS-GLOBAL and, in duckdb_jdbc 1.5.4.0, CANNOT be removed
for the lifetime of the JVM because the driver exposes no working
deregistration. Use stable, unique names and avoid re-registering the same
name in one JVM.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close