AggregateExpression
open class AggregateExpression : DataValue
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
@inline(__always) public final var aggregateFromList: AggregateFromList { get }
-
The alias of the aggregate transformation item.
Declaration
Swift
@inline(__always) public final var alias: String? { get }
-
Declaration
Swift
override open func copyMutable() -> DataValue
Return Value
A clone of this value if it (together with all value subcomponents) is possibly mutable, or return
self
value if it (together with all value subcomponents) is definitely immutable. The resulting value might share mutable metadata with this query. -
Creates a $count aggregate expression item.
Declaration
Swift
open class func count(alias: String) -> 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?) -> 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?) -> 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.
-
Data type of the wrapped value.
Declaration
Swift
override open var dataType: DataType { get }
-
Adds a ‘from’ clause to the aggregate expression.
Declaration
Swift
open func from(_ propertyPath: PropertyPath, method: AggregateMethod?) -> 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
@inline(__always) public final var isCount: Bool { get }
-
The method of the aggregate transformation item.
Declaration
Swift
@inline(__always) 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
@inline(__always) public final var navigationPath: PropertyPath? { get }
-
Convert this data value to a string. If the
dataType
is defined by XML Schema Part 2: Datatypes, then the corresponding lexical format is used. JSON format is used for structured values (arrays and objects).Declaration
Swift
override open func toString() -> String
Return Value
Lexical representation of this data value.
-
The value of the aggregate transformation item.
Declaration
Swift
@inline(__always) public final var value: DataValue? { get }