Hyper.Img.Db.ImageLayer (Hyper v0.1.0)

Copy Markdown View Source

One rung of an image's assembly chain. position 0 is the base blob; ascending positions are deltas applied on top (each a dm-snapshot COW store over the layer below). Selecting all rows for an image ordered by position yields exactly the ordered blob list and params needed to emit the dmsetup tables.

Insert-only: chains are never edited, only created. The reverse index on blob_id answers "which images reference this blob" for the delete check, and the FK's ON DELETE RESTRICT enforces "can't drop a blob a layer still needs."

Summary

Functions

changeset(layer, attrs)