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.

  • Obsolete. Use of with unlabeled parameter.

    Declaration

    Swift

    public static func of(property: Property) -> ExpandItem
  • A path to be expanded in the query results.

    Declaration

    Swift

    final public var path: DataPath!
  • A query to configure the expansion (including nested expands).

    Declaration

    Swift

    final public var query: DataQuery?
  • Default initializer.

    Declaration

    Swift

    override public init()
  • 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.

  • 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() -> 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.