Jakesdoc
Jakesdoc
Explore posts from servers
DTDrizzle Team
Created by Jakesdoc on 10/8/2024 in #help
Transaction Type
Well, hopefully they just expose an actual type in the future. For now though your solution works, so thank you lol
16 replies
DTDrizzle Team
Created by Jakesdoc on 10/8/2024 in #help
Transaction Type
Plus, who knows if either of these will work after the next update.
16 replies
DTDrizzle Team
Created by Jakesdoc on 10/8/2024 in #help
Transaction Type
While this does work for me, it's obviously not how we should be getting the type. It seems crazy to me that this isn't something exposed by the library. Is it really that uncommon to need the type of a transaction? Do you know if they are planning on adding this at any point to the library itself?
16 replies
DTDrizzle Team
Created by Jakesdoc on 10/8/2024 in #help
Transaction Type
Yea I used to be able to just do typeof db and that was good enough but now the new update has changed the types. It doesn't seem there has ever been a proper way to represent that type, just work arounds.
16 replies
DTDrizzle Team
Created by Jakesdoc on 4/22/2024 in #help
Select parent rows where child exists
That worked, thank you very much!
6 replies
DTDrizzle Team
Created by Jakesdoc on 4/22/2024 in #help
Select parent rows where child exists
@Sillvva Maybe I'm just missing something, but it doesn't appear to do what I want.
const users = await db.query.users.findMany({
where: exists(
db.select({id: post.id}).from(post).innerJoin(post, eq(post.userId, user.id))
)
})
const users = await db.query.users.findMany({
where: exists(
db.select({id: post.id}).from(post).innerJoin(post, eq(post.userId, user.id))
)
})
Does that look right? Because that still just returns every user.
6 replies
TTCTheo's Typesafe Cult
Created by Jakesdoc on 1/11/2023 in #questions
How to update data on a static site?
Cool, I'll look into that then. Thank you 🙂
31 replies
TTCTheo's Typesafe Cult
Created by Jakesdoc on 1/11/2023 in #questions
How to update data on a static site?
and tailwind
31 replies
TTCTheo's Typesafe Cult
Created by Jakesdoc on 1/11/2023 in #questions
How to update data on a static site?
I've never used vue but I can take a look. Could be interesting to give it a shot. Does it have good typescript support?
31 replies
TTCTheo's Typesafe Cult
Created by Jakesdoc on 1/11/2023 in #questions
How to update data on a static site?
That's what I've been using so far and it works, just was hoping to use something other than next. Unfortunately nothing else seems to have anything like isr
31 replies
TTCTheo's Typesafe Cult
Created by Jakesdoc on 1/11/2023 in #questions
How to update data on a static site?
I already have a database setup with all the content stored in it and its displayed from that, not markdown
31 replies
TTCTheo's Typesafe Cult
Created by Jakesdoc on 1/11/2023 in #questions
How to update data on a static site?
So if I have someone log in and upload a new post. They would submit that post and trigger a redeploy of the website and that would be done in under a minute?
31 replies
TTCTheo's Typesafe Cult
Created by Jakesdoc on 1/11/2023 in #questions
How to update data on a static site?
Ok. That's a bit disappointing, but oh well
31 replies
TTCTheo's Typesafe Cult
Created by Jakesdoc on 11/14/2022 in #questions
Augment user type in JWT callback
That seems to have fixed it thank you!
4 replies
TTCTheo's Typesafe Cult
Created by Jakesdoc on 11/14/2022 in #questions
Augment user type in JWT callback
I do have access to those values, they just aren't typed properly. This works, I just don't want to have to write as string
callbacks: {
jwt: async ({ token, user }) => {
if (user) {
token.id = user.id;
token.role = user.role as string;
token.sponsorId = user.sponsorId as string;
}
return token;
},
session: ({ session, token }) => {
if (session.user) {
session.id = token.id;
session.user.role = token.role;
session.user.sponsorId = token.sponsorId;
}
return session;
},
},
callbacks: {
jwt: async ({ token, user }) => {
if (user) {
token.id = user.id;
token.role = user.role as string;
token.sponsorId = user.sponsorId as string;
}
return token;
},
session: ({ session, token }) => {
if (session.user) {
session.id = token.id;
session.user.role = token.role;
session.user.sponsorId = token.sponsorId;
}
return session;
},
},
4 replies
TTCTheo's Typesafe Cult
Created by Jakesdoc on 11/3/2022 in #questions
ISR in frameworks
Ok, thanks 🙂
21 replies
TTCTheo's Typesafe Cult
Created by Jakesdoc on 11/3/2022 in #questions
ISR in frameworks
Yes, I know its possible in next. That is how my app works currently, I just wanted to see if there were any other frameworks that could do it too.
21 replies
TTCTheo's Typesafe Cult
Created by Jakesdoc on 11/3/2022 in #questions
ISR in frameworks
So next.js is the only one with the ability to revalidate static pages after some amount of time?
21 replies
TTCTheo's Typesafe Cult
Created by Jakesdoc on 11/3/2022 in #questions
ISR in frameworks
What other frameworks use isr?
21 replies