shikishikichangchang
shikishikichangchang
Explore posts from servers
DTDrizzle Team
Created by shikishikichangchang on 6/9/2024 in #help
Turso SQLite vector search
4 replies
DTDrizzle Team
Created by shikishikichangchang on 3/29/2024 in #help
Is there a way in drizzle to return the count before limit and offset?
i have a table that i need to limit and offset that also needs to return the count. is there a way to do this using one query?
1 replies
DTDrizzle Team
Created by shikishikichangchang on 3/29/2024 in #help
order by dynamic colum
i have a table and i want the user to be able to order by different columns. how do i write the drizzle query to take in a string and do the ordering? Example here: https://orm.drizzle.team/learn/guides/limit-offset-pagination does ordereing as such: .orderBy(users.id). But for my use case, I won't know until runtime.
22 replies
DTDrizzle Team
Created by shikishikichangchang on 3/5/2024 in #help
auto create nanoid
How do I automatically create nanoid using Drizzle for Mysql/planetscale? similar to prisma's cuid.
1 replies
DTDrizzle Team
Created by shikishikichangchang on 3/3/2024 in #help
how can I truncate all tables in the new drizzle studio? Previously there was a drop down button
tsia
8 replies
DTDrizzle Team
Created by shikishikichangchang on 2/28/2024 in #help
nested relation
how can I query a model with 2 'with'? So query student with books, with pages, for example.
4 replies
DTDrizzle Team
Created by shikishikichangchang on 11/24/2023 in #help
mysql on delete cascase
Seems like mysql with planetscale does not support "reference". Is there a way to on delete cascase or do I have to do it manually in a transaction?
3 replies
DTDrizzle Team
Created by shikishikichangchang on 11/24/2023 in #help
Transaction doesn't support Promise.all
This works:
await db.transaction(async (tx) => {
await tx.insert...
await tx.insert...
});
await db.transaction(async (tx) => {
await tx.insert...
await tx.insert...
});
This does not:
await db.transaction(async (tx) => {
const p0 = tx.insert...
const p1 = tx.insert...
await Promise.all([
p0,
p1,
]);
});
await db.transaction(async (tx) => {
const p0 = tx.insert...
const p1 = tx.insert...
await Promise.all([
p0,
p1,
]);
});
77 replies