What is the type of T
in sql<T>
?
#575
Answered
by
AndriiSherman
Senbonzakura1234
asked this question in
Q&A
-
I need to run raw SQL command and this pops up when i check the type definition. What is the purpose of type |
Beta Was this translation helpful? Give feedback.
Answered by
AndriiSherman
May 15, 2023
Replies: 2 comments 1 reply
-
You mean the typescript generic? |
Beta Was this translation helpful? Give feedback.
0 replies
-
@Rykuno yes , what is that generic was used for? i don't see any differences when i transfer a type in. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's just a helper for the drizzle to get the right to infer type from the database. When using raw sql tag there is no way to know which type exactly will be returned from the database(as long as you can write there is any valid sql), so you need to specify it manually