def _kw_filter_to_clause(self, field, val):
        """Makes a WHERE clause out of field = val."""
        if not FIELD_PATTERN.match(field):
            raise ValueError('Not a valid field for where clause: %r' % field)
        param_k = self._param(val)
        field = self._resolve_alias(field)
        return u'%s = %%(%s)s' % (field, param_k)
dataset/ETHPy150Open mozilla/addons-server/src/olympia/editors/sql_model.py/RawSQLManager._kw_filter_to_clause/original