summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/crud.py
Commit message (Collapse)AuthorAgeFilesLines
* Raise exception when we have multiple values with an unknown column. Fixes ↵Athena Yao2016-03-021-1/+1
| | | | | | #3666. (cherry picked from commit 399f92cd116b747f742b919ac9a3e79eb0637e8a)
* fix passing literal_binds flag through for update and insertTim Tate2016-02-031-3/+4
| | | | (cherry picked from commit c9b03fa8afd52646aba8c59fc038330eeee6db60)
* - happy new yearMike Bayer2016-01-291-1/+1
| | | | (cherry picked from commit 859379e2fcc4506d036700ba1eca4c0ae526a8ee)
* - Fixed bug in :meth:`.Update.return_defaults` which would cause allMike Bayer2015-12-141-0/+1
| | | | | | | | | | | | | | | | insert-default holding columns not otherwise included in the SET clause (such as primary key cols) to get rendered into the RETURNING even though this is an UPDATE. - Major fixes to the :paramref:`.Mapper.eager_defaults` flag, this flag would not be honored correctly in the case that multiple UPDATE statements were to be emitted, either as part of a flush or a bulk update operation. Additionally, RETURNING would be emitted unnecessarily within update statements. fixes #3609 (cherry picked from commit 0e4c4d7efc08d04c3c0ae960428b08ada37e4a91)
* - Fixed issue within the :meth:`.Insert.from_select` construct wherebyMike Bayer2015-12-091-2/+3
| | | | | | | | | | | | | the :class:`.Select` construct would have its ``._raw_columns`` collection mutated in-place when compiling the :class:`.Insert` construct, when the target :class:`.Table` has Python-side defaults. The :class:`.Select` construct would compile standalone with the erroneous column present subsequent to compilation of the :class:`.Insert`, and the the :class:`.Insert` statement itself would fail on a second compile attempt due to duplicate bound parameters. fixes #3603 (cherry picked from commit e57bf796169282f69187f50665f5ea233c2c9ab7)
* - 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 (cherry picked from commit c90f0a49f332867f6b337c79ddf192299788667f)
* - 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 (cherry picked from commit c39ff9978dbb77cbea4f1ee08234887d8aa1b165)
* - 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