jakeleventhal
jakeleventhal
Explore posts from servers
TTCTheo's Typesafe Cult
Created by jakeleventhal on 4/6/2025 in #questions
HeroUI or shadcn
also mui basically client work with RSC for another 12+ months
6 replies
TTCTheo's Typesafe Cult
Created by jakeleventhal on 4/6/2025 in #questions
HeroUI or shadcn
i do have mui issues. namely that it's ugly and requires a large bespoke theme kit that creates tech debt to maintain
6 replies
TTCTheo's Typesafe Cult
Created by jakeleventhal on 3/21/2025 in #questions
Is it possible to import SVGs from a shared package in next 15?
wish i had seen this sooner. funily enough ended up with basically the same solution
4 replies
DTDrizzle Team
Created by jakeleventhal on 10/8/2024 in #help
0.32.0 introduces unmentioned breaking change
2 replies
DTDrizzle Team
Created by jakeleventhal on 5/10/2024 in #help
Best way to get count in extras
what i want is to be able to do something like:
extras: {
productsCount: db.select({value: count()}).from(products).where(...)
extras: {
productsCount: db.select({value: count()}).from(products).where(...)
5 replies
DTDrizzle Team
Created by J O A Q U I N on 4/19/2024 in #help
Stuck not being able to acces my project's DB locally through drizzle.studio
this didnt work for me
4 replies
DTDrizzle Team
Created by jakeleventhal on 3/19/2024 in #help
How do you use batch API with local development
for postgres-js for instance, wouldnt batch implementation just be something like this:
// user code:
await db.batch(statements satisfies Array<SQL>);

// under the hood code:
await db.execute(sql`
BEGIN TRANSACTION
${statements.join(';\n')}
COMMIT TRANSACTION
`);
// user code:
await db.batch(statements satisfies Array<SQL>);

// under the hood code:
await db.execute(sql`
BEGIN TRANSACTION
${statements.join(';\n')}
COMMIT TRANSACTION
`);
3 replies
DTDrizzle Team
Created by jakeleventhal on 1/8/2024 in #help
How to run drizzle-kit studio out of docker?
i explain in the GH issue
13 replies
DTDrizzle Team
Created by jakeleventhal on 8/12/2023 in #help
What exactly is the `check` command doing?
+1
12 replies
DTDrizzle Team
Created by jakeleventhal on 1/22/2024 in #help
Getting seemingly incorrect relation error
ty
11 replies
DTDrizzle Team
Created by jakeleventhal on 1/22/2024 in #help
Getting seemingly incorrect relation error
yeah that should work actually
11 replies
DTDrizzle Team
Created by jakeleventhal on 1/22/2024 in #help
Getting seemingly incorrect relation error
productSet: one(productSets) in order to add a relation name i also need fields and references
11 replies
DTDrizzle Team
Created by jakeleventhal on 1/22/2024 in #help
Getting seemingly incorrect relation error
how would i do that without an additional foreign key
11 replies
DTDrizzle Team
Created by jakeleventhal on 1/18/2024 in #help
How do you define one-to-one relations in the same table?
a digital listing and a physical listing were each separate rows in the database
21 replies
DTDrizzle Team
Created by jakeleventhal on 1/18/2024 in #help
How do you define one-to-one relations in the same table?
i suppose that could work as well. so when i make the connection, just make sure assign both foreign keys
21 replies
DTDrizzle Team
Created by jakeleventhal on 1/18/2024 in #help
How do you define one-to-one relations in the same table?
well it should be one-to-one because of the unique constriant on physicalListingId
21 replies
DTDrizzle Team
Created by jakeleventhal on 1/20/2024 in #help
Anyone have any idea about this bug?
ty
14 replies
DTDrizzle Team
Created by jakeleventhal on 1/20/2024 in #help
Anyone have any idea about this bug?
your solution actually works!
14 replies
DTDrizzle Team
Created by jakeleventhal on 1/20/2024 in #help
Anyone have any idea about this bug?
settings table is actually branding, just named settings to make it easier to understand in this example. i updated my message above
14 replies
DTDrizzle Team
Created by jakeleventhal on 1/20/2024 in #help
Anyone have any idea about this bug?
but what i was trying to do was basically this
export const settingsRelations = relations(settings, ({ one }) => ({
packageInsert: one(designs),
packageSticker: one(designs)
}));

export const designRelations = relations(designs, ({ one }) => ({
packageInsertSettings: one(settings, {
fields: [designs.packageInsertId],
references: [settings.id]
}),
packageStickerSettings: one(settings, {
fields: [designs.packageStickerId],
references: [settings.id]
})
}));
export const settingsRelations = relations(settings, ({ one }) => ({
packageInsert: one(designs),
packageSticker: one(designs)
}));

export const designRelations = relations(designs, ({ one }) => ({
packageInsertSettings: one(settings, {
fields: [designs.packageInsertId],
references: [settings.id]
}),
packageStickerSettings: one(settings, {
fields: [designs.packageStickerId],
references: [settings.id]
})
}));
14 replies