Skip to main content

DbRelationInfo

Defined in: js-api/src/data.ts:629

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​

Constructor​

new DbRelationInfo(dart): DbRelationInfo

Defined in: js-api/src/data.ts:636

Creates a new DbRelationInfo wrapper.

Parameters​

ParameterTypeDescription
dartanyThe underlying Dart object representing a relation.

Returns​

DbRelationInfo

Properties​

PropertyModifierTypeDefined in
dartpublicanyjs-api/src/data.ts:630

Accessors​

cardinality​

Get Signature​

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

Defined in: js-api/src/data.ts:659

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

Returns​

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

Implementation of​

DbRelationProperties.cardinality


comment​

Get Signature​

get comment(): string | undefined

Defined in: js-api/src/data.ts:645

User-defined comment describing this relation.

Returns​

string | undefined

Implementation of​

DbRelationProperties.comment


connection​

Get Signature​

get connection(): DataConnection

Defined in: js-api/src/data.ts:674

Connection object this relation belongs to.

Returns​

DataConnection


fromColumns​

Get Signature​

get fromColumns(): string[] | undefined

Defined in: js-api/src/data.ts:695

List of source table columns participating in the relation.

Returns​

string[] | undefined


fromSchema​

Get Signature​

get fromSchema(): string | undefined

Defined in: js-api/src/data.ts:681

Schema name of the source table of this relation.

Returns​

string | undefined

Implementation of​

DbRelationProperties.fromSchema


fromTable​

Get Signature​

get fromTable(): string | undefined

Defined in: js-api/src/data.ts:688

Source table name of this relation.

Returns​

string | undefined


isPrimaryPath​

Get Signature​

get isPrimaryPath(): boolean | undefined

Defined in: js-api/src/data.ts:667

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

Returns​

boolean | undefined

Implementation of​

DbRelationProperties.isPrimaryPath


llmComment​

Get Signature​

get llmComment(): string | undefined

Defined in: js-api/src/data.ts:652

LLM-generated annotation or AI summary for this relation.

Returns​

string | undefined

Implementation of​

DbRelationProperties.llmComment


toColumns​

Get Signature​

get toColumns(): string[] | undefined

Defined in: js-api/src/data.ts:716

List of target table columns participating in the relation.

Returns​

string[] | undefined


toSchema​

Get Signature​

get toSchema(): string | undefined

Defined in: js-api/src/data.ts:702

Schema name of the target table of this relation.

Returns​

string | undefined

Implementation of​

DbRelationProperties.toSchema


toTable​

Get Signature​

get toTable(): string | undefined

Defined in: js-api/src/data.ts:709

Target table name of this relation.

Returns​

string | undefined