0.19.0
版本发布时间: 2023-02-09 18:31:34
drizzle-team/drizzle-orm最新发布版本:0.34.1(2024-10-08 04:07:09)
-
Implemented selecting and joining a subquery. Example usage:
const sq = db .select({ categoryId: courseCategoriesTable.id, category: courseCategoriesTable.name, total: sql`count(${courseCategoriesTable.id})`.as<number>(), }) .from(courseCategoriesTable) .groupBy(courseCategoriesTable.id, courseCategoriesTable.name) .subquery('sq');
After that, just use the subquery instead of a table as usual.
-
❗ Replaced
db.select(table).fields({ ... })
syntax withdb.select({ ... }).from(table)
to look more like its SQL counterpart.
1、 drizzle-orm-0.19.0-dist.tgz 137.94KB