Factory for data tables.

interface DataTableFactory {
    createDataTableCollection(
        dataTables?: Iterable<DataTable>,
    ): DataTableCollection;
    createDataTableFromStore(
        options: {
            allowedFieldNames?: Set<string> | (name: string) => boolean;
            dataSource: Store;
            dataSourceId?: string;
            dataSourceProperties?: Record<string, unknown>;
            dataTableId?: string;
            dataTableTitle?: string;
            idsProvider: DatasetItemIdsProvider;
        },
    ): Promise<DataTable>;
    createDataTableFromStoreAndQuery(
        options: {
            dataSource: Store;
            dataSourceId?: string;
            dataSourceProperties?: Record<string, unknown>;
            dataTableId?: string;
            dataTableTitle?: string;
            queryExpression: ComplexQueryExpression;
            queryOptions?: QueryOptions;
        },
    ): Promise<DataTable>;
}

Methods

  • Creates a data table from a store and an id provider.

    Parameters

    • options: {
          allowedFieldNames?: Set<string> | (name: string) => boolean;
          dataSource: Store;
          dataSourceId?: string;
          dataSourceProperties?: Record<string, unknown>;
          dataTableId?: string;
          dataTableTitle?: string;
          idsProvider: DatasetItemIdsProvider;
      }
        {
      dataTableId?: string;
      dataTableTitle?: string;
      dataSourceId?: string;
      dataSource: Store;
      idsProvider: DatasetItemIdsProvider;
      allowedFieldNames?: Set<string> | ((name: string) => boolean);
      }

    Returns Promise<DataTable>

  • Creates a data table from a store and a query expression.

    Parameters

    • options: {
          dataSource: Store;
          dataSourceId?: string;
          dataSourceProperties?: Record<string, unknown>;
          dataTableId?: string;
          dataTableTitle?: string;
          queryExpression: ComplexQueryExpression;
          queryOptions?: QueryOptions;
      }
        {
      dataTableId?: string;
      dataTableTitle?: string;
      dataSourceId?: string;
      dataSource: Store;
      queryExpression: ComplexQueryExpression;
      queryOptions?: QueryOptions;
      }

    Returns Promise<DataTable>