Skip to content

Commit c46a620

Browse files
committed
feat(query): adds contains key query operator
1 parent d439ee0 commit c46a620

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/mapping/q.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ class QueryAssignment {
6161
* @alias module:mapping~q
6262
* @type {Object}
6363
* @property {function} contains Represents the CQL operator "CONTAINS".
64+
* @property {function} containsKey Represents the CQL operator "CONTAINS KEY".
6465
* @property {function} in_ Represents the CQL operator "IN".
6566
* @property {function} gt Represents the CQL operator greater than ">".
6667
* @property {function} gte Represents the CQL operator greater than or equals to ">=" .
@@ -80,6 +81,10 @@ const q = {
8081
return new QueryOperator('CONTAINS', value);
8182
},
8283

84+
containsKey: function containsKey(value) {
85+
return new QueryOperator('CONTAINS KEY', value);
86+
},
87+
8388
in_: function in_(arr) {
8489
if (!Array.isArray(arr)) {
8590
throw new errors.ArgumentError('IN operator supports only Array values');

0 commit comments

Comments
 (0)