RowOf type

A model as a row that was read whole.

Signature:

export type RowOf<Model> = {
    [Field in keyof Model]-?: Model[Field];
};

Remarks

Every field of a generated model is optional, because a projected read returns only what it asked for and the type has to describe both. A read with no select returns all of them, and this is how a call site says so — single<RowOf<Shape>>({ where }) rather than a non-null assertion on each field afterwards.

It does not make a nullable column non-null: deletedAt stays string | null, because that is the column and not the projection.

Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.