Kiwibe
Kiwibe
DTDrizzle Team
Created by Kiwibe on 10/11/2024 in #help
How to `as` a table name
🙏
4 replies
DTDrizzle Team
Created by Kiwibe on 10/11/2024 in #help
How to `as` a table name
the best I can come up right now is:
SELECT count(Abis.id)
FROM ${getTableName(A)} as Abis
WHERE B.id = A.id
SELECT count(Abis.id)
FROM ${getTableName(A)} as Abis
WHERE B.id = A.id
wrapped in a sql ` But what I'd like is to build the query with drizzle and then do a sql.raw(query.toSQL().sql)`
4 replies