* @internal
(
entityName: EntityName<Entity> | QueryBuilder<Entity, any, any, any>,
protected readonly metadata: MetadataStorage,
protected readonly driver: AbstractSqlDriver,
protected readonly context?: Transaction,
alias?: string,
protected connectionType?: ConnectionType,
protected em?: SqlEntityManager,
protected loggerContext?: LoggingOptions & Dictionary,
)
| 656 | * @internal |
| 657 | */ |
| 658 | constructor( |
| 659 | entityName: EntityName<Entity> | QueryBuilder<Entity, any, any, any>, |
| 660 | protected readonly metadata: MetadataStorage, |
| 661 | protected readonly driver: AbstractSqlDriver, |
| 662 | protected readonly context?: Transaction, |
| 663 | alias?: string, |
| 664 | protected connectionType?: ConnectionType, |
| 665 | protected em?: SqlEntityManager, |
| 666 | protected loggerContext?: LoggingOptions & Dictionary, |
| 667 | ) { |
| 668 | this.platform = this.driver.getPlatform(); |
| 669 | |
| 670 | if (alias) { |
| 671 | this.#state.aliasCounter++; |
| 672 | this.#state.explicitAlias = true; |
| 673 | } |
| 674 | |
| 675 | // @ts-expect-error union type does not match the overloaded method signature |
| 676 | this.from(entityName, alias); |
| 677 | } |
| 678 | |
| 679 | /** |
| 680 | * Creates a SELECT query, specifying the fields to retrieve. |
nothing calls this directly
no test coverage detected