moonbitstack/moonorm/examples/12-declarative-fields does not have a README file

    Hero

    type Hero

    The field-based declarative path: Model::from_fields derives the column list, the CREATE TABLE DDL, and the INSERT binding from a [Field] array — each field pairs column metadata with the attribute it binds. You supply only the from_row decoder (the record constructor MoonBit cannot synthesise without reflection), and Row::read reads each cell as the field's type. #orm annotations generate exactly this; see 22-annotations. Field::name exposes the per-field metadata; then a Session round trip over @moondb.MockDriver.

    moon run src/examples/12-declarative-fields

    Source Files