mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
422 B
422 B
Delete using Query Builder
You can create DELETE queries using QueryBuilder.
Examples:
import {getConnection} from "typeorm";
await getConnection()
.createQueryBuilder()
.delete()
.from(User)
.where("id = :id", { id: 1 })
.execute();
This is the most efficient in terms of performance way to delete things from your database.