New in 1.34.0 (BETA)

transform(params)

Returns a new DataScope instance with applied transformations specified by the params. The parameters are provided to the corresponding index callback as IndexParams.

Params

  • params (Object) – Transformation parameters.
    • search (String) – An optional search string.
    • filters (Object) – Optional filters. The Object keys are attribute names (String), the values are those by which the results are to be filtered (also String).
    • limit (Number) – An optional size limit for the result set.
    • order (Array) – An optional order specification. An order specification describes how the results are to be sorted by the application that integrates the Scrivito SDK with an external data provider. Each entry in the order specification is a tuple of strings. The first entry in the tuple represents the attribute name to which the sorting is to be applied (e.g. "title"). The second entry in the tuple is the order direction. There are two possible order directions, "asc" and "desc".

Returns

DataScope – A new DataScope with applied transformations.