| 79 | } |
| 80 | |
| 81 | override createQueryBuilder<T extends AnyEntity<T>>( |
| 82 | entityName: EntityName<T>, |
| 83 | ctx?: Transaction, |
| 84 | preferredConnectionType?: ConnectionType, |
| 85 | convertCustomTypes?: boolean, |
| 86 | loggerContext?: LoggingOptions, |
| 87 | alias?: string, |
| 88 | em?: SqlEntityManager, |
| 89 | ): MsSqlQueryBuilder<T, any, any, any> { |
| 90 | // do not compute the connectionType if EM is provided as it will be computed from it in the QB later on |
| 91 | const connectionType = em |
| 92 | ? preferredConnectionType |
| 93 | : this.resolveConnectionType({ ctx, connectionType: preferredConnectionType }); |
| 94 | const qb = new MsSqlQueryBuilder<T, any, any, any>( |
| 95 | entityName, |
| 96 | this.metadata, |
| 97 | this, |
| 98 | ctx, |
| 99 | alias, |
| 100 | connectionType, |
| 101 | em, |
| 102 | loggerContext, |
| 103 | ); |
| 104 | |
| 105 | if (!convertCustomTypes) { |
| 106 | qb.unsetFlag(QueryFlag.CONVERT_CUSTOM_TYPES); |
| 107 | } |
| 108 | |
| 109 | return qb; |
| 110 | } |
| 111 | |
| 112 | private appendOutputTable<T extends AnyEntity<T>>( |
| 113 | entityName: EntityName<T>, |