'A convenience method that turns a query into an EXISTS subquery
of the form EXISTS (SELECT 1 FROM ... WHERE ...).
e.g.::
q = session.query(User).filter(User.name == \'fred\')
session.query(q.exists())
Producing SQL similar to::
SELECT EXISTS (
SELECT 1 FROM users WHERE users.name = :name_1
) AS anon_1
.. versionadded:: 0.8.1'

def exists(self):

    return sql.exists(self.add_columns('1').with_labels().statement.with_only_columns(['1']))
