Skip to content

Documentation / @warp-drive/core / types / ModelSchema

Interface: ModelSchema<T>

Defined in: core/src/store/deprecated/-private.ts:139

Minimum subset of static schema methods and properties on the "model" class.

Only used when using the legacy schema-service implementation for @warp-drive/legacy/model or when wrapping schema for legacy Adapters/Serializers.

Type Parameters

T

T = unknown

Methods

eachAttribute()

ts
eachAttribute<K>(callback, binding?): void;

Defined in: core/src/store/deprecated/-private.ts:144

Type Parameters

K

K extends string

Parameters

callback

(this, key, attribute) => void

binding?

T

Returns

void


eachRelationship()

ts
eachRelationship<K>(callback, binding?): void;

Defined in: core/src/store/deprecated/-private.ts:148

Type Parameters

K

K extends string

Parameters

callback

(this, key, relationship) => void

binding?

T

Returns

void


eachTransformedAttribute()

ts
eachTransformedAttribute<K>(callback, binding?): void;

Defined in: core/src/store/deprecated/-private.ts:152

Type Parameters

K

K extends string

Parameters

callback

(this, key, type) => void

binding?

T

Returns

void

Properties

attributes

ts
attributes: Map<KeyOrString<T>, LegacyAttributeField>;

Defined in: core/src/store/deprecated/-private.ts:142


fields

ts
fields: Map<KeyOrString<T>, "attribute" | "belongsTo" | "hasMany">;

Defined in: core/src/store/deprecated/-private.ts:141


modelName

ts
modelName: T extends TypedRecordInstance ? TypeFromInstance<T<T>> : string;

Defined in: core/src/store/deprecated/-private.ts:140


relationshipsByName

ts
relationshipsByName: Map<KeyOrString<T>, LegacyRelationshipField>;

Defined in: core/src/store/deprecated/-private.ts:143

Released under the MIT License.