TopTransform

open class TopTransform : AmountTransform, @unchecked Sendable

Represents the top* transformations.

  • 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 ‘topcount’ transformation.

    Declaration

    Swift

    open class func count(amount: Int, value: DataValue) -> TopTransform

    Parameters

    amount

    The amount to be applied.

    value

    The value by which the transformation will compare the instances in the entity set.

    Return Value

    The Toptransformation.

  • Creates a ‘toppercent’ transformation.

    Declaration

    Swift

    open class func percent(amount: Double, value: DataValue) -> TopTransform

    Parameters

    amount

    The amount to be applied.

    value

    The value by which the transformation will compare the instances in the entity set.

    Return Value

    The TopTransform item.

  • Creates a ‘topsum’ transformation.

    Declaration

    Swift

    open class func sum(amount: Double, value: DataValue) -> TopTransform

    Parameters

    amount

    The amount to be applied.

    value

    The value by which the transformation will compare the instances in the entity set.

    Return Value

    The TopTransform item.

  • Creates a ‘top’ transformation.

    Declaration

    Swift

    open class func top(_ amount: Int) -> TopTransform

    Parameters

    amount

    The top amount to be returned.

    Return Value

    The Toptransformation.