module
Prostore::Steps::Codec
Overview
Serialize/deserialize Steps::Kind::* values to and from JSON for
persistence in prostore_migration_step.params (ADR-0009 invariant 2:
plan-at-start, never recompute on resume).
Each step round-trips losslessly: the encoded form contains every
primitive needed to re-execute, so the deserialized step yields
identical DDL on retry. No Symbols are ever stored — everything is
String-keyed JSON, which is why Schema::Field.name and the column
arrays on indexes/FKs are typed as String at the schema model level.
Extended Modules
Defined in:
prostore/steps/codec.crInstance Method Summary
- #decode(kind : String, params_json : String) : Kind::Any
- #decode_definition(j : JSON::Any) : Schema::Definition
- #decode_field(j : JSON::Any) : Schema::Field
- #decode_foreign_key(j : JSON::Any) : Schema::ForeignKey
- #decode_index(j : JSON::Any) : Schema::Index
- #encode(step : Kind::Any) : NamedTuple(kind: String, params: String)
- #encode_definition(d : Schema::Definition) : String
- #encode_field(f : Schema::Field)
- #encode_foreign_key(fk : Schema::ForeignKey)
- #encode_index(i : Schema::Index)