SDK for generating the properly formatted query strings based on the API documented at developer.domo.com. This is the default export of the library.

Example Usage

import { SqlClient as Query } from '@domoinc/toolkit';

const datasetAlias = 'dsAlias';

(new Query())
.get('alias', `select * from ${datasetalias}`)
.then((data) => {
// do something with the data
console.table(data);
});

Hierarchy

  • SqlClient

Constructors

Methods

  • A helper method for generating a GET request. This method also enables caching requests.

    Parameters

    • alias: string
    • query: string

    Returns Promise<Response<SqlResponse>>

  • Parameters

    • value: string

    Returns string

  • A helper method for reading page filters and transforming each of them into a SQL predicate. e.g. "First Name" = 'Stephen Strange. There is also an overload version that will concatenate the predicates together into WHERE and HAVING clauses (if any, for each). To get the concatenated predicates, set the

    Parameters

    • datasets: string[]

    Returns Record<string, SQLPredicateBlock[]>

  • Parameters

    • datasets: string[]
    • produceClauses: boolean

    Returns Record<string, SQLClauseResult>

Generated using TypeDoc