From ce7768e3130ce1f83796c6090307e4591cbbfc45 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 8 Sep 2010 23:06:40 -0400 Subject: doc edits --- doc/build/core/engines.rst | 20 ++++++-------------- doc/build/core/types.rst | 2 +- 2 files changed, 7 insertions(+), 15 deletions(-) (limited to 'doc') diff --git a/doc/build/core/engines.rst b/doc/build/core/engines.rst index 02c904f18..de81a6d73 100644 --- a/doc/build/core/engines.rst +++ b/doc/build/core/engines.rst @@ -13,13 +13,13 @@ The general structure can be illustrated as follows: .. image:: sqla_engine_arch.png -Where above, a :class:`~sqlalchemy.engine.base.Engine` references both a -:class:`~sqlalchemy.engine.base.Dialect` and :class:`~sqlalchemy.pool.Pool`, +Where above, an :class:`~sqlalchemy.engine.base.Engine` references both a +:class:`~sqlalchemy.engine.base.Dialect` and a :class:`~sqlalchemy.pool.Pool`, which together interpret the DBAPI's module functions as well as the behavior of the database. Creating an engine is just a matter of issuing a single call, -:func:`create_engine()`:: +:func:`.create_engine()`:: engine = create_engine('postgresql://scott:tiger@localhost:5432/mydatabase') @@ -146,7 +146,7 @@ Database Urls SQLAlchemy indicates the source of an Engine strictly via `RFC-1738 `_ style URLs, combined with optional keyword -arguments to specify options for the Engine. The form of the URL is: +arguments to specify options for the Engine. The form of the URL is:: dialect+driver://username:password@host:port/database @@ -277,22 +277,14 @@ namespace of SA loggers that can be turned on is as follows: * ``sqlalchemy.engine`` - controls SQL echoing. set to ``logging.INFO`` for SQL query output, ``logging.DEBUG`` for query + result set output. * ``sqlalchemy.dialects`` - controls custom logging for SQL dialects. See the documentation of individual dialects for details. * ``sqlalchemy.pool`` - controls connection pool logging. set to ``logging.INFO`` or lower to log connection pool checkouts/checkins. -* ``sqlalchemy.orm`` - controls logging of various ORM functions. set to ``logging.INFO`` for configurational logging as well as unit of work dumps, ``logging.DEBUG`` for extensive logging during query and flush() operations. Subcategories of ``sqlalchemy.orm`` include: - * ``sqlalchemy.orm.attributes`` - logs certain instrumented attribute operations, such as triggered callables - * ``sqlalchemy.orm.mapper`` - logs Mapper configuration and operations - * ``sqlalchemy.orm.unitofwork`` - logs flush() operations, including dependency sort graphs and other operations - * ``sqlalchemy.orm.strategies`` - logs relationship loader operations (i.e. lazy and eager loads) - * ``sqlalchemy.orm.sync`` - logs synchronization of attributes from parent to child instances during a flush() +* ``sqlalchemy.orm`` - controls logging of various ORM functions. set to ``logging.INFO`` for information on mapper configurations. -For example, to log SQL queries as well as unit of work debugging: - -.. sourcecode:: python+sql +For example, to log SQL queries using Python logging instead of the ``echo=True`` flag:: import logging logging.basicConfig() logging.getLogger('sqlalchemy.engine').setLevel(logging.INFO) - logging.getLogger('sqlalchemy.orm.unitofwork').setLevel(logging.DEBUG) By default, the log level is set to ``logging.ERROR`` within the entire ``sqlalchemy`` namespace so that no log operations occur, even within an diff --git a/doc/build/core/types.rst b/doc/build/core/types.rst index 2205fa481..89a84abc8 100644 --- a/doc/build/core/types.rst +++ b/doc/build/core/types.rst @@ -1,4 +1,4 @@ -.. _types: +.. _types_toplevel: Column and Data Types ===================== -- cgit v1.2.1