Skip to content

Defined in: src/schema/schema.ts:42

A schema: the named, typed attributes an entity of one kind carries, and which of them the node indexes. Built with defineSchema.

A schema is an SDK-side convention. The node sees only attributes, each with a type and an indexed flag; the schema is what types the SDK’s writes and reads, and checks them at runtime.

A named schema also tags every entity it creates with its name, in the indexed SCHEMA_ATTRIBUTE attribute, so that a query through it sees only its own entities.

C extends Columns = Columns

The columns, keyed by attribute name.

readonly columns: C

Defined in: src/schema/schema.ts:46

The columns, keyed by attribute name, in the order they were declared.


readonly name: string | undefined

Defined in: src/schema/schema.ts:44

The name entities are tagged with, or undefined for an untagged schema.


readonly tag: StrValue | undefined

Defined in: src/schema/schema.ts:48

The tag every create writes and every query filters on, if the schema is named.