Open aikar opened 10 years ago
I have some basic support for text done - can you give me a review of if anything looks wrong here?
Though I want to clean up the in () portion to be safer, as right now it doesn't properly support ", but for my simple needs at this time that was fine. Your array version was broken for anything textual since it didn't wrap the values with quotation.
well, that's the input side of it. There's more involved to make that work. I suggest you make it work for yourself and then send a PR.
@michield note the 2nd set of changes. You have a default clause in the switch for the SQL side of things, so I relied on that, but that default clause only processed arrays, so thats where the else comes in, and simply does a single entry for the IN statement.
Though, I'll improve that to not do a in (foo) for single statements as i'm sure that will be better for performance.
Can you give me a quick rundown of any gotchas I might run into adding support for this? Such as using $any and $some and such?
don't see any 2nd set. can't think of gotchas, apart from make sure to test what you're doing.
Can you please add support for textline and date attributes?
I would love to be able to just say "Attribute = Arbitrary string value" and "Date is Between X and Z" to properly segment my list.
I might end up doing it myself though as I need it urgently but if you can get it in the next few days please let me know.