AggregateExpression
open class AggregateExpression : ObjectBase
Encapsulates an OData aggregate expression item.
-
Default initializer.
Declaration
Swift
override public init()
-
The items in the “from” clause of the aggregate item.
Declaration
Swift
public final var aggregateFromList: AggregateFromList { get }
-
The alias of the aggregate transformation item.
Declaration
Swift
public final var alias: String? { get }
-
Creates a $count aggregate expression item.
Declaration
Swift
open class func count(alias: String) throws -> AggregateExpression
Parameters
alias
The alias for the aggregate item.
Return Value
The aggregate transformation value.
-
Creates an aggregate expression item.
Declaration
Swift
open class func create(_ value: DataValue?, method: AggregateMethod?, alias: String?) throws -> AggregateExpression
Parameters
value
The value to be aggregated.
method
The aggregate method to be used for aggregating.
alias
The alias for the returned result property.
Return Value
The aggregate transformation value.
-
Creates an aggregate expression item.
Declaration
Swift
open class func createWithNavigationPath(_ value: DataValue?, method: AggregateMethod?, alias: String?, navigationPath: PropertyPath?) throws -> AggregateExpression
Parameters
value
The value to be aggregated.
method
The aggregate method to be used for aggregating.
alias
The alias for the returned result property.
navigationPath
The path of the related entities to apply the aggregate transformation on.
Return Value
The aggregate transformation value.
-
Adds a ‘from’ clause to the aggregate expression.
Declaration
Swift
open func from(_ propertyPath: PropertyPath, method: AggregateMethod?) throws -> AggregateExpression
Parameters
propertyPath
The property path for the ‘from’ clause.
method
The aggregate method for the ‘from’ clause.
Return Value
The aggregate expression value.
-
True if the aggregate transformation item represents a $count item.
Declaration
Swift
public final var isCount: Bool { get }
-
The method of the aggregate transformation item.
Declaration
Swift
public final var method: AggregateMethod? { get }
-
The navigation path to be applied for the aggregate expression. All the paths will be evaluated relative to this path.
Declaration
Swift
public final var navigationPath: PropertyPath? { get }
-
The value of the aggregate transformation item.
Declaration
Swift
public final var value: DataValue? { get }