Skip to content

Protocol

QueryAddressableProperty

Marks a property as being “query addressable”, meaning that it is either itself queryable (QueryableProperty implies QueryAddressableProperty), or it represents some other single property that is queryable. This allows properties whose purpose is to wrap or otherwise stand in for other properties to be handled generically without the need to add special case exceptions for those property types.
protocol QueryAddressableProperty : AnyQueryAddressableProperty, Property

Overview

@Parent is the canonical example of an addressable, non-queryable property. It provides the related model as its value, and contains a @Field property holding that model’s ID. That underlying property means the relation can be “addressed” by a query, but the value type is wrong for it to be directly queryable. Providing the underlying field when the relation is “addressed” allows handling a model’s property list (or, say, the property list of a Fields type being used as a composite ID value) fully generically and without special-casing or having to revisit the logic if additional property types come along.

Topics

Associated Types

Instance Properties

Relationships

Inherits From

Conforming Types