* Creates an UPDATE query with the given data. * Use `where()` to specify which rows to update. * * @example * ```ts * await em.createQueryBuilder(User) * .update({ name: 'John Doe' }) * .where({ id: 1 }) * .execute(); * ```
(data: EntityData<Entity>)
| 930 | * ``` |
| 931 | */ |
| 932 | update(data: EntityData<Entity>): UpdateQueryBuilder<Entity, RootAlias, Context> { |
| 933 | return this.init(QueryType.UPDATE, data) as unknown as UpdateQueryBuilder<Entity, RootAlias, Context>; |
| 934 | } |
| 935 | |
| 936 | /** |
| 937 | * Creates a DELETE query. |