From: Mike Bayer Date: Sat, 8 Jan 2011 22:19:19 +0000 (-0500) Subject: crappy docs, lets try that again X-Git-Tag: rel_0_7b1~84 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0342a4886f00b34cf02e0d2d986a0896ba946788;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git crappy docs, lets try that again --- diff --git a/lib/sqlalchemy/dialects/mssql/base.py b/lib/sqlalchemy/dialects/mssql/base.py index facfdd7547..0faa970777 100644 --- a/lib/sqlalchemy/dialects/mssql/base.py +++ b/lib/sqlalchemy/dialects/mssql/base.py @@ -118,11 +118,12 @@ Triggers -------- SQLAlchemy by default uses OUTPUT INSERTED to get at newly -generated primary key values via SEQUENCE columns. MS-SQL does not +generated primary key values via IDENTITY columns or other +server side defaults. MS-SQL does not allow the usage of OUTPUT INSERTED on tables that have triggers. To disable the usage of OUTPUT INSERTED on a per-table basis, -specify ``implicit_returning=False`` to each :class:`.Table` -which has sequences:: +specify ``implicit_returning=False`` for each :class:`.Table` +which has triggers:: Table('mytable', metadata, Column('id', Integer, primary_key=True), @@ -137,7 +138,7 @@ Declarative form:: __table_args__ = {'implicit_returning':False} -This option can also be specified enginewide using the +This option can also be specified engine-wide using the ``implicit_returning=False`` argument on :func:`.create_engine`. Known Issues diff --git a/lib/sqlalchemy/engine/__init__.py b/lib/sqlalchemy/engine/__init__.py index e33dff53bd..010cc22ddf 100644 --- a/lib/sqlalchemy/engine/__init__.py +++ b/lib/sqlalchemy/engine/__init__.py @@ -175,15 +175,14 @@ def create_engine(*args, **kwargs): be applied to all connections. See :meth:`~sqlalchemy.engine.base.Connection.execution_options` - :param implicit_returning=True: When ``False``, the RETURNING - feature of the database, if available, will not be used - to fetch newly generated primary key values. This applies - to those backends which support RETURNING or a compatible - construct, including Postgresql, Firebird, Oracle, Microsoft - SQL Server. The default behavior is to use a compatible RETURNING - construct when a single-row INSERT statement is emitted with no - existing returning() clause in order to fetch newly generated - primary key values. + :param implicit_returning=True: When ``True``, a RETURNING- + compatible construct, if available, will be used to + fetch newly generated primary key values when a single row + INSERT statement is emitted with no existing returning() + clause. This applies to those backends which support RETURNING + or a compatible construct, including Postgresql, Firebird, Oracle, + Microsoft SQL Server. Set this to ``False`` to disable + the automatic usage of RETURNING. :param label_length=None: optional integer value which limits the size of dynamically generated column labels to that many