Db
Defined in: src/data.ts:103
Constructors
Constructor
new Db():
Db
Returns
Db
Methods
buildQuery()
buildQuery(
connectionId,tableName):TableQueryBuilder
Defined in: src/data.ts:120
Creates TableQueryBuilder that can be used to construct sql queries.
Parameters
| Parameter | Type | Description |
|---|---|---|
connectionId | string | fully-qualified connection name (see [nqName]) |
tableName | string | database table name |
Returns
getInfo()
getInfo(
connection,catalog?):Promise<DbInfo[]>
Defined in: src/data.ts:129
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
| Parameter | Type | Default value |
|---|---|---|
connection | DataConnection | undefined |
catalog | string | null | null |
Returns
Promise<DbInfo[]>
query()
query(
connectionId,sql):Promise<DataFrame>
Defined in: src/data.ts:109
Executes a specified sql against the specified connectionId.
Parameters
| Parameter | Type | Description |
|---|---|---|
connectionId | string | fully-qualified connection name (see [nqName]) |
sql | string | SQL statement |
Returns
Promise<DataFrame>