Sets the type of the WHERE clause as "contains all".

    Args:
      *values: The values to be used in the WHERE condition.

    Returns:
      The query builder that this WHERE builder links to.
427855
def ContainsAll(self, *values):
    
    self._awql = self._CreateMultipleValuesCondition(values, 'CONTAINS_ALL')
    return self._query_builder
766943
def from_value(self, value):
        
        if value is None:
            sql_type = NVarCharType(size=1)
        else:
            sql_type = self._from_class_value(value, type(value))
        return sql_type
39113
def _validate_select_where(self):
        
        # check that there's either a =, a IN or a CONTAINS (collection)
        # relationship with a primary key or indexed field. We also allow
        # custom indexes to be queried with any operator (a difference
        # between a secondary index)
        equal_ops = [self.model._get_column_by_db_name(w.field) \
                     for w in self._where if not isinstance(w.value, Token)
                     and (isinstance(w.operator, EqualsOperator)
                          or self.model._get_column_by_db_name(w.field).custom_index)]
        token_comparison = any([w for w in self._where if isinstance(w.value, Token)])
        if not any(w.primary_key or w.has_index for w in equal_ops) and not token_comparison and not self._allow_filtering:
            raise QueryException(
                ('Where clauses require either  =, a IN or a CONTAINS '
                 '(collection) comparison with either a primary key or '
                 'indexed field. You might want to consider setting '
                 'custom_index on fields that you manage index outside '
                 'cqlengine.'))

        if not self._allow_filtering:
            # if the query is not on an indexed field
            if not any(w.has_index for w in equal_ops):
                if not any([w.partition_key for w in equal_ops]) and not token_comparison:
                    raise QueryException(
                        ('Filtering on a clustering key without a partition '
                         'key is not allowed unless allow_filtering() is '
                         'called on the queryset. You might want to consider '
                         'setting custom_index on fields that you manage '
                         'index outside cqlengine.'))
832076
def where(self, key, value):
        
        return self.filter(lambda item: data_get(item, key) == value)
965679
function whereIn(column, values) {
    if (Array.isArray(values) && isEmpty(values)) {
      return this.where(this._not());
    }
    this._statements.push({
      grouping: 'where',
      type: 'whereIn',
      column: column,
      value: values,
      not: this._not(),
      bool: this._bool()
    });
    return this;
  }
536368
def type(self, value):
        
        if value == self._defaults['type'] and 'type' in self._values:
            del self._values['type']
        else:
            self._values['type'] = value
983521
def __set_values(self, values):
        
        # Tuple of tuples is required
        array = tuple(tuple(self._clean_value(col) for col in row) for row in values)
        self._get_target().setDataArray(array)
1291706
def where(self, *custom_restrictions, **restrictions):
        
        for attr, value in restrictions.items():
            self.where_query[attr] = value
        if custom_restrictions:
            self.custom_where.append(tuple(custom_restrictions))
        return self
506634
def DoesNotContainIgnoreCase(self, value):
    
    self._awql = self._CreateSingleValueCondition(
        value, 'DOES_NOT_CONTAIN_IGNORE_CASE')
    return self._query_builder
1055874
def _all(field, value, document):
    
    try:
        a = set(value)
    except TypeError:
        raise MalformedQueryException("'$all' must accept an iterable")

    try:
        b = set(document.get(field, []))
    except TypeError:
        return False
    else:
        return a.intersection(b) == a
159053
def update(self, _values=None, **values):
        
        if _values is not None:
            values.update(_values)

        return self._query.update(self._add_updated_at_column(values))
255190
def DoesNotContain(self, value):
    
    self._awql = self._CreateSingleValueCondition(value, 'DOES_NOT_CONTAIN')
    return self._query_builder
932797
def query_fetch_all(self, query, values):
        
        self.cursor.execute(query, values)
        retval = self.cursor.fetchall()
        self.__close_db()
        return retval
865036
def EqualTo(self, value):
    
    self._awql = self._CreateSingleValueCondition(value, '=')
    return self._query_builder
900277
def Contains(self, value):
    
    self._awql = self._CreateSingleValueCondition(value, 'CONTAINS')
    return self._query_builder
902017
def _validate_select_where(self):
        
        #check that there's either a = or IN relationship with a primary key or indexed field
        equal_ops = [self.model._columns.get(w.field) for w in self._where if isinstance(w.operator, EqualsOperator)]
        token_comparison = any([w for w in self._where if isinstance(w.value, Token)])
        if not any([w.primary_key or w.index for w in equal_ops]) and not token_comparison and not self._allow_filtering:
            raise QueryException('Where clauses require either a "=" or "IN" comparison with either a primary key or indexed field')

        if not self._allow_filtering:
            #if the query is not on an indexed field
            if not any([w.index for w in equal_ops]):
                if not any([w.partition_key for w in equal_ops]) and not token_comparison:
                    raise QueryException('Filtering on a clustering key without a partition key is not allowed unless allow_filtering() is called on the querset')
579325
def withValues(cls, *values):
        

        class X(cls):
            subtypeSpec = cls.subtypeSpec + constraint.SingleValueConstraint(
                *values)

        X.__name__ = cls.__name__
        return X