clj-r2dbc.impl.datafy

Internal navigation helpers and datafiable-row attachment for clj-r2dbc.

Provides metadata key defs and attach-datafiable-meta for marking rows
navigable, and navigate-row/navigate-blocking for REPL nav delegation.

This namespace is an implementation detail; do not use from application code.

attach-datafiable-meta

(attach-datafiable-meta row connectable opts)
Attach Datafiable metadata to a realized row value.

Stores clj-r2dbc navigation context in row metadata for optional
clj-r2dbc.datafy integration. Non-IObj values are returned unchanged.
Intended for REPL navigation only; not for high-throughput queries.

Args:
  row         - realized row value; must implement IObj to receive metadata.
  connectable - database connectable passed to the :nav-fn.
  opts        - execution options map; :nav-fn is extracted from this map.

connectable-key

marker-key

nav-fn-key

navigate-blocking

(navigate-blocking row k v opts)
Navigate a row synchronously for REPL tooling.

Args:
  row  - row map with optional :datafy metadata.
  k    - key navigated from the row.
  v    - value at k.
  opts - options map; :nav-timeout-ms overrides the default 5000 ms.

Returns the navigation result or nil.

Throws (synchronously):
  ex-info :clj-r2dbc/timeout when :nav-timeout-ms elapses.

navigate-row

(navigate-row row k v opts)
Return a Missionary task for row navigation.

Delegates to the :nav-fn stored in row metadata by attach-datafiable-meta.
Returns a task yielding nil when no nav-fn is present or the row is not
marked as datafiable.

Args:
  row  - row map with optional :datafy metadata.
  k    - key navigated from the row.
  v    - value at k.
  opts - options map merged with the row's stored opts.

opts-key