🇨🇭 Marko Bolliger <cannap>
🇨🇭 Marko Bolliger <cannap>
Explore posts from servers
DTDrizzle Team
Created by 🇨🇭 Marko Bolliger <cannap> on 9/1/2024 in #help
Relation not working?
No description
6 replies
DTDrizzle Team
Created by 🇨🇭 Marko Bolliger <cannap> on 5/23/2024 in #help
drizzle schema type error
No description
2 replies
DTDrizzle Team
Created by 🇨🇭 Marko Bolliger <cannap> on 2/10/2024 in #help
drizzle studio not enough informations
HI i have this error throw new Error( ^ Error: There is not enough information to infer relation "public.projectTable.users" at normalizeRelation (W:\gba\timeismoney\nodemodules.pnpm\[email protected]@[email protected]\node_modules\drizzle-orm\relations.cjs:261:9) a nd this is my code https://gist.github.com/cannap/49738bb22d29aab5c37d8cc88b34c85d i cannot see what is wrong i pushed
2 replies
DTDrizzle Team
Created by 🇨🇭 Marko Bolliger <cannap> on 1/21/2024 in #help
drizzle-valibot async
Hi i have this issue with drizzle-valibot https://github.com/drizzle-team/drizzle-orm/discussions/1548 i trought i just post the link here so other can also see it
1 replies
DTDrizzle Team
Created by 🇨🇭 Marko Bolliger <cannap> on 8/14/2023 in #help
update multiple fields
Hi is there a other way to update multiple fields currently i do it like this
const updatePollOption = (option: PollOptionsSchema) => {
const { isNew, id, ...options } = option;
return db
.update(tables.pollOptions)
.set({ ...options, pollId: pollId })
.where(eq(tables.pollOptions.id, option.id));
};

const result = await Promise.all(
pollOptions.map((option) => updatePollOption(option))
);
const updatePollOption = (option: PollOptionsSchema) => {
const { isNew, id, ...options } = option;
return db
.update(tables.pollOptions)
.set({ ...options, pollId: pollId })
.where(eq(tables.pollOptions.id, option.id));
};

const result = await Promise.all(
pollOptions.map((option) => updatePollOption(option))
);
16 replies