Adds a *transform* clause to the query. See the corresponding Cucumber documentation for details.
543003
def transform(*attribute_transforms, &block)
      # todo - Still feels like some as/transform code duplication but I think that it would get too meta if I
      # reduced it any further. Perhaps change how the transforms are handled so that there doesn't have to be
      # an array/hash difference in the first place?
      prep_variable('value_transforms', attribute_transforms) unless @value_transforms

      # todo - what if they pass in a hash transform and a block?
      attribute_transforms << block if block
      add_transforms(attribute_transforms, @value_transforms)
    end
752068
def add_where_clause(self, clause):
        
        if not isinstance(clause, WhereClause):
            raise StatementException("only instances of WhereClause can be added to statements")
        clause.set_context_id(self.context_counter)
        self.context_counter += clause.get_context_size()
        self.where_clauses.append(clause)
970653
def matches_key_in_query(self, key, query_key, query):
        
        dumped = query.dump()
        dumped['className'] = query._query_class._class_name
        self._add_condition(key, '$select', {'key': query_key, 'query': dumped})
        return self
1052605
def _substitute(self, query, model_class=None):
        '''
        
        '''
        if '$' in query:
            mapping = dict(db="`%s`" % self.db_name)
            if model_class:
                mapping['table'] = "`%s`.`%s`" % (self.db_name, model_class.table_name())
            query = Template(query).safe_substitute(mapping)
        return query
62375
def query(self, query):
    ''''''
    query = query.copy()
    query.key = self._transform(query.key)
    return self.child_datastore.query(query)
887719
def register_builtin_transform(transform, builtin_name):
    

    def _transform_wrapper(node, context=None):
        result = transform(node, context=context)
        if result:
            if not result.parent:
                # Let the transformation function determine
                # the parent for its result. Otherwise,
                # we set it to be the node we transformed from.
                result.parent = node

            if result.lineno is None:
                result.lineno = node.lineno
            if result.col_offset is None:
                result.col_offset = node.col_offset
        return iter([result])

    MANAGER.register_transform(
        nodes.Call,
        inference_tip(_transform_wrapper),
        partial(_builtin_filter_predicate, builtin_name=builtin_name),
    )
256864
private void add(Transform transform, MethodType target) {
        types.add(0, target);
        transforms.add(0, transform);
    }
391277
def add_transform(self, key, xslt):
        
        self._remove_converter(key)
        self._xsltLibrary[key] = xslt
        self._add_converter(key)
284589
def add_clause(self, clause, no_return=True):
        

        if self.maplesat:
            res = pysolvers.maplesat_add_cl(self.maplesat, clause)

            if res == False:
                self.status = False

            if not no_return:
                return res
446043
def db_chainstate_append(cls, cur, **fields):
        
        missing = []
        extra = []
        for reqfield in CHAINSTATE_FIELDS:
            if reqfield not in fields:
                missing.append(reqfield)

        for fieldname in fields:
            if fieldname not in CHAINSTATE_FIELDS:
                extra.append(fieldname)

        if len(missing) > 0 or len(extra) > 0:
            raise ValueError("Invalid fields: missing: {}, extra: {}".format(','.join(missing), ','.join(extra)))

        query = 'INSERT INTO chainstate ({}) VALUES ({});'.format(
                ','.join( CHAINSTATE_FIELDS ),
                ','.join( ['?'] * len(CHAINSTATE_FIELDS)))

        args = tuple([fields[fieldname] for fieldname in CHAINSTATE_FIELDS])
        cls.db_query_execute(cur, query, args)
        return True
16419
def get_from_clause(self):
        
        self.query_topology()
        root_table = self.soql_trans[self.root_alias]
        return [root_table], []
342716
def _add(self, obj, data, **kwargs):
        
        if isinstance(obj, sqlalchemy.orm.query.Query):
            obj = obj.one()
        obj = self.preprocessing(obj=obj or self.table)\
            .add(self.session, data, self.table)
        self.session.add(obj)
        if kwargs.get('commit', self.commit) is True:
            try:
                self.session.commit()
            except AssertionError:
                transaction.commit()
        return obj
304541
private PojoQueryBuilder<P> append(String facetName, BiFunction<String,Object,Clause> clause) {
        return append(facetName, clause, ParameterBindingConverter::new);
    }
471756
def _new_pivot_query(self):
        
        query = self.new_pivot_statement()

        for where_args in self._pivot_wheres:
            query.where(*where_args)

        return query.where(self._foreign_key, self._parent.get_key())
257579
function(encode) {
        var query = this.queryString || '',
            transformations = this.transformations,
            transformationKey = encode ? 't%5B%5D=' : 't[]=';

        if (encode) {
            transformations = transformations.map(encodeURIComponent);
        }

        if (this.transformations.length) {
            query += query.length ? '&' : '';
            query += transformationKey + transformations.join('&' + transformationKey);
        }

        return query;
    }
716778
private boolean appendInClause(StringBuilder queryBuilder, CQLTranslator translator, List<Object> value,
        Class fieldClazz, String columnName, boolean isPresent) {
        isPresent = appendIn(queryBuilder, translator, columnName);
        queryBuilder.append("(");
        for (Object objectvalue : value) {
            translator.appendValue(queryBuilder, fieldClazz, objectvalue, isPresent, false);
            queryBuilder.append(", ");
        }

        queryBuilder.deleteCharAt(queryBuilder.lastIndexOf(", "));
        queryBuilder.append(") ");

        queryBuilder.append(" AND ");
        return isPresent;
    }
1006006
def query(self):
        
        if self._rawquery==True:
            return self.__query
        return flatten(self.__query)