(options: { collation?: any; indexHint?: any; using?: any })
| 143 | } |
| 144 | |
| 145 | private validateSqlOptions(options: { collation?: any; indexHint?: any; using?: any }): void { |
| 146 | if (options.using && !options.indexHint) { |
| 147 | const names = Utils.asArray(options.using); |
| 148 | const hint = this.platform.formatIndexHint(names); |
| 149 | |
| 150 | if (hint) { |
| 151 | options.indexHint = hint; |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | if (options.collation != null && typeof options.collation !== 'string') { |
| 156 | throw new Error( |
| 157 | 'Collation option for SQL drivers must be a string (collation name). Use a CollationOptions object only with MongoDB.', |
| 158 | ); |
| 159 | } |
| 160 | |
| 161 | if (options.indexHint != null && typeof options.indexHint !== 'string') { |
| 162 | throw new Error( |
| 163 | "indexHint for SQL drivers must be a string (e.g. 'force index(my_index)'). Use an object only with MongoDB.", |
| 164 | ); |
| 165 | } |
| 166 | } |
| 167 | |
| 168 | override createEntityManager(useContext?: boolean): this[typeof EntityManagerType] { |
| 169 | const EntityManagerClass = this.config.get('entityManager', SqlEntityManager); |
nothing calls this directly
no test coverage detected