Skip to main content

Db

Constructors

new Db()

new Db(): Db

Returns

Db

Methods

buildQuery()

buildQuery(connectionId, tableName): TableQueryBuilder

Creates TableQueryBuilder that can be used to construct sql queries.

Parameters

ParameterTypeDescription
connectionIdstringfully-qualified connection name (see [nqName])
tableNamestringdatabase table name

Returns

TableQueryBuilder

Source

src/data.ts:120


getInfo()

getInfo(connection, catalog): Promise <DbInfo[]>

Returns database catalog (e.g. database) information for the given connection. If catalog is specified, returns only the matching catalog. For databases that don't support catalogs (e.g., MySQL, Oracle), returns a single DbInfo with the name from the connection's db property, or '<unknown database name>' if not set.

Parameters

ParameterTypeDefault value
connectionDataConnectionundefined
catalognull | stringnull

Returns

Promise <DbInfo[]>

Source

src/data.ts:129


query()

query(connectionId, sql): Promise <DataFrame>

Executes a specified sql against the specified connectionId.

Parameters

ParameterTypeDescription
connectionIdstringfully-qualified connection name (see [nqName])
sqlstringSQL statement

Returns

Promise <DataFrame>

Source

src/data.ts:109