dandadan
DTDrizzle Team
•Created by giovannibenussi on 1/15/2024 in #help
Get Schema From db instance
this was probably my best attempt, unfortunately
findMany
errors with This expression is not callable
15 replies
DTDrizzle Team
•Created by giovannibenussi on 1/15/2024 in #help
Get Schema From db instance
i guess whats left is to figure out if the previous desired behavior is at least achievable using the
query
api15 replies
DTDrizzle Team
•Created by giovannibenussi on 1/15/2024 in #help
Get Schema From db instance
this basically means you can pass whatever you want to it as long as its an actual table, it doesnt restrict possible tables based on the schema
15 replies
DTDrizzle Team
•Created by giovannibenussi on 1/15/2024 in #help
Get Schema From db instance
15 replies
DTDrizzle Team
•Created by giovannibenussi on 1/15/2024 in #help
Get Schema From db instance
unfortunately, what
_.schema
has is not the same thing as the actual schema youre supposed to use inside .from()
15 replies
DTDrizzle Team
•Created by giovannibenussi on 1/15/2024 in #help
Get Schema From db instance
or, an even simpler example, achieving something like this
15 replies
DTDrizzle Team
•Created by giovannibenussi on 1/15/2024 in #help
Get Schema From db instance
unfortunately i havent been able to write an interface for that function that actually types out correctly
15 replies
DTDrizzle Team
•Created by giovannibenussi on 1/15/2024 in #help
Get Schema From db instance
ive messed around with many things, such as
15 replies
DTDrizzle Team
•Created by giovannibenussi on 1/15/2024 in #help
Get Schema From db instance
i think the goal is to achieve something like this
15 replies
DTDrizzle Team
•Created by giovannibenussi on 1/15/2024 in #help
Get Schema From db instance
15 replies
DTDrizzle Team
•Created by giovannibenussi on 1/15/2024 in #help
Get Schema From db instance
following this
15 replies
DTDrizzle Team
•Created by Md Jahidul Islam milon on 7/6/2023 in #help
union or union all in drizzle orm?
2 replies
DTDrizzle Team
•Created by francis on 9/13/2023 in #help
How to include array literals in raw sql?
ive got it working with the following
im not even sure where i picked up the snippet of code from
im leaving this here in case someone has a better solution
3 replies
DTDrizzle Team
•Created by Md Jahidul Islam milon on 7/9/2023 in #help
how to use insert with select in drizzle?
nvm, you cant
you should either use
sql
with the embedded column names, or a transaction13 replies
DTDrizzle Team
•Created by Md Jahidul Islam milon on 7/9/2023 in #help
how to use insert with select in drizzle?
although in your case you could probably just use
db.insert()
since the query is straight forward (unless the query you provided is just an example and in reality yours is much more complex)13 replies
DTDrizzle Team
•Created by Md Jahidul Islam milon on 7/9/2023 in #help
how to use insert with select in drizzle?
you can just write the names of the columns directly, i havent found another way
13 replies
DTDrizzle Team
•Created by Md Jahidul Islam milon on 7/9/2023 in #help
how to use insert with select in drizzle?
any updates on this by any chance? was in need of something similar and was wondering if it has been implemented in the meanwhile, sql builder should work fine though
13 replies
tRPC Express server with Next.js
this might be inaccurate but maybe it can help
I also have a few apps using an express + nextjs setup, but I am not using the Next adapter for trpc. Instead I use the base react adapter.
Here's an example, although its from an expo project. But the client setup is exactly the same across all of my projects:
https://github.com/Pridestalkerr/expo-chat-t3e-turbo/blob/main/apps/mobile/src/utils/trpc.tsx
Now, the big issue with this is that I haven't been able to get it to work inside server components, so if you're working with the app router it might not be what you're looking for.
I am currently trying to get another express/nextjs project to work. I'll make sure to get back to you in case I am successful.
Best of luck!
6 replies
DTDrizzle Team
•Created by Guilherme Rosado on 8/28/2023 in #help
Bug on custom type inference? Maybe I'm doing something wrong.
this doesnt though
14 replies
DTDrizzle Team
•Created by Guilherme Rosado on 8/28/2023 in #help
Bug on custom type inference? Maybe I'm doing something wrong.
type x = table.$inferSelect
like this14 replies