Trey
Trey
DTDrizzle Team
Created by jz on 11/11/2023 in #help
Multiple .where() calls with $dynamic not working
I just had this issue, and found this post. Is there any way we can do this sample with associated typescript types for safety?
20 replies
DTDrizzle Team
Created by AstroBear on 1/26/2024 in #help
Why does `sum` return `SQL<string | null>`?
"Just designed this way", is not a great answer. I will also use this workaround but it would be great if someone who knows the history of sum can answer why it returns string | null.
10 replies
DTDrizzle Team
Created by Trey on 1/26/2024 in #help
Drizzle Typescript Init with Schema Type Error
When I added the type parameter it did complain about mode. If I keep the mode params the type parameter doesn't seem necessary. Nice, ok! Typescript led me around a little unnecessarily, but all good.
4 replies
DTDrizzle Team
Created by Trey on 1/26/2024 in #help
Drizzle Typescript Init with Schema Type Error
I have made some progress by doing this:
export const db = drizzle<typeof schema>(connection, {
schema,
mode: "default",
});
export const db = drizzle<typeof schema>(connection, {
schema,
mode: "default",
});
But this isn't recommended anywhere in the documentation that I've seen.
4 replies