Version: 4.3

Class: SourceFile

Hierarchy

  • SourceFile

Constructors

constructor

+ new SourceFile(meta: EntityMetadata, namingStrategy: NamingStrategy, helper: SchemaHelper): SourceFile

Defined in packages/entity-generator/src/SourceFile.ts:7

Parameters:

NameType
metaEntityMetadata
namingStrategyNamingStrategy
helperSchemaHelper

Returns: SourceFile

Properties

coreImports

Private Readonly coreImports: Set<string> = new Set<string>()

Defined in packages/entity-generator/src/SourceFile.ts:6


entityImports

Private Readonly entityImports: Set<string> = new Set<string>()

Defined in packages/entity-generator/src/SourceFile.ts:7


helper

Private Readonly helper: SchemaHelper

Defined in packages/entity-generator/src/SourceFile.ts:11


meta

Private Readonly meta: EntityMetadata

Defined in packages/entity-generator/src/SourceFile.ts:9


namingStrategy

Private Readonly namingStrategy: NamingStrategy

Defined in packages/entity-generator/src/SourceFile.ts:10

Methods

generate

generate(): string

Defined in packages/entity-generator/src/SourceFile.ts:13

Returns: string


getBaseName

getBaseName(): string

Defined in packages/entity-generator/src/SourceFile.ts:53

Returns: string


getCommonDecoratorOptions

PrivategetCommonDecoratorOptions(options: Dictionary, prop: EntityProperty, columnType: string | undefined): void

Defined in packages/entity-generator/src/SourceFile.ts:123

Parameters:

NameType
optionsDictionary
propEntityProperty
columnTypestring | undefined

Returns: void


getDecoratorType

PrivategetDecoratorType(prop: EntityProperty): string

Defined in packages/entity-generator/src/SourceFile.ts:194

Parameters:

NameType
propEntityProperty

Returns: string


getForeignKeyDecoratorOptions

PrivategetForeignKeyDecoratorOptions(options: Dictionary, prop: EntityProperty): void

Defined in packages/entity-generator/src/SourceFile.ts:159

Parameters:

NameType
optionsDictionary
propEntityProperty

Returns: void


getPropertyDecorator

PrivategetPropertyDecorator(prop: EntityProperty, padLeft: number): string

Defined in packages/entity-generator/src/SourceFile.ts:71

Parameters:

NameType
propEntityProperty
padLeftnumber

Returns: string


getPropertyDefinition

PrivategetPropertyDefinition(prop: EntityProperty, padLeft: number): string

Defined in packages/entity-generator/src/SourceFile.ts:57

Parameters:

NameType
propEntityProperty
padLeftnumber

Returns: string


getPropertyIndexes

PrivategetPropertyIndexes(prop: EntityProperty, options: Dictionary): string[]

Defined in packages/entity-generator/src/SourceFile.ts:95

Parameters:

NameType
propEntityProperty
optionsDictionary

Returns: string[]


getScalarPropertyDecoratorOptions

PrivategetScalarPropertyDecoratorOptions(options: Dictionary, prop: EntityProperty, columnType: string | undefined): void

Defined in packages/entity-generator/src/SourceFile.ts:143

Parameters:

NameType
optionsDictionary
propEntityProperty
columnTypestring | undefined

Returns: void

Last updated on by Martin Adámek