DataConnection
Represents a data connection
Extends
Constructors
new DataConnection()
new DataConnection(
dart):DataConnection
Parameters
| Parameter | Type |
|---|---|
dart | any |
Returns
Overrides
Constructs
DataConnection
Source
Properties
| Property | Modifier | Type | Inherited from |
|---|---|---|---|
dart | public | any | Entity.dart |
parameters | public | any | - |
Accessors
author
getauthor():User
Who created entity *
Returns
Source
createdOn
getcreatedOn():Dayjs
Time when entity was created *
Returns
Dayjs
Source
credentials
getcredentials():Credentials
Returns
Source
dataSource
getdataSource():string
Returns
string
Source
friendlyName
getfriendlyName():string
Entity friendly name
setfriendlyName(x):void
Parameters
| Parameter | Type |
|---|---|
x | string |
Returns
string
Source
id
getid():string
Entity ID (GUID)
setid(x):void
Parameters
| Parameter | Type |
|---|---|
x | string |
Returns
string
Source
name
getname():string
Entity short name
setname(x):void
Parameters
| Parameter | Type |
|---|---|
x | string |
Returns
string
Source
nqName
getnqName():string
Entity full-qualified name
Returns
string
Source
path
getpath():string
Entity path
Returns
string
Source
updatedOn
getupdatedOn():null|Dayjs
Time when entity was updated *
Returns
null | Dayjs
Source
Methods
buildQuery()
buildQuery(
table):TableQueryBuilder
Parameters
| Parameter | Type |
|---|---|
table | string |
Returns
Source
getProperties()
getProperties():
Promise<object>
Gets entity properties
Returns
Promise<object>
Inherited from
Source
hasTag()
hasTag(
tag):boolean
Parameters
| Parameter | Type |
|---|---|
tag | string |
Returns
boolean
Inherited from
Source
newId()
newId():
void
Generates new id for this entity.
Returns
void
Inherited from
Source
query()
query(
name,sql):DataQuery
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
Source
setProperties()
setProperties(
props):Promise<any>
Sets entity properties
Parameters
| Parameter | Type |
|---|---|
props | object |
Returns
Promise<any>
Inherited from
Source
tableQuery()
tableQuery(
tableName):TableQuery
Parameters
| Parameter | Type |
|---|---|
tableName | string |
Returns
Source
tag()
tag(
tag):boolean
Adds a specified tag
Parameters
| Parameter | Type |
|---|---|
tag | string |
Returns
boolean
Inherited from
Source
test()
test():
Promise<string>
Tests the connection, returns "ok" on success or an error message on error
Returns
Promise<string>
Source
toString()
toString():
string
Returns a string representing the object
Returns
string
Inherited from
Source
unTag()
unTag(
tag):boolean
Removes a specified tag
Parameters
| Parameter | Type |
|---|---|
tag | string |
Returns
boolean
Inherited from
Source
create()
staticcreate(name,parameters):DataConnection
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 |