# Class: Relation

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

abstract

hideconstructor

# Hierarchy

# Accessors

# sourceAdjective

get sourceAdjective(): string | undefined

Defined in src/pg-structure/base/relation.ts:85

Source table's adjective extracted from foreign key name.

Returns: string | undefined


# sourceName

get sourceName(): string

Defined in src/pg-structure/base/relation.ts:75

Source table name.

Returns: string


# targetAdjective

get targetAdjective(): string | undefined

Defined in src/pg-structure/base/relation.ts:90

Source table's adjective extracted from foreign key name.

Returns: string | undefined


# targetName

get targetName(): string

Defined in src/pg-structure/base/relation.ts:80

Target table name

Returns: string

# Methods

# getSourceNameWithout

getSourceNameWithout(without: RelationWithout | RelationWithout[]): string

Defined in src/pg-structure/base/relation.ts:60

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

Parameters:

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

Returns: string

source table name after given tables' names replaced.


# getTargetNameWithout

getTargetNameWithout(without: RelationWithout | RelationWithout[]): string

Defined in src/pg-structure/base/relation.ts:70

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

Parameters:

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

Returns: string

target table name after given tables' names replaced.