pg-structure / Relation

# Class: Relation

Class which represent a relationship. Provides attributes and methods for details of the relationship.

abstract

hideconstructor

# Hierarchy

# Accessors

# sourceAdjective

• get sourceAdjective(): undefined | string

Source table's adjective extracted from foreign key name.

Returns: undefined | string

Defined in: pg-structure/base/relation.ts:86


# sourceName

• get sourceName(): string

Source table name.

Returns: string

Defined in: pg-structure/base/relation.ts:76


# targetAdjective

• get targetAdjective(): undefined | string

Source table's adjective extracted from foreign key name.

Returns: undefined | string

Defined in: pg-structure/base/relation.ts:91


# targetName

• get targetName(): string

Target table name

Returns: string

Defined in: pg-structure/base/relation.ts:81

# Methods

# getSourceNameWithout

getSourceNameWithout(without: any | source | target | RelationWithout[]): string

Returns source table name after replacing given tables' names from it.

# Parameters:

Name Type Description
without any | source | target | RelationWithout[] is type or types of tables to exclude names of.

Returns: string

source table name after given tables' names replaced.

Defined in: pg-structure/base/relation.ts:61


# getTargetNameWithout

getTargetNameWithout(without: any | source | target | RelationWithout[]): string

Returns target table name after replacing given tables' names from it.

# Parameters:

Name Type Description
without any | source | target | RelationWithout[] is type or types of tables to exclude names of.

Returns: string

target table name after given tables' names replaced.

Defined in: pg-structure/base/relation.ts:71