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
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.Yes I just figured that part out, importing
InferModel
from drizzle-orm
works, but MySqlRawQueryResult
seems to be missing still.It's imported from
mysql2
, not part of the ORM
No, wait
I'm wrong
drizzle-orm/mysql2
Oh that makes sense, thanks for the clarification :)
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
That's intended yes
mysql actually returns them as strings
to avoid precision loss
so the types were incorrect on our side
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
@bloberenober Maybe we can add mode for this type?
number | string
there is integer column for that
decimal is for large numbers
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
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•2y ago
Message Not Public
Sign In & Join Server To View