'Translate a filter expression into a DAL query
@param op: the operator
@param l: the left operand
@param r: the right operand'

def _query_bare(self, op, l, r):

    if (op == self.CONTAINS):
        q = l.contains(r, all=True)
    elif (op == self.ANYOF):
        q = l.contains(r, all=False)
    elif (op == self.BELONGS):
        q = self._query_belongs(l, r)
    elif (op == self.TYPEOF):
        q = self._query_typeof(l, r)
    elif (op == self.LIKE):
        if current.deployment_settings.get_database_airegex():
            q = S3AIRegex.like(l, r)
        else:
            q = l.like(s3_unicode(r))
    elif (op == self.INTERSECTS):
        q = self._query_intersects(l, r)
    elif (op == self.LT):
        q = (l < r)
    elif (op == self.LE):
        q = (l <= r)
    elif (op == self.EQ):
        q = (l == r)
    elif (op == self.NE):
        q = (l != r)
    elif (op == self.GE):
        q = (l >= r)
    elif (op == self.GT):
        q = (l > r)
    else:
        q = None
    return q
