vr7bd
vr7bd
DTDrizzle Team
Created by vr7bd on 6/4/2024 in #help
Conditional query failing
👊
16 replies
DTDrizzle Team
Created by vr7bd on 6/4/2024 in #help
Conditional query failing
Hey I'm sorry! This is working! I had to restart language server. I'll stick to using and which is easier to read as you said
16 replies
DTDrizzle Team
Created by vr7bd on 6/4/2024 in #help
Conditional query failing
Me too I keep getting humbled by js. But honestly I'm find with and here since it's associative
16 replies
DTDrizzle Team
Created by vr7bd on 6/4/2024 in #help
Conditional query failing
Nope that didn't work too. I'm getting must have a Symbol.iterator
16 replies
DTDrizzle Team
Created by vr7bd on 6/4/2024 in #help
Conditional query failing
I'm guessing because it needs a function?
16 replies
DTDrizzle Team
Created by vr7bd on 6/4/2024 in #help
Conditional query failing
I'm getting typescript: expression expected
16 replies
DTDrizzle Team
Created by vr7bd on 6/4/2024 in #help
Conditional query failing
Ah got it! I tried putting it in an array which is what I intended to do. But it's not valid js ig (eslint: parsing error)
16 replies
DTDrizzle Team
Created by vr7bd on 6/4/2024 in #help
Conditional query failing
I did this
// Below produces wrong output
await db.select().from(table).where(
and(
eq(table.userId, userId),
selectAll
? and(or(...statusFilter), or(...nameFilter)) // added and condition here
: inArray(table.userId, arr)
)
);
// Below produces wrong output
await db.select().from(table).where(
and(
eq(table.userId, userId),
selectAll
? and(or(...statusFilter), or(...nameFilter)) // added and condition here
: inArray(table.userId, arr)
)
);
and it works. Is there a reason why these 2 are different?
16 replies
DTDrizzle Team
Created by vr7bd on 5/15/2024 in #help
upsert with excluded using column name
Yup working thanks!
4 replies
DTDrizzle Team
Created by vr7bd on 3/1/2024 in #help
case insensitive orderBy
Thanks a lot!
4 replies
DTDrizzle Team
Created by vr7bd on 11/25/2023 in #help
Getting types for update query
Yup it worked !
10 replies
DTDrizzle Team
Created by vr7bd on 11/25/2023 in #help
Getting types for update query
Alright thanks I'll give it a shot!
10 replies
DTDrizzle Team
Created by vr7bd on 11/25/2023 in #help
Getting types for update query
Yeah but when you're trying to update, it's not necessary right
10 replies
DTDrizzle Team
Created by vr7bd on 11/25/2023 in #help
Getting types for update query
Sorry for the late reply but yeah I was using it but then, if you don't have the values that are not nullable, lsp starts complaining.
10 replies