Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 0f12b69182fe3d3174a2e2454ef87704 > files > 442

python-sqlalchemy-0.6.8-1.fc14.x86_64.rpm

.. _query_api_toplevel:

Querying
========

This section provides API documentation for the :class:`.Query` object and related constructs.

For an in-depth introduction to querying with the SQLAlchemy ORM, please see the :ref:`ormtutorial_toplevel`.


.. module:: sqlalchemy.orm

The Query Object
----------------

:class:`~.Query` is produced in terms of a given :class:`~.Session`, using the :func:`~.Query.query` function::

    q = session.query(SomeMappedClass)

Following is the full interface for the :class:`Query` object.

.. autoclass:: sqlalchemy.orm.query.Query
   :members:
   :undoc-members:

ORM-Specific Query Constructs
-----------------------------

.. class:: aliased

The public name of the :class:`.AliasedClass` class.

.. autoclass:: sqlalchemy.orm.util.AliasedClass

.. autofunction:: join

.. autofunction:: outerjoin

.. autofunction:: with_parent