asobi_jsonb (asobi v0.84.0)
View SourceSize-bound checks for values headed into an unbounded jsonb column.
A jsonb column has no server-side size limit of its own, so any field a
client can populate through a changeset cast is a lever for an oversized
payload unless something checks it first (asobi#169, asobi#216). This is
the one place that idiom lives, shared by every schema and controller that
needs it rather than a per-call-site copy.
Summary
Functions
-spec check(dynamic(), non_neg_integer()) -> ok | too_large | not_encodable.
-spec default_metadata_bytes() -> non_neg_integer().
-spec within_limit(dynamic(), non_neg_integer()) -> boolean().