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:473

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:496


comment

get comment(): undefined | string

User-defined comment describing this relation.

Returns

undefined | string

Source

src/data.ts:482


connection

get connection(): DataConnection

Connection object this relation belongs to.

Returns

DataConnection

Source

src/data.ts:511


fromColumns

get fromColumns(): undefined | string[]

List of source table columns participating in the relation.

Returns

undefined | string[]

Source

src/data.ts:532


fromSchema

get fromSchema(): undefined | string

Schema name of the source table of this relation.

Returns

undefined | string

Source

src/data.ts:518


fromTable

get fromTable(): undefined | string

Source table name of this relation.

Returns

undefined | string

Source

src/data.ts:525


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:504


llmComment

get llmComment(): undefined | string

LLM-generated annotation or AI summary for this relation.

Returns

undefined | string

Source

src/data.ts:489


toColumns

get toColumns(): undefined | string[]

List of target table columns participating in the relation.

Returns

undefined | string[]

Source

src/data.ts:553


toSchema

get toSchema(): undefined | string

Schema name of the target table of this relation.

Returns

undefined | string

Source

src/data.ts:539


toTable

get toTable(): undefined | string

Target table name of this relation.

Returns

undefined | string

Source

src/data.ts:546