summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/persistence.py
Commit message (Collapse)AuthorAgeFilesLines
* - copyright 2015Mike Bayer2015-03-101-1/+1
|
* - restore r611883ffb35ca6664649f6328ae8 with additional fixes and an ↵Mike Bayer2015-01-191-4/+8
| | | | | | additional test that is much more specific to #1326
* - reverse the last commit temporarily as it breaks all the polymorphic casesMike Bayer2015-01-191-8/+4
|
* - The primary :class:`.Mapper` of a :class:`.Query` is now passed to theMike Bayer2015-01-191-4/+8
| | | | | | | | | | | :meth:`.Session.get_bind` method when calling upon :meth:`.Query.count`, :meth:`.Query.update`, :meth:`.Query.delete`, as well as queries against mapped columns, :obj:`.column_property` objects, and SQL functions and expressions derived from mapped columns. This allows sessions that rely upon either customized :meth:`.Session.get_bind` schemes or "bound" metadata to work in all relevant cases. fixes #3227 fixes #3242 fixes #1326
* - further fixes and even better tests for this blockMike Bayer2015-01-191-3/+8
|
* - another adjustmentMike Bayer2015-01-191-2/+3
|
* - fix another issue from rf49c367ef, add another testMike Bayer2015-01-181-1/+1
|
* - fix a regression from ref #3178, where dialects that don't actually supportMike Bayer2015-01-171-4/+12
| | | | | sane multi rowcount (e.g. pyodbc) would fail on multirow update. add a test that mocks this breakage into plain dialects
* - add an option for bulk_save -> update to not do historyMike Bayer2014-12-071-2/+7
|
* - fix inheritance persistenceMike Bayer2014-12-071-6/+9
| | | | - start writing docs
* Merge branch 'master' into ticket_3100Mike Bayer2014-11-061-4/+4
|\ | | | | | | | | Conflicts: lib/sqlalchemy/orm/persistence.py
| * Small improvement on FlushError can't update error messagepr/149Paulo Bu2014-11-061-4/+4
| | | | | | | | Output in the error message the table name and the column name.
* | Merge branch 'master' into ticket_3100Mike Bayer2014-11-061-7/+40
|\ \ | |/
| * Small improvement on FlushError can't delete error messagepr/148Paulo Bu2014-11-051-2/+2
| | | | | | | | Output in the error message the table name and the column name.
| * - The :meth:`.Query.update` method will now convert string keyMike Bayer2014-10-161-5/+38
| | | | | | | | | | | | | | | | | | | | names in the given dictionary of values into mapped attribute names against the mapped class being updated. Previously, string names were taken in directly and passed to the core update statement without any means to resolve against the mapped entity. Support for synonyms and hybrid attributes as the subject attributes of :meth:`.Query.update` are also supported. fixes #3228
* | Merge branch 'master' into ticket_3100Mike Bayer2014-09-051-3/+3
|\ \ | |/
| * - tiny refactors #1-#5Mike Bayer2014-09-051-3/+3
| |
* | - add options to get back pk defaults for inserts.Mike Bayer2014-09-021-11/+26
| | | | | | | | times spent start getting barely different...
* | Merge branch 'master' into ticket_3100Mike Bayer2014-09-021-2/+1
|\ \ | |/
| * - A new style of warning can be emitted which will "filter" up toMike Bayer2014-08-311-2/+1
| | | | | | | | | | | | | | | | | | N occurrences of a parameterized string. This allows parameterized warnings that can refer to their arguments to be delivered a fixed number of times until allowing Python warning filters to squelch them, and prevents memory from growing unbounded within Python's warning registries. fixes #3178
* | - that's it, feature is finished, needs testsMike Bayer2014-08-201-106/+89
| |
* | Merge branch 'master' into ticket_3100Mike Bayer2014-08-201-55/+55
|\ \ | |/
| * - factor out determination of current version id out ofMike Bayer2014-08-201-55/+55
| | | | | | | | _collect_update_commands and _collect_delete_commands
* | Merge branch 'master' into ticket_3100Mike Bayer2014-08-191-16/+6
|\ \ | |/
| * - simplify PK logic in update for row switchMike Bayer2014-08-191-16/+6
| |
* | - refinementsMike Bayer2014-08-191-35/+72
| |
* | devMike Bayer2014-08-181-19/+18
| |
* | devMike Bayer2014-08-181-26/+21
| |
* | Merge branch 'master' into ticket_3100Mike Bayer2014-08-181-210/+212
|\ \ | |/ | | | | | | | | Conflicts: lib/sqlalchemy/orm/mapper.py lib/sqlalchemy/orm/persistence.py
| * - optimize collection of cols we insert as noneMike Bayer2014-08-181-8/+2
| |
| * - move out checks for table in mapper._pks_by_tableMike Bayer2014-08-181-16/+32
| |
| * - further reorganize collect_insert_commands to distinguish betweenMike Bayer2014-08-181-13/+21
| | | | | | | | | | setting up given values vs. defaults. again trying to shoot for making this of more general use
| * - organize persistence methods in terms of generators,Mike Bayer2014-08-181-93/+94
| | | | | | | | | | | | narrow down argument lists and generator items for each function down to just what each function needs. This will help for them to be of more multipurpose use for bulk operations
| * - major simplification of _collect_update_commands. in particular,Mike Bayer2014-08-181-83/+57
| | | | | | | | | | | | we only call upon the history API fully for primary key columns. We also now skip the whole step of looking at PK columns and using any history at all if no net changes are detected on the object.
| * - Fixed bug where attribute "set" events or columns withMike Bayer2014-08-171-9/+3
| | | | | | | | | | | | | | | | ``@validates`` would have events triggered within the flush process, when those columns were the targets of a "fetch and populate" operation, such as an autoincremented primary key, a Python side default, or a server-side default "eagerly" fetched via RETURNING. fixes #3167
| * - support dialects w/o sane multi row count againMike Bayer2014-08-161-15/+33
| |
| * - port the _collect_insert_commands optimizations from ticket_3100Mike Bayer2014-08-151-36/+35
| |
* | - refine this enough so that _collect_insert_commands() seemsMike Bayer2014-08-151-133/+126
| | | | | | | | | | | | | | | | to be more than twice as fast now (.039 vs. .091); bulk_insert() and bulk_update() do their own collection but now both call into _emit_insert_statements() / _emit_update_statements(); the approach seems to have no impact on insert speed, still .85 for the insert test
* | - change to be represented as two very fast bulk_insert() and bulk_update() ↵Mike Bayer2014-08-151-82/+173
| | | | | | | | methods
* | devMike Bayer2014-08-151-26/+33
| |
* | - proof of conceptMike Bayer2014-08-151-37/+44
|/
* - UPDATE statements can now be batched within an ORM flushMike Bayer2014-08-141-41/+62
| | | | | | | | | | into more performant executemany() call, similarly to how INSERT statements can be batched; this will be invoked within flush to the degree that subsequent UPDATE statements for the same mapping and table involve the identical columns within the VALUES clause, as well as that no VALUES-level SQL expressions are embedded. - some other inlinings within persistence.py
* pep8Mike Bayer2014-08-141-9/+9
|
* - apply pep8 formatting to sqlalchemy/sql, sqlalchemy/util, sqlalchemy/dialects,Brian Jarrett2014-07-201-191/+194
| | | | sqlalchemy/orm, sqlalchemy/event, sqlalchemy/testing
* - break up the <authors> copyright comment as part of a passMike Bayer2014-07-091-1/+2
| | | | to get all flake8 passing
* - The "evaulator" for query.update()/delete() won't work with multi-tableMike Bayer2014-07-081-2/+3
| | | | | | | updates, and needs to be set to `synchronize_session=False` or `synchronize_session='fetch'`; this now raises an exception, with a message to change the synchronize setting. This will be only a warning in 0.9.7. fixes #3117
* - cut out some calls by inlining the calls to get_history()Mike Bayer2014-06-281-9/+8
|
* - Adjustment to attribute mechanics concerning when a value isMike Bayer2014-05-291-5/+0
| | | | | | | | | | | | | | implicitly initialized to None via first access; this action, which has always resulted in a population of the attribute, now emits an attribute event just like any other attribute set operation and generates the same kind of history as one. Additionally, many mapper internal operations will no longer implicitly generate these "None" values when various never-set attributes are checked. These are subtle behavioral fixes to attribute mechanics which provide a better solution to the problem of :ticket:`3060`, which also involves recognition of attributes explicitly set to ``None`` vs. attributes that were never set. fixes #3061
* - Fixed a few edge cases which arise in the so-called "row switch"Mike Bayer2014-05-281-0/+6
| | | | | | | | | | | scenario, where an INSERT/DELETE can be turned into an UPDATE. In this situation, a many-to-one relationship set to None, or in some cases a scalar attribute set to None, may not be detected as a net change in value, and therefore the UPDATE would not reset what was on the previous row. This is due to some as-yet unresovled side effects of the way attribute history works in terms of implicitly assuming None isn't really a "change" for a previously un-set attribute. See also :ticket:`3061`. fixes #3060
* - Added new parameter :paramref:`.mapper.confirm_deleted_rows`. DefaultsMike Bayer2014-03-281-16/+23
| | | | | | | | | | | | to True, indicates that a series of DELETE statements should confirm that the cursor rowcount matches the number of primary keys that should have matched; this behavior had been taken off in most cases (except when version_id is used) to support the unusual edge case of self-referential ON DELETE CASCADE; to accomodate this, the message is now just a warning, not an exception, and the flag can be used to indicate a mapping that expects self-refererntial cascaded deletes of this nature. See also :ticket:`2403` for background on the original change. re: #2403 fix #3007