Guides / Extensions

Extend Qubu

Choose an extension boundary when the built-in API does not cover a driver-specific or uncommon SQL feature.

Qubu extensions are values that render SQL and carry the metadata later composition needs. Choose the page that matches the thing you are adding:

Ordinary query code stays on the qubu root entrypoint. Import fragment, dialect, and extension constructors from qubu/core; import custom sources and schema-expression constructors from qubu/schema. The supported surface keeps the full entrypoint map in one place.

You need to add... Read...
A custom relation or clause Sources and clauses
A dialect-specific rendering policy A dialect policy
A typed expression or SQL domain Typed expressions
Parameterized trusted SQL syntax SQL templates
Syntax Qubu does not model Unsafe syntax

Use context.parameter() for runtime values. Use the typed forms when a custom expression or source must preserve source, result, nullability, or SQL domain metadata. The sources and clauses page starts with a complete custom-clause example.

Read the concept pages