drizzle-orm/mysql-core has no InferModel or MySqlRawQueryResult exports

Hi there, I'm not sure if I'm misunderstanding something here, but as per the documentation, drizzle-orm/mysql-core should have the exports InferModel and MySqlRawQueryResult, but whenever I try to import them in my project, I get the error Module '"drizzle-orm/mysql-core"' has no exported member 'InferModel'. I'm using drizzle-orm version 0.23.2, so it'd be awesome if someone could clarify whether this is a known issue, or what's happening here exactly.
14 Replies
Dan
Dan2y ago
Forgot to update the documentation in the main README. It should be imported from drizzle-orm now. It's updated on the dialect-specific docs.
icarus
icarusOP2y ago
Yes I just figured that part out, importing InferModel from drizzle-orm works, but MySqlRawQueryResult seems to be missing still.
Dan
Dan2y ago
It's imported from mysql2, not part of the ORM No, wait I'm wrong drizzle-orm/mysql2
icarus
icarusOP2y ago
Oh that makes sense, thanks for the clarification :)
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Dan
Dan2y ago
That's intended yes mysql actually returns them as strings to avoid precision loss so the types were incorrect on our side
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Andrii Sherman
@bloberenober Maybe we can add mode for this type? number | string
Dan
Dan2y ago
there is integer column for that
Dan
Dan2y ago
decimal is for large numbers
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Andrii Sherman
Yeah, let’s discuss it internally @bloberenober It’s the same as bigint. It’s for large numbers, but we still have mode for it
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server