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
bloberenober
bloberenober16mo 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
icarus16mo ago
Yes I just figured that part out, importing InferModel from drizzle-orm works, but MySqlRawQueryResult seems to be missing still.
bloberenober
bloberenober16mo ago
It's imported from mysql2, not part of the ORM No, wait I'm wrong drizzle-orm/mysql2
icarus
icarus16mo ago
Oh that makes sense, thanks for the clarification :)
Unknown User
Unknown User16mo ago
Message Not Public
Sign In & Join Server To View
bloberenober
bloberenober16mo 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 User16mo ago
Message Not Public
Sign In & Join Server To View
Andrii Sherman
Andrii Sherman16mo ago
@bloberenober Maybe we can add mode for this type? number | string
bloberenober
bloberenober16mo ago
there is integer column for that
Andrii Sherman
Andrii Sherman16mo ago
ohcomeon
bloberenober
bloberenober16mo ago
decimal is for large numbers
Unknown User
Unknown User16mo ago
Message Not Public
Sign In & Join Server To View
Andrii Sherman
Andrii Sherman16mo ago
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 User16mo ago
Message Not Public
Sign In & Join Server To View