

def as_nested_sql(self):
    "\n        Perform the same functionality as the as_sql() method, returning an\n        SQL string and parameters. However, the alias prefixes are bumped\n        beforehand (in a copy -- the current query isn't changed), and any\n        ordering is removed if the query is unsliced.\n\n        Used when nesting this query inside another.\n        "
    obj = self.query.clone()
    if ((obj.low_mark == 0) and (obj.high_mark is None)):
        obj.clear_ordering(True)
    self.bump_prefix()
    return obj.get_compiler(connection=self.connection).as_sql()

dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Django-1.6.10/django/db/models/sql/compiler.py SQLCompiler.as_nested_sql/VarMisuse@51/183 `obj`->`self`