All values of query result are of type string
I I use Drizzle as query builder
Output:
The intellisense in VSCode shows me the correct types on hover (as specified in the sql template strings)
However the actual data in
result
is all string
I know it is a bit of a hacky solution, as I use Drizzle to generate a raw SQL query with typings applied later on.
Since there is currently no other way of getting the types otherwise () am I doing something wrong here that I do not get the types right
(anylinger - it seemed to work up until now or I haven't checked it thorough)1 Reply
As stated in https://orm.drizzle.team/docs/sql#sqlt - there is no way to get the result-typed other than strings?
Drizzle ORM - Magic sql`` operator
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.