ExpandItem

open class ExpandItem : ObjectBase

Encapsulates an OData expand item. An expand item indicates a property (or expression) that is used in the $expand system query option.

See also

DataQuery.expandItems, DataQuery.expand.
  • Obsolete. Use of with unlabeled parameter.

    Declaration

    Swift

    public static func of(property: Property) -> ExpandItem
  • A query to configure the expansion (including nested expands).

    Declaration

    Swift

    final public var query: DataQuery?
  • Was this expand item added for internal use (e.g. needed for server-side query processing, but not requested by client).

    Declaration

    Swift

    final public var isHidden: Bool
  • Default initializer.

    Declaration

    Swift

    override public init()
  • Declaration

    Swift

    open func copyMutable() -> ExpandItem

    Return Value

    a copy of this item which doesn’t share mutable values with this item.

  • Declaration

    Swift

    open class func of(_ item: PropertyPath) -> ExpandItem

    Parameters

    item

    Item to be expanded.

    Return Value

    A new expand item for the specified property.

  • A path to be expanded in the query results.

    Declaration

    Swift

    public final var path: DataPath { get set }
  • Declaration

    Swift

    open func requiredQuery() -> DataQuery

    Return Value

    query is it is non-null, otherwise a new DataQuery.

  • If this expand item references a simple property path, then return the property. Otherwise return nil.

    Declaration

    Swift

    open func toProperty() -> Property?

    Return Value

    The property to be expanded, or nil.

  • If this expand item references a simple property path, then return the property. Otherwise throw an exception.

    Throws

    UndefinedException if this select item does not reference a simple property path.

    Declaration

    Swift

    open func toRequiredProperty() throws -> Property

    Return Value

    The property to be selected.

  • Declaration

    Swift

    override open func toString() -> String

    Return Value

    A string representation of this expand item.

  • Set the query of this expand item.

    Declaration

    Swift

    open func withQuery(_ query: DataQuery) -> ExpandItem

    Parameters

    query

    Data query.

    Return Value

    This query.