API.getDataset

//Don't use this constructor directly, use:
API.v1.createDataset(caseId, datasetId, widgetId);

Methods

  • Adds an aggregated column to the dataset

    Parameters

    • column: string
    • operator: string
    • alias: string
    • dataType: string = 'double'

    Returns this

  • Parameters

    • alias: string

      the alias of the column to be excluded from xss sanitation

    Returns void

  • Execute the constructed dataset query and return the result

    Returns Promise<{ columns: any; info: any; paging: any; rows: Record<string, any>[] }>

  • Groups the dataset by a column

    Parameters

    • column: string
    • alias: string
    • allowHtml: boolean = false

    Returns Dataset

  • Limit the number of rows to retrieve

    Parameters

    • limit: number

      maximum number of rows to retrieve

    Returns this

  • Pre-filter the dataset with a condition list

    Parameters

    • list: Or | And | ConditionList

    Returns Dataset

  • Remove all sorts / conditions and additional columns

    Returns Dataset

  • Select only a subset of all the available columns

    Parameters

    • ...columns: string[]

      one or multiple columns

    Returns Dataset

  • Enable or disable error passing to the caller instead of showing error messages When enabled, errors will be passed to the catch() handler instead of being shown in the UI

    Parameters

    • enabled: boolean = true

      whether to pass errors to the caller

    Returns this

  • Skip the first n rows of the resulting dataset

    Parameters

    • skip: number

      number of rows to skip

    Returns Dataset

  • Sort the dataset on a column in a given direction. If no direction is given, it will default to 'asc'.

    Parameters

    • column: string
    • direction: "asc" | "desc" = 'asc'

    Returns Dataset

  • Use column ids when sorting, searching and returning data (no aliases, references, etc.) There is only a very small chance you'll ever want to use this other than for debugging.

    Returns Dataset

  • Use column external references when sorting, searching and returning data

    Returns Dataset

  • Filter the dataset with a condition list

    Parameters

    • list: Or | And | ConditionList

    Returns this

  • Parameters

    • ...conditions: (Condition | Or | And)[]

      one or more conditions (Condition, Or or And)

    Returns And

  • Returns a new condition object

    Parameters

    • column: string
    • operator: OperatorString
    • value: string
    • valueType: string

    Returns Condition

  • Parameters

    • ...conditions: (Condition | Or | And)[]

      one or more conditions (Condition, Or or And)

    Returns Or