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/utils.ts:897

Properties

PropertyModifierType
dartpublicany

Accessors

cardinality

get cardinality(): string

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

Returns

string

Source

src/utils.ts:927


comment

get comment(): string

User-defined comment describing this relation.

Returns

string

Source

src/utils.ts:913


connection

get connection(): DataConnection

Connection object this relation belongs to.

Returns

DataConnection

Source

src/utils.ts:942


fromColumns

get fromColumns(): string[]

List of source table columns participating in the relation.

Returns

string[]

Source

src/utils.ts:963


fromSchema

get fromSchema(): string

Schema name of the source table of this relation.

Returns

string

Source

src/utils.ts:949


fromTable

get fromTable(): string

Source table name of this relation.

Returns

string

Source

src/utils.ts:956


isPrimaryPath

get isPrimaryPath(): boolean

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

Returns

boolean

Source

src/utils.ts:935


llmComment

get llmComment(): string

LLM-generated annotation or AI summary for this relation.

Returns

string

Source

src/utils.ts:920


name

get name(): string

The name of this relation.

Returns

string

Source

src/utils.ts:906


toColumns

get toColumns(): string[]

List of target table columns participating in the relation.

Returns

string[]

Source

src/utils.ts:984


toSchema

get toSchema(): string

Schema name of the target table of this relation.

Returns

string

Source

src/utils.ts:970


toTable

get toTable(): string

Target table name of this relation.

Returns

string

Source

src/utils.ts:977

Methods

setCardinality()

setCardinality(cardinality): Promise<void>

Parameters

ParameterType
cardinalitystring

Returns

Promise<void>

Source

src/utils.ts:998


setComment()

setComment(comment): Promise<void>

Parameters

ParameterType
commentstring

Returns

Promise<void>

Source

src/utils.ts:990


setFromColumns()

setFromColumns(cols): Promise<void>

Parameters

ParameterType
colsstring[]

Returns

Promise<void>

Source

src/utils.ts:1014


setFromSchema()

setFromSchema(schema): Promise<void>

Parameters

ParameterType
schemastring

Returns

Promise<void>

Source

src/utils.ts:1006


setFromTable()

setFromTable(table): Promise<void>

Parameters

ParameterType
tablestring

Returns

Promise<void>

Source

src/utils.ts:1010


setIsPrimaryPath()

setIsPrimaryPath(isPrimaryPath): Promise<void>

Parameters

ParameterType
isPrimaryPathboolean

Returns

Promise<void>

Source

src/utils.ts:1002


setLlmComment()

setLlmComment(llmComment): Promise<void>

Parameters

ParameterType
llmCommentstring

Returns

Promise<void>

Source

src/utils.ts:994


setToColumns()

setToColumns(cols): Promise<void>

Parameters

ParameterType
colsstring[]

Returns

Promise<void>

Source

src/utils.ts:1026


setToSchema()

setToSchema(schema): Promise<void>

Parameters

ParameterType
schemastring

Returns

Promise<void>

Source

src/utils.ts:1018


setToTable()

setToTable(table): Promise<void>

Parameters

ParameterType
tablestring

Returns

Promise<void>

Source

src/utils.ts:1022