Skip to main content

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

ParameterTypeDescription
dartanyThe underlying Dart object representing a relation.

Returns

DbRelationInfo

Source

src/data.ts:464

Properties

PropertyModifierType
dartpublicany

Accessors

cardinality

get cardinality(): undefined | "one-to-one" | "one-to-many" | "many-to-one" | "many-to-many"

The relation cardinality (e.g., "one-to-many", "many-to-one").

Returns

undefined | "one-to-one" | "one-to-many" | "many-to-one" | "many-to-many"

Source

src/data.ts:487


comment

get comment(): undefined | string

User-defined comment describing this relation.

Returns

undefined | string

Source

src/data.ts:473


connection

get connection(): DataConnection

Connection object this relation belongs to.

Returns

DataConnection

Source

src/data.ts:502


fromColumns

get fromColumns(): undefined | string[]

List of source table columns participating in the relation.

Returns

undefined | string[]

Source

src/data.ts:523


fromSchema

get fromSchema(): undefined | string

Schema name of the source table of this relation.

Returns

undefined | string

Source

src/data.ts:509


fromTable

get fromTable(): undefined | string

Source table name of this relation.

Returns

undefined | string

Source

src/data.ts:516


isPrimaryPath

get isPrimaryPath(): undefined | boolean

Indicates whether this relation is treated as a primary navigation path (e.g., preferred for automated join suggestions).

Returns

undefined | boolean

Source

src/data.ts:495


llmComment

get llmComment(): undefined | string

LLM-generated annotation or AI summary for this relation.

Returns

undefined | string

Source

src/data.ts:480


toColumns

get toColumns(): undefined | string[]

List of target table columns participating in the relation.

Returns

undefined | string[]

Source

src/data.ts:544


toSchema

get toSchema(): undefined | string

Schema name of the target table of this relation.

Returns

undefined | string

Source

src/data.ts:530


toTable

get toTable(): undefined | string

Target table name of this relation.

Returns

undefined | string

Source

src/data.ts:537