@mikro-orm/sql 7.0.0-dev.114 → 7.0.0-dev.115

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/typings.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { Generated, Kysely } from 'kysely';
2
- import type { DeferMode, CheckCallback, Dictionary, EntityProperty, GroupOperator, RawQueryFragment, QBFilterQuery, QueryOrderMap, Type, QueryFlag, AnyEntity, EntityName, EntitySchemaWithMeta, Primary, PrimaryProperty, Opt } from '@mikro-orm/core';
2
+ import type { DeferMode, CheckCallback, Dictionary, EntityProperty, GroupOperator, RawQueryFragment, QBFilterQuery, QueryOrderMap, Type, QueryFlag, EntityName, EntitySchemaWithMeta, Primary, PrimaryProperty, Opt } from '@mikro-orm/core';
3
3
  import type { JoinType, QueryType } from './query/enums.js';
4
4
  import type { DatabaseSchema } from './schema/DatabaseSchema.js';
5
5
  import type { DatabaseTable } from './schema/DatabaseTable.js';
@@ -137,7 +137,7 @@ export interface IQueryBuilder<T> {
137
137
  helper: any;
138
138
  select(fields: Field<T> | Field<T>[], distinct?: boolean): this;
139
139
  addSelect(fields: string | string[]): this;
140
- from<T extends AnyEntity<T> = AnyEntity>(target: EntityName<T> | IQueryBuilder<T>, aliasName?: string): IQueryBuilder<T>;
140
+ from<T extends object>(target: EntityName<T> | IQueryBuilder<T>, aliasName?: string): IQueryBuilder<T>;
141
141
  insert(data: any): this;
142
142
  update(data: any): this;
143
143
  delete(cond?: QBFilterQuery): this;
@@ -161,7 +161,7 @@ export interface IQueryBuilder<T> {
161
161
  having(cond?: QBFilterQuery | string, params?: any[]): this;
162
162
  getAliasForJoinPath(path: string, options?: ICriteriaNodeProcessOptions): string | undefined;
163
163
  getJoinForPath(path?: string, options?: ICriteriaNodeProcessOptions): JoinOptions | undefined;
164
- getNextAlias(entityName?: string): string;
164
+ getNextAlias(entityName?: string | EntityName<T>): string;
165
165
  clone(reset?: boolean): IQueryBuilder<T>;
166
166
  setFlag(flag: QueryFlag): this;
167
167
  unsetFlag(flag: QueryFlag): this;
@@ -177,7 +177,7 @@ export interface ICriteriaNodeProcessOptions {
177
177
  filter?: boolean;
178
178
  }
179
179
  export interface ICriteriaNode<T extends object> {
180
- readonly entityName: string;
180
+ readonly entityName: EntityName<T>;
181
181
  readonly parent?: ICriteriaNode<T> | undefined;
182
182
  readonly key?: string | symbol | undefined;
183
183
  readonly strict?: boolean;