Ramazan
Ramazan
Explore posts from servers
TtRPC
Created by Ramazan on 11/20/2023 in #❓-help
`useSuspenseQuery` still runs a fetch on SSR even when setting `ssr: false` in the api config
Answered in the issue - not a bug. Use Suspense.CSROnly from @suspensive/react
3 replies
DTDrizzle Team
Created by Ramazan on 9/20/2023 in #help
Prepend raw fields with table/subquery name in rendered SQL
That doesn't quite work in my case, where the raw sql field is in a subquery/CTE and collides with the name of of another table/subquery/cte. You have to prefix it with the subquery/CTE name manually every time it's used or keep track of and use different names for every such field like .as("balances_date") and .as("transaction_date").
6 replies
DTDrizzle Team
Created by binajmen on 8/7/2023 in #help
Is it possible to have nested values when doing a leftJoin?
You can do something like
export async function getLoansLJ(spaceId: string) {
return db
.select({ …getTableColumns(loans), financialInstitution: getTableColumns(financialInstitutions) })
.from(loans)
.leftJoin(
financialInstitutions,
eq(financialInstitutions.id, loans.financialInstitutionId)
)
.where(eq(loans.spaceId, spaceId));
}
export async function getLoansLJ(spaceId: string) {
return db
.select({ …getTableColumns(loans), financialInstitution: getTableColumns(financialInstitutions) })
.from(loans)
.leftJoin(
financialInstitutions,
eq(financialInstitutions.id, loans.financialInstitutionId)
)
.where(eq(loans.spaceId, spaceId));
}
You can find this in the docs towards the end of this section
33 replies
DTDrizzle Team
Created by Luxaritas on 4/11/2023 in #help
Typescript build fails with large number of columns
My two biggest issues with drizzle fixed in one patch, way to go lol
195 replies
DTDrizzle Team
Created by jakeleventhal on 7/3/2023 in #help
Why is introspecting creating tables that didn't previously exist
Replied in the issue
4 replies
DTDrizzle Team
Created by josephlyons on 5/31/2023 in #help
Can drizzle generate an initial schema from an existing db?
3 replies
TTCTheo's Typesafe Cult
Created by albatroz on 4/28/2023 in #questions
How to create custom Procedure for serverlesssQ cron provider. And call trcp router.
I think this might be helpful https://trpc.io/docs/server/server-side-calls
3 replies
TTCTheo's Typesafe Cult
Created by Glorrin on 4/27/2023 in #questions
why do we add prisma in ctx instead of using import ?
Could you give an example of what you mean?
8 replies
TTCTheo's Typesafe Cult
Created by .vithis on 4/28/2023 in #questions
What react date picker are you using?
If you want to have more freedom as to the design, here's a headless date/date-range picker I like to use https://github.com/rehookify/datepicker
5 replies
TTCTheo's Typesafe Cult
Created by mohlx on 4/28/2023 in #questions
Why prisma do 2 seperate Queries instead of 1 left join?
That's... just how it works, unfortunately. I don't believe there are any plans to address this short term. Some threads to follow on this issue: https://github.com/prisma/prisma/discussions/12715 https://github.com/prisma/prisma/issues/12582 https://github.com/prisma/prisma/issues/15616
4 replies
TTCTheo's Typesafe Cult
Created by deforestor on 4/28/2023 in #questions
PlanetScale workflow confuses me
You should be able to adjust how much memory/cpu/storage docker takes up in Settings->Resources->Advanced
28 replies
TTCTheo's Typesafe Cult
Created by SGeri on 4/21/2023 in #questions
Serverless (Vercel) Prisma Cold Start Optimizations
Using the experimental json protocol is definitely one
30 replies
TTCTheo's Typesafe Cult
Created by jairrard on 4/22/2023 in #questions
how tight should types be?
You need to add _id and name to the other two union members I believe
12 replies
TTCTheo's Typesafe Cult
Created by Aviv on 2/21/2023 in #questions
Some Tailwind classes have no affect
Do you have a theme in your tailwind config? If so, does it extend or override the screens property?
56 replies
TTCTheo's Typesafe Cult
Created by Mendy on 2/19/2023 in #questions
PostgreSQL: Best pgAdmin4 Alternative?
I’m using TablePlus and find it pretty good. The trial limits you to a single connection and a single tab at a time, which gives you a fair overview of the product. It’s also a lifetime license and not a subscription. P.s. If you have an edu email you can get DataGrip for free.
13 replies
TTCTheo's Typesafe Cult
Created by utdev on 2/7/2023 in #questions
Wrapper around Next Image component
Wait are you trying to access those with props.src?
5 replies
TTCTheo's Typesafe Cult
Created by utdev on 2/7/2023 in #questions
Wrapper around Next Image component
Hmm yeah that would be odd, you can specify the ImageFromBucketProps as extends ImageProps and add those on
5 replies