summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/crud.py
Commit message (Collapse)AuthorAgeFilesLines
* - Added support for parameter-ordered SET clauses in an UPDATEMike Bayer2015-11-281-1/+12
| | | | | | | | | | statement. This feature is available by passing the :paramref:`~.sqlalchemy.sql.expression.update.preserve_parameter_order` flag either to the core :class:`.Update` construct or alternatively adding it to the :paramref:`.Query.update.update_args` dictionary at the ORM-level, also passing the parameters themselves as a list of 2-tuples. Thanks to Gorka Eguileor for implementation and tests. adapted from pullreq github:200
* - The system by which a :class:`.Column` considers itself to be anMike Bayer2015-10-071-9/+82
| | | | | | | | | | | | | | | | | "auto increment" column has been changed, such that autoincrement is no longer implicitly enabled for a :class:`.Table` that has a composite primary key. In order to accommodate being able to enable autoincrement for a composite PK member column while at the same time maintaining SQLAlchemy's long standing behavior of enabling implicit autoincrement for a single integer primary key, a third state has been added to the :paramref:`.Column.autoincrement` parameter ``"auto"``, which is now the default. fixes #3216 - The MySQL dialect no longer generates an extra "KEY" directive when generating CREATE TABLE DDL for a table using InnoDB with a composite primary key with AUTO_INCREMENT on a column that isn't the first column; to overcome InnoDB's limitation here, the PRIMARY KEY constraint is now generated with the AUTO_INCREMENT column placed first in the list of columns.
* - Fixed regression in 1.0-released default-processor for multi-VALUESMike Bayer2015-08-311-0/+1
| | | | | | | | insert statement, :ticket:`3288`, where the column type for the default-holding column would not be propagated to the compiled statement in the case where the default was being used, leading to bind-level type handlers not being invoked. fixes #3520
* - copyright 2015Mike Bayer2015-03-101-1/+1
|
* - refine the previous commit a bitMike Bayer2015-01-131-20/+27
|
* - The multi-values version of :meth:`.Insert.values` has beenMike Bayer2015-01-131-32/+51
| | | | | | | | | | | | repaired to work more usefully with tables that have Python- side default values and/or functions, as well as server-side defaults. The feature will now work with a dialect that uses "positional" parameters; a Python callable will also be invoked individually for each row just as is the case with an "executemany" style invocation; a server- side default column will no longer implicitly receive the value explicitly specified for the first row, instead refusing to invoke without an explicit value. fixes #3288
* - :meth:`.Insert.from_select` now includes Python and SQL-expressionMike Bayer2014-10-101-20/+77
| | | | | | | defaults if otherwise unspecified; the limitation where non- server column defaults aren't included in an INSERT FROM SELECT is now lifted and these expressions are rendered as constants into the SELECT statement.
* - cyclomatic complexity: _get_colparams() becomes sql.crud._get_crud_params,Mike Bayer2014-09-271-0/+473
CC goes from F to D