DataConnection
Defined in: js-api/src/entities/data-connection.ts:602
Represents a data connection https://datagrok.ai/help/access/access#data-connection
Extends
Constructors
Constructor
new DataConnection(
dart):DataConnection
Defined in: js-api/src/entities/data-connection.ts:607
Parameters
| Parameter | Type |
|---|---|
dart | any |
Returns
DataConnection
Overrides
Properties
| Property | Modifier | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|---|
dart | public | any | - | Entity.dart | js-api/src/entities/entity.ts:19 |
parameters | public | any | Connection parameters (server, database, and so on) as a key-value map. | - | js-api/src/entities/data-connection.ts:604 |
Accessors
author
Get Signature
get author():
any
Defined in: js-api/src/entities/entity.ts:57
Who created entity *
Returns
any
Inherited from
createdOn
Get Signature
get createdOn():
Dayjs
Defined in: js-api/src/entities/entity.ts:48
Time when entity was created *
Returns
Dayjs
Inherited from
credentials
Get Signature
get credentials():
Credentials
Defined in: js-api/src/entities/data-connection.ts:613
Credentials attached to the connection.
Returns
dataSource
Get Signature
get dataSource():
string
Defined in: js-api/src/entities/data-connection.ts:618
Data source type, such as Postgres or S3.
Returns
string
entityType
Get Signature
get entityType():
string
Defined in: js-api/src/entities/entity.ts:64
Entity type name *
Returns
string
Inherited from
friendlyName
Get Signature
get friendlyName():
string
Defined in: js-api/src/entities/entity.ts:34
Entity friendly name
Returns
string
Set Signature
set friendlyName(
x):void
Defined in: js-api/src/entities/entity.ts:35
Parameters
| Parameter | Type |
|---|---|
x | string |
Returns
void
Inherited from
id
Get Signature
get id():
string
Defined in: js-api/src/entities/entity.ts:27
Entity ID (GUID)
Returns
string
Set Signature
set id(
x):void
Defined in: js-api/src/entities/entity.ts:28
Parameters
| Parameter | Type |
|---|---|
x | string |
Returns
void
Inherited from
name
Get Signature
get name():
string
Defined in: js-api/src/entities/entity.ts:38
Entity short name
Returns
string
Set Signature
set name(
x):void
Defined in: js-api/src/entities/entity.ts:39
Parameters
| Parameter | Type |
|---|---|
x | string |
Returns
void
Inherited from
nqName
Get Signature
get nqName():
string
Defined in: js-api/src/entities/entity.ts:42
Entity full-qualified name
Returns
string
Inherited from
path
Get Signature
get path():
string
Defined in: js-api/src/entities/entity.ts:45
Entity path
Returns
string
Inherited from
updatedOn
Get Signature
get updatedOn():
Dayjs|null
Defined in: js-api/src/entities/entity.ts:51
Time when entity was updated *
Returns
Dayjs | null
Inherited from
Methods
buildQuery()
buildQuery(
table):TableQueryBuilder
Defined in: js-api/src/entities/data-connection.ts:639
Starts a TableQueryBuilder over [table] of this connection.
Parameters
| Parameter | Type |
|---|---|
table | string |
Returns
getProperties()
getProperties():
Promise<{[index:string]:any; }>
Defined in: js-api/src/entities/entity.ts:67
Gets entity properties
Returns
Promise<{[index: string]: any; }>
Inherited from
hasTag()
hasTag(
tag):boolean
Defined in: js-api/src/entities/entity.ts:79
Parameters
| Parameter | Type |
|---|---|
tag | string |
Returns
boolean
Inherited from
newId()
newId():
void
Defined in: js-api/src/entities/entity.ts:31
Generates new id for this entity.
Returns
void
Inherited from
query()
query(
name,sql):DataQuery
Defined in: js-api/src/entities/data-connection.ts:634
Creates DataQuery using this connection. Can be used only with database connections.
Parameters
| Parameter | Type | Description |
|---|---|---|
name | string | name of the query |
sql | string | text of the query |
Returns
setProperties()
setProperties(
props):Promise<any>
Defined in: js-api/src/entities/entity.ts:72
Sets entity properties
Parameters
| Parameter | Type |
|---|---|
props | {[index: string]: any; } |
Returns
Promise<any>
Inherited from
tableQuery()
tableQuery():
TableQuery
Defined in: js-api/src/entities/data-connection.ts:644
Creates an empty TableQuery over this connection.
Returns
tag()
tag(
tag):boolean
Defined in: js-api/src/entities/entity.ts:82
Adds a specified tag
Parameters
| Parameter | Type |
|---|---|
tag | string |
Returns
boolean
Inherited from
test()
test():
Promise<string>
Defined in: js-api/src/entities/data-connection.ts:626
Tests the connection, returns "ok" on success or an error message on error
Returns
Promise<string>
toString()
toString():
string
Defined in: js-api/src/entities/entity.ts:77
Returns a string representing the object
Returns
string
Inherited from
unTag()
unTag(
tag):boolean
Defined in: js-api/src/entities/entity.ts:85
Removes a specified tag
Parameters
| Parameter | Type |
|---|---|
tag | string |
Returns
boolean
Inherited from
create()
staticcreate(name,parameters):DataConnection
Defined in: js-api/src/entities/data-connection.ts:651
Creates a data connection. Note that in order to be used, it has to be saved first using DataConnectionsDataSource
Parameters
| Parameter | Type | Description |
|---|---|---|
name | string | Connection name |
parameters | DataConnectionProperties | Connection properties |
Returns
DataConnection