nodejs-driver icon indicating copy to clipboard operation
nodejs-driver copied to clipboard

Query operator contains

Open koriwi opened this issue 6 years ago • 4 comments

had this changing lying around in my fork for quite some time. I need to use this every day :)

koriwi avatar Sep 17 '19 16:09 koriwi

oh good one, thanks for the patch!

I've created a ticket to track this: https://datastax-oss.atlassian.net/browse/NODEJS-553

I would like to include it in the upcoming release (in the next few days / week), we should add a unit test for this feature in test/unit/mapping/model-mapper-select-tests.js.

Could you add one or two tests? Otherwise, I'll try to do it myself.

jorgebay avatar Sep 18 '19 10:09 jorgebay

Now that I think about it (after your post in the mailing list), I think supporting CONTAINS operator without secondary indexes doesn't make much sense, the only other way to use CONTAINS in CQL outside secondary indexes is using ALLOW FILTERING queries that we explicitly don't want to support.

From the user perspective, I would recommend to use custom queries on the mapper.

About the contribution, I would say we can focus in supporting indexes in the Mapper w/ this operators. As I mentioned in the mailing list, its a meaty feature that requires several unit and integration tests to make sure we properly support it.

jorgebay avatar Sep 18 '19 10:09 jorgebay

Cool. As i said in the mailing list, i will try to implement the needed test for secondary indexes. I can just update this pull request so we have a pull request which contains CONTAINS, CONTAINS KEY and secondary index support :) Got some open source time from my company

koriwi avatar Sep 18 '19 15:09 koriwi

glad to hear!

yeah, let's keep this one open.

jorgebay avatar Sep 18 '19 15:09 jorgebay