rql icon indicating copy to clipboard operation
rql copied to clipboard

Add IN and NIN support

Open ashtonian opened this issue 5 years ago • 4 comments

First attempt https://github.com/a8m/rql/pull/10/

The equality fn for the test doesn't like comparing slices because its deep, not sure what we want to do there.

Looking at integration testing next.

ashtonian avatar Jul 17 '19 19:07 ashtonian

resolves https://github.com/a8m/rql/issues/8

ashtonian avatar Jul 17 '19 19:07 ashtonian

due to how args are handled by sql.query, this needs to be changed a bit.

Currently assuming the parser receives valid rql it produces something like Select * FROM table WHERE id > ? and name IN (?), and args would contain a slice as an argument [5, [1,2]]. .query wants something more like Select * FROM table WHERE id > ? and name IN (?, ?) and args to be flat [5,1,2].

related: https://stackoverflow.com/questions/20271123/how-to-execute-an-in-lookup-in-sql-using-golang/32837541

ashtonian avatar Jul 26 '19 01:07 ashtonian

updated to support multiple ? placeholders, added working integration tests, currently could use some clean up and the tests are broken, not sure why.

ashtonian avatar Jul 29 '19 23:07 ashtonian

Any news about this feature ? Thanks

jonathanroze avatar Dec 04 '19 11:12 jonathanroze

updated to support multiple ? placeholders, added working integration tests, currently could use some clean up and the tests are broken, not sure why.

If you give me access to your fork, I can help you

c84c avatar Jan 25 '23 21:01 c84c

I'll take another stab at this pending review for https://github.com/a8m/rql/pull/49

ashtonian avatar Aug 03 '23 08:08 ashtonian