weft / a DocumentDrivenDX project

Logical queries. Physical precision.

One query.
Its meaning
intact.

A universal UMF-powered SQL dialect with pluggable storage backends. Write against your model. Compile for where your data lives.

WEFT SQL 01 / logical input
SELECT c.name, SUM(o.total)
FROM Customer c
JOIN Orders o
  ON o.customer_id = c.id
GROUP BY c.name
+ UMF modules
+ storage binding

Objects, keys, edges.

Lower logical fields into Truss’s catalog and declared property homes, including JSONB, typed scalar and compound storage.

Conceptual query and mapping. This selector explains the backends; it does not execute or compile SQL.

01 / The approach

A model is the thread
that holds it together.

UMF supplies logical meaning. Weft resolves your query against it. A registered backend translates the plan into its own storage layout and SQL dialect.

  1. 01

    Write

    Query logical records, fields and keys in Weft SQL.

  2. 02

    Resolve

    Check names and types against supplied, pinned UMF modules.

  3. 03

    Map

    Admit a storage binding and the target’s supported semantics.

  4. 04

    Compile

    Return SQL, parameters, result types and host obligations.

02 / Initial backends

Two storage worlds.
One logical dialect.

Physical mappings belong to each backend. Logical meaning stays in the shared compiler.

Operational data

Truss → PostgreSQL

Query the graph through its storage realization: catalog, objects, keys, edges and declared property homes. Fields can live beyond JSONB.

Explore Truss ↗

Warehouse data

Ashlar → Databricks

Map the same logical operations onto Ashlar’s warehouse layout, with publication context and backend-specific numeric and presence contracts.

Explore Ashlar ↗

03 / The execution contract

More than a SQL string.

A compiled query carries the information a host needs to preserve its meaning.

SQL & parameters
Target-specific output with bound values.
Result types & decoding
Exact numbers, presence states and structured values.
Pins & diagnostics
Model and binding identity, version evidence and explicit refusals.
Checks & obligations
Integrity guards and conditions the host must enforce before releasing results.

A deliberate boundary

Weft compiles.
Your host executes.

The host owns database connections, caller authentication, authorization, consistent read context and result publication.

If a selected meaning cannot be preserved, compilation stops. Unknown semantics do not become a quiet coercion.

Shared Rust core. Native Python embedding. Browser WASM with a TypeScript interface.

Build on the model.

Keep the query.
Change the backend.

Explore the source ↗