Module: Hecks::Adapters::Postgres::Codec

Included in:
Hecks::Adapters::Postgres
Defined in:
lib/hecks/adapters/driven/postgres/codec.rb

Overview

How a state crosses the column boundary: which fields persist, and how each one encodes into (and decodes out of) its column. Same SHAPE as Sqlite::Codec (one column per attribute, JSON for nested/list) — not its mechanics. Sqlite's own columns carry no type affinity worth trusting on the way back out (SQLite gives it back typed anyway via the driver), but pg hands every column back as TEXT unless a type map says otherwise, so a real bigint/ double precision column needs its OWN coercion on decode that Sqlite never had to write.