Skip to content

Commit

Permalink
Fix .findMany() without arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
dankochetov committed May 24, 2023
1 parent f350144 commit bdc6b6c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/mysql-core/query-builders/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class RelationalQueryBuilder<
this.tableConfig,
this.dialect,
this.session,
config ? (config as DBQueryConfig<'many', true>) : true,
config ? (config as DBQueryConfig<'many', true>) : {},
'many',
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/pg-core/query-builders/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class RelationalQueryBuilder<TSchema extends TablesRelationalConfig, TFie
this.tableConfig,
this.dialect,
this.session,
config ? (config as DBQueryConfig<'many', true>) : true,
config ? (config as DBQueryConfig<'many', true>) : {},
'many',
);
}
Expand Down
6 changes: 3 additions & 3 deletions src/sqlite-core/query-builders/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class AsyncRelationalQueryBuilder<
this.tableConfig,
this.dialect,
this.session,
config ? (config as DBQueryConfig<'many', true>) : true,
config ? (config as DBQueryConfig<'many', true>) : {},
'many',
) as SQLiteAsyncRelationalQuery<BuildQueryResult<TSchema, TFields, TConfig>[]>;
}
Expand Down Expand Up @@ -93,7 +93,7 @@ export class SyncRelationalQueryBuilder<
this.tableConfig,
this.dialect,
this.session,
config ? (config as DBQueryConfig<'many', true>) : true,
config ? (config as DBQueryConfig<'many', true>) : {},
'many',
).prepare();

Expand Down Expand Up @@ -126,7 +126,7 @@ export class SyncRelationalQueryBuilder<
this.tableConfig,
this.dialect,
this.session,
config ? (config as DBQueryConfig<'many', true>) : true,
config ? { ...(config as DBQueryConfig<'many', true> | undefined), limit: 1 } : { limit: 1 },
'first',
).prepare();

Expand Down

0 comments on commit bdc6b6c

Please sign in to comment.