Skip to content

Instance Subscript

subscript(dynamicMember:)

@dynamicMemberLookup support. The implementation of this subscript is provided automatically and should not be overriden by conforming types. See subscript(dynamicMember:) for details.
subscript<Field>(dynamicMember keyPath: KeyPath<Self.Model, Field>) -> AliasedField<Self, Field> where Field : Property, Self.Model == Field.Model { get }

Default Implementations

ModelAlias Implementations

  • subscript(dynamicMember:)
    An @dynamicMemberLookup subscript which access to the projected values of individual properties of self.model without having to actually add .model to each usage. The AliasedField helper type further ensures that the alias propagates correctly through further helpers and subsysems, most particularly .with() closures in a query for eager- loading.
  • subscript(dynamicMember:)
    An @dynamicMemberLookup subscript which enables direct access to the values of individual properties of self.model without having to actually add .model to each usage.