AggregateExpression
open class AggregateExpression : DataValue, @unchecked Sendable
Encapsulates an OData aggregate expression item.
-
Default initializer.
Declaration
Swift
override public init() -
Adds a ‘from’ clause to the aggregate expression.
Declaration
Swift
open func addFrom(_ from: AggregateFrom) -> AggregateExpressionParameters
fromThe ‘from’ clause to be added.
Return Value
The aggregate expression value.
-
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.
Declaration
Swift
@inline(__always) public final var alias: String? { get } -
Declaration
Swift
override open func copyMutable() -> DataValueReturn Value
A clone of this value if it (together with all value subcomponents) is possibly mutable, or return
selfvalue 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) -> AggregateExpressionParameters
aliasThe 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?) -> AggregateExpressionParameters
valueThe value to be aggregated.
methodThe aggregate method to be used for aggregating.
aliasThe 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?) -> AggregateExpressionParameters
valueThe value to be aggregated.
methodThe aggregate method to be used for aggregating.
aliasThe alias for the returned result property.
navigationPathThe 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(_ method: AggregateMethod?, _ items: PropertyPath...) -> AggregateExpressionParameters
methodThe aggregate method for the ‘from’ clause.
rest_itemsThe list of property paths for the ‘from’ clause.
Return Value
The aggregate expression value.
-
True if the aggregate transformation represents a $count item.
Declaration
Swift
@inline(__always) public final var isCount: Bool { get } -
The method of the aggregate transformation.
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
dataTypeis 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() -> StringReturn Value
Lexical representation of this data value.
-
The value of the aggregate transformation.
Declaration
Swift
@inline(__always) public final var value: DataValue? { get }