clj-r2dbc.dialect.impl.oracle
Internal Oracle-specific LOB management utilities for clj-r2dbc.
Provides:
single-publisher - creates a single-item Reactive Streams Publisher.
oversized-bytes? - returns true when a byte[] exceeds a size threshold.
oversized-string? - returns true when a String exceeds a size threshold.
rewrite-param - rewrites an oversized param to a Blob/Clob handle.
rewrite-oversized-lobs - applies rewrite-param to all params in a sequence.
discard-lob! - returns a task that discards a Blob or Clob handle.
cleanup-lobs - returns a task that discards all LOB handles in a context.
This namespace is an implementation detail; do not use from application code.
cleanup-lobs
(cleanup-lobs ctx)
Return a Missionary task that discards all LOB handles stored in context.
Discards all values under :clj-r2dbc.dialect.oracle/lob-handles and
returns the context map with that key removed.
Args:
ctx - interceptor context map.
discard-lob!
(discard-lob! lob)
Return a Missionary task that discards a Blob or Clob handle.
Calls .discard on the handle and drains the resulting Publisher<Void>.
No-ops on nil and any other non-LOB value.
Args:
lob - Blob, Clob, nil, or any other value.
oversized-bytes?
(oversized-bytes? v threshold)
Return true when v is a byte[] with length greater than threshold.
Args:
v - value to check.
threshold - maximum byte length (exclusive).
oversized-string?
(oversized-string? v threshold)
Return true when v is a String with character count greater than threshold.
Args:
v - value to check.
threshold - maximum character count (exclusive).
rewrite-oversized-lobs
(rewrite-oversized-lobs params threshold)
Rewrite all oversized params in the sequence, collecting Blob/Clob handles.
Args:
params - sequential collection of parameter values.
threshold - byte/character threshold passed to rewrite-param.
Returns a map {:params rewritten-seq, :lob-handles handles-vec}.rewrite-param
(rewrite-param v threshold)
Rewrite an oversized param value to a Blob or Clob handle.
Args:
v - the parameter value to inspect.
threshold - byte/character threshold above which rewriting occurs.
Returns a map {:param rewritten-value, :handle lob-or-nil}. When neither
size threshold is exceeded, :param is the original value and :handle is nil.single-publisher
(single-publisher item)
Return a Reactive Streams Publisher that emits exactly one item then completes.
Args:
item - the single value to emit.