def as_sql(self, qn, connection):
        if connection.vendor == 'salesforce':
            lhs, lhs_params = self.process_lhs(qn, connection)
            rhs, rhs_params = self.process_rhs(qn, connection)
            if DJANGO_17_EXACT:
                rhs = [rhs, rhs]
            assert rhs == ['%s', '%s']
            params = lhs_params + rhs_params[:1] + lhs_params + rhs_params[1:2]
            # The symbolic parameters %s are again substituted by %s. The real
            # parameters will be passed finally directly to CursorWrapper.execute
            return '(%s >= %s AND %s <= %s)' % (lhs, rhs[0], lhs, rhs[1]), params
        else:
            return super(Range, self).as_sql(qn, connection)
dataset/ETHPy150Open django-salesforce/django-salesforce/salesforce/backend/compiler.py/Range.as_sql/original