- Timestamp:
- 12/27/25 02:16:17 (7 months ago)
- Branches:
- main
- Children:
- 9854393
- Parents:
- dd5067a
- File:
-
- 1 edited
-
database/drizzle/queries/builds.ts (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
database/drizzle/queries/builds.ts
rdd5067a r82aa6ae 77 77 name: buildsTable.name, 78 78 created_at: buildsTable.createdAt, 79 total_price: buildsTable.totalPrice 79 total_price: buildsTable.totalPrice, 80 avgRating: sql<number>`COALESCE(AVG(${ratingBuildsTable.value}::float),0)` 80 81 }) 81 82 .from(buildsTable) … … 84 85 eq(buildsTable.id, favoriteBuildsTable.buildId) 85 86 ) 87 .leftJoin( 88 ratingBuildsTable, 89 eq(buildsTable.id, ratingBuildsTable.buildId) 90 ) 86 91 .where( 87 92 eq(favoriteBuildsTable.userId, userId) 93 ) 94 .groupBy( 95 buildsTable.id, 96 buildsTable.userId, 97 buildsTable.name, 98 buildsTable.createdAt, 99 buildsTable.totalPrice 88 100 ) 89 101 .orderBy(
Note:
See TracChangeset
for help on using the changeset viewer.
