Skip to content

Commit 066732f

Browse files
Revert "test: Fix the typeorm tests with negative fetch and my sql"
This reverts commit 9bfe290. # Conflicts: # packages/query-typeorm/src/services/typeorm-query.service.ts
1 parent f02c81d commit 066732f

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

packages/query-typeorm/src/services/typeorm-query.service.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import {
2020
UpdateOneOptions
2121
} from '@ptc-org/nestjs-query-core'
2222
import { DeleteResult, FindOptionsWhere, Repository } from 'typeorm'
23-
import { DriverUtils } from 'typeorm/driver/DriverUtils'
2423
import { QueryDeepPartialEntity } from 'typeorm/query-builder/QueryPartialEntity'
2524
import { UpdateResult } from 'typeorm/query-builder/result/UpdateResult'
2625

@@ -56,8 +55,6 @@ export class TypeOrmQueryService<Entity>
5655

5756
readonly useSoftDelete: boolean
5857

59-
private readonly isMySQL: boolean
60-
6158
constructor(
6259
readonly repo: Repository<Entity>,
6360
opts?: TypeOrmQueryServiceOpts<Entity>
@@ -66,8 +63,6 @@ export class TypeOrmQueryService<Entity>
6663

6764
this.filterQueryBuilder = opts?.filterQueryBuilder ?? new FilterQueryBuilder<Entity>(this.repo)
6865
this.useSoftDelete = opts?.useSoftDelete ?? false
69-
70-
this.isMySQL = DriverUtils.isMySQLFamily(repo.manager.connection.driver)
7166
}
7267

7368
// eslint-disable-next-line @typescript-eslint/naming-convention
@@ -89,9 +84,6 @@ export class TypeOrmQueryService<Entity>
8984
* @param query - The Query used to filter, page, and sort rows.
9085
*/
9186
public async query(query: Query<Entity>, opts?: QueryOptions<Entity>): Promise<Entity[]> {
92-
if (this.isMySQL && query.paging?.offset && !query.paging?.limit) {
93-
query = { ...query, paging: { ...query.paging, limit: Number.MAX_SAFE_INTEGER } }
94-
}
9587
const qb = this.filterQueryBuilder.select(query)
9688

9789
if (opts?.withDeleted) {

0 commit comments

Comments
 (0)