DbRelationInfo
Represents metadata for a database relation in Datagrok.
DbRelationInfo describes how two tables are connected, including the
schema/table pairs, participating columns, cardinality, and whether this
relation is considered a primary navigation path.
Mutation methods do not modify underlying database, they just create metadata in Datagrok.
Implements
Constructors
new DbRelationInfo()
new DbRelationInfo(
dart):DbRelationInfo
Creates a new DbRelationInfo wrapper.
Parameters
| Parameter | Type | Description |
|---|---|---|
dart | any | The underlying Dart object representing a relation. |
Returns
Source
Properties
| Property | Modifier | Type |
|---|---|---|
dart | public | any |
Accessors
cardinality
getcardinality():string
The relation cardinality (e.g., "one-to-many", "many-to-one").
Returns
string
Source
comment
getcomment():string
User-defined comment describing this relation.
Returns
string
Source
connection
getconnection():DataConnection
Connection object this relation belongs to.
Returns
Source
fromColumns
getfromColumns():string[]
List of source table columns participating in the relation.
Returns
string[]
Source
fromSchema
getfromSchema():string
Schema name of the source table of this relation.
Returns
string
Source
fromTable
getfromTable():string
Source table name of this relation.
Returns
string
Source
isPrimaryPath
getisPrimaryPath():boolean
Indicates whether this relation is treated as a primary navigation path (e.g., preferred for automated join suggestions).
Returns
boolean
Source
llmComment
getllmComment():string
LLM-generated annotation or AI summary for this relation.
Returns
string
Source
name
getname():string
The name of this relation.
Returns
string
Source
toColumns
gettoColumns():string[]
List of target table columns participating in the relation.
Returns
string[]
Source
toSchema
gettoSchema():string
Schema name of the target table of this relation.
Returns
string
Source
toTable
gettoTable():string
Target table name of this relation.
Returns
string
Source
Methods
setCardinality()
setCardinality(
cardinality):Promise<void>
Parameters
| Parameter | Type |
|---|---|
cardinality | string |
Returns
Promise<void>
Source
setComment()
setComment(
comment):Promise<void>
Parameters
| Parameter | Type |
|---|---|
comment | string |
Returns
Promise<void>
Source
setFromColumns()
setFromColumns(
cols):Promise<void>
Parameters
| Parameter | Type |
|---|---|
cols | string[] |
Returns
Promise<void>
Source
setFromSchema()
setFromSchema(
schema):Promise<void>
Parameters
| Parameter | Type |
|---|---|
schema | string |
Returns
Promise<void>
Source
setFromTable()
setFromTable(
table):Promise<void>
Parameters
| Parameter | Type |
|---|---|
table | string |
Returns
Promise<void>
Source
setIsPrimaryPath()
setIsPrimaryPath(
isPrimaryPath):Promise<void>
Parameters
| Parameter | Type |
|---|---|
isPrimaryPath | boolean |
Returns
Promise<void>
Source
setLlmComment()
setLlmComment(
llmComment):Promise<void>
Parameters
| Parameter | Type |
|---|---|
llmComment | string |
Returns
Promise<void>
Source
setToColumns()
setToColumns(
cols):Promise<void>
Parameters
| Parameter | Type |
|---|---|
cols | string[] |
Returns
Promise<void>
Source
setToSchema()
setToSchema(
schema):Promise<void>
Parameters
| Parameter | Type |
|---|---|
schema | string |
Returns
Promise<void>
Source
setToTable()
setToTable(
table):Promise<void>
Parameters
| Parameter | Type |
|---|---|
table | string |
Returns
Promise<void>