t3-oss / create-t3-turbo

Clean and simple starter repo using the T3 Stack along with Expo React Native

Home Page:https://turbo.t3.gg

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bug: `drizzle-orm/expressions` does not include `sql`, `count`, `sum`, etc.

ahkhanjani opened this issue · comments

Provide environment information

Describe the bug

There's been a change to the db package recently that exports * from drizzle-orm/expressions instead of drizzle-orm. This doesn't include some of the necessary functions from drizzle-orm/sql.

Link to reproduction

To reproduce

Additional information

No response

Feel free to PR - I felt like it was a good change so you dont export everything including all the table and column definitions.

But the sql function is definetely useful

You can export those from "drizzle-orm/sql" I believe. We should do a PR for it. Are there other implicit helpers that exist elsewhere in drizzle that you are missing?

I inspected the source code. Here's how things are exported:

./sql: Contains /expressions, /functions subdirectories and a sql.js and exports all three.
./expressions: Re-exports /sql/expressions.

functions contains aggregation functions. So Everything in it is necessary. sql.js seems to have some unnecessary objects in it.

I'll make a PR for the most minimal export possible.