DataManager interface for defining the data source(s)

Hierarchy

  • IDataManager

Index

Methods

addCommonTable

  • Adds a common table

    Parameters

    Returns string

    internal id to the added common table for reference

addDataSource

  • addDataSource(name?: undefined | string, sourceReference?: unknown, id?: undefined | number): IDataSource
  • Creates and adds an empty datasource object.

    Parameters

    • Optional name: undefined | string

      Initial name of the datasource. If undefined, a random name will be generated. Can be changed later using the Name property.

    • Optional sourceReference: unknown

      optional external reference

    • Optional id: undefined | number

      optional id to set the cid suffix (1 ≤ id ≤ 99999)

    Returns IDataSource

    The new datasource object.

addDataSourceAsync

  • Adds an asynchronous data source

    Parameters

    Returns Promise<string>

    internal id to the added data context for reference

calcCidFn

  • calcCidFn(fn: function): void
  • register a callback function to calculate a context id that is used internally in TRUECHART IMPORTANT: It is only there for support legacy apps, do not register a callback for new BI plattform implementations

    Parameters

    • fn: function

      function to calculate a context id

        • (): string
        • Returns string

    Returns void

getAllDataSources

  • Returns an array with all data sources

    Returns IDataModelBaseAsync[]

getCommonTable

  • Gets a previously added common table

    Parameters

    • id: string

      Internal id of the common table

    Returns IDataCommonTable | undefined

    The common table

getDataSourceById

  • Gets a previously added data context by id (internal cid)

    Parameters

    • id: string

      Internal id of the data context

    Returns IDataModelBaseAsync | IDataSource

    The data context

removeCommonTable

  • removeCommonTable(id: string): void
  • Removes a previously added common table

    Parameters

    • id: string

      Internal id of the common table

    Returns void

removeDataSource

  • removeDataSource(id: string): void
  • Removes a previously added datasource

    Parameters

    • id: string

      Internal id of the datasource

    Returns void