Closed jcoveney-anchorzero closed 3 months ago
Try this:
const result = await db.select('table',
dc.and(
{ a: dc.isIn(arrA) },
dc.or(
{ b: dc.isIn(arrB) },
{ c: dc.isIn(arrC) }
)
)
).run(pool);
EDIT: Huh, this looks the same as your suggestion, but it ought to work, and it does seem to work for me. Can you produce a test case where it fails? arrA
, arrB
and arrC
should be string[]
typed.
I will investigate! we have slightly modified zapatos, and I think that that may be what's creating the issue here. thank you for the response! I will see if I can reproduce the issue in vanilla zapatos!
going to close this for now, we are going to work on this soon, I'll reopen if we can come up with a specific issue. thank you!
let's say I have a table with columns a, b, c that are all strings.
I have arrays arrA, arrB, arrC. I want to essentially do the following
we like using the select API a lot, but I am struggling to get it working with this. doing the following is of course trivial
but what I want is essentially
I tried using dc.or with the whereables, but it didn't seem to work? that is to say
gave me an error. is it expected that that would work?