| 23 | } |
| 24 | |
| 25 | override createQueryBuilder<T extends AnyEntity<T>>( |
| 26 | entityName: EntityName<T>, |
| 27 | ctx?: Transaction, |
| 28 | preferredConnectionType?: ConnectionType, |
| 29 | convertCustomTypes?: boolean, |
| 30 | loggerContext?: LoggingOptions, |
| 31 | alias?: string, |
| 32 | em?: SqlEntityManager, |
| 33 | ): MariaDbQueryBuilder<T, any, any, any> { |
| 34 | // do not compute the connectionType if EM is provided as it will be computed from it in the QB later on |
| 35 | const connectionType = em |
| 36 | ? preferredConnectionType |
| 37 | : this.resolveConnectionType({ ctx, connectionType: preferredConnectionType }); |
| 38 | const qb = new MariaDbQueryBuilder<T, any, any, any>( |
| 39 | entityName, |
| 40 | this.metadata, |
| 41 | this, |
| 42 | ctx, |
| 43 | alias, |
| 44 | connectionType, |
| 45 | em, |
| 46 | loggerContext, |
| 47 | ); |
| 48 | |
| 49 | if (!convertCustomTypes) { |
| 50 | qb.unsetFlag(QueryFlag.CONVERT_CUSTOM_TYPES); |
| 51 | } |
| 52 | |
| 53 | return qb; |
| 54 | } |
| 55 | |
| 56 | /** @inheritDoc */ |
| 57 | override getORMClass(): Constructor<MariaDbMikroORM> { |