ReadonlyarchetypesReadonlycomponentReadonlyindexesReadonlyresourcesOptionaloptions: EntitySelectOptions<Optionaloptions: ArchetypeQueryOptions<C, PK>Read exactly the components of archetype. A membership GATE: returns
null unless the entity is a superset of archetype. The result is
narrowed to the archetype's own row — reading a component outside
archetype off the result is a compile error (use a wider archetype, the
component-list overload, or read(entity)).
Read a chosen subset of an entity's components.
A pure PROJECTION, not a membership gate: returns null only when the
entity does not exist. A requested component the entity does not have
comes back absent — the field stays optional in the result, exactly as
from the full read(entity).
Prefer this over read(entity) when only a few fields are needed: it
names the exact components touched, so db.derive can scope its
recompute to just those fields instead of the whole entity. id is not a
readable component (you already hold it); the element type is inferred as
a literal union.
Optionaloptions: EntitySelectOptions<Serialize the store to a plain snapshot. When copy is true the snapshot
is detached from the live store (column/entity buffers are copied) so it
remains valid after subsequent mutations; otherwise it references live
buffers and is only valid until the next mutation. See Database.toData()
for the bug this copy flag addresses for transient-bearing strategies.
options.scope selects which persistent quadrants to emit; omit for all.
Optionaloptions: ToDataOptions
Count the entities
selectwould return for the same arguments — without building an entity array. With nowherefilter it sums matched archetype row counts (O(matched archetypes));orderis ignored (irrelevant to a count).