Version: 4.3

Class: EntityGenerator

Hierarchy

  • EntityGenerator

Constructors

constructor

+ new EntityGenerator(em: EntityManager): EntityGenerator

Defined in packages/entity-generator/src/EntityGenerator.ts:14

Parameters:

NameType
emEntityManager

Returns: EntityGenerator

Properties

config

Private Readonly config: Configuration<IDatabaseDriver<Connection>> = this.em.config

Defined in packages/entity-generator/src/EntityGenerator.ts:8


connection

Private Readonly connection: AbstractSqlConnection = this.driver.getConnection()

Defined in packages/entity-generator/src/EntityGenerator.ts:12


driver

Private Readonly driver: AbstractSqlDriver<AbstractSqlConnection> = this.em.getDriver()

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


em

Private Readonly em: EntityManager

Defined in packages/entity-generator/src/EntityGenerator.ts:16


helper

Private Readonly helper: SchemaHelper = this.platform.getSchemaHelper()!

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


namingStrategy

Private Readonly namingStrategy: NamingStrategy = this.config.getNamingStrategy()

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


platform

Private Readonly platform: AbstractSqlPlatform = this.driver.getPlatform()

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


sources

Private Readonly sources: SourceFile[] = []

Defined in packages/entity-generator/src/EntityGenerator.ts:14

Methods

createEntity

createEntity(table: DatabaseTable): void

Defined in packages/entity-generator/src/EntityGenerator.ts:31

Parameters:

NameType
tableDatabaseTable

Returns: void


generate

generate(options?: { baseDir?: string ; save?: boolean }): Promise<string[]>

Defined in packages/entity-generator/src/EntityGenerator.ts:18

Parameters:

NameTypeDefault value
options{ baseDir?: string ; save?: boolean }{}

Returns: Promise<string[]>

Last updated on by Martin Adámek