Commit Graph

  • 39b89bd05b column.foreign_key -> foreign_keys in MSSQL Paul Johnston 2007-11-25 17:32:06 +00:00
  • e83eefafbb bump for py2.4 Mike Bayer 2007-11-25 04:00:44 +00:00
  • d5f9f122f6 OrderedSet to appease the unit tests....need to find a way to get rid of this Mike Bayer 2007-11-25 03:45:20 +00:00
  • cf18eecd70 - named_with_column becomes an attribute - cleanup within compiler visit_select(), column labeling - is_select() removed from dialects, replaced with returns_rows_text(), returns_rows_compiled() - should_autocommit() removed from dialects, replaced with should_autocommit_text() and should_autocommit_compiled() - typemap and column_labels collections removed from Compiler, replaced with single "result_map" collection. - ResultProxy uses more succinct logic in combination with result_map to target columns Mike Bayer 2007-11-25 03:28:49 +00:00
  • 6f604f9116 - decruftify old visitors used by orm, convert to functions that use a common traversal function. - TranslatingDict is finally gone, thanks to column.proxy_set simpleness...hooray ! - shoved "slice" use case on RowProxy into an exception case. knocks noticeable time off of large result set operations. Mike Bayer 2007-11-24 01:59:29 +00:00
  • 3f93103a5e - all kinds of cleanup, tiny-to-slightly-significant speed improvements Mike Bayer 2007-11-24 00:55:39 +00:00
  • 238dc916fa more changes to merge(dont_load); since we now have a guarantee that all merged instances aren't dirty, we can copy the attribues without using any append/replace events, and therefore don't have any concern of lazy loaders firing off. added tests to ensure that '_is_orphan()' doesn't get screwed up, and also that the 'dirty' list on the new session stays empty, which is an extra bonus of this approach. Mike Bayer 2007-11-23 19:01:40 +00:00
  • 41403b7930 - some clarifications and fixes to merge(instance, dont_load=True). fixed bug where lazy loaders were getting disabled on returned instances. Also, we currently do not support merging an instance which has uncommitted changes on it, in the case that dont_load=True is used....this will now raise an error. This is due to complexities in merging the "committed state" of the given instance to correctly correspond to the newly copied instance. Since the use case for dont_load=True is caching, the given instances shouldn't have any uncommitted changes on them anyway. Mike Bayer 2007-11-23 05:24:32 +00:00
  • 56d14df0eb Typo fix Jason Kirtland 2007-11-20 18:32:01 +00:00
  • 6fa74de09d - clarified the error message which occurs when you try to update() an instance with the same identity key as an instance already present in the session. - opened up the recursive checks in session.merge() a little bit Mike Bayer 2007-11-20 15:55:36 +00:00
  • 569c9fa65a - fixed endless loop issue when using lazy="dynamic" on both sides of a bi-directional relationship [ticket:872] Mike Bayer 2007-11-19 08:30:52 +00:00
  • 6bb629d76b add a polymorphic get() test Mike Bayer 2007-11-19 04:08:48 +00:00
  • 051e43245d doctest fixups rel_0_4_1 Mike Bayer 2007-11-18 22:47:55 +00:00
  • aaaac9be47 - added tests for [ticket:768] Mike Bayer 2007-11-18 22:35:19 +00:00
  • 64d0ffee96 - added op() operator to instrumented attributes; i.e. User.name.op('ilike')('%somename%') [ticket:767] Mike Bayer 2007-11-18 22:19:05 +00:00
  • b3ec17153b - MSSQL anonymous labels for selection of functions made deterministic - propagate correct **kwargs through mssql methods Mike Bayer 2007-11-18 21:32:13 +00:00
  • 4e12db8295 repaired FB functions, [ticket:862] Mike Bayer 2007-11-18 21:20:32 +00:00
  • f96a514f43 Tests for mysql casts and a couple adjustments. Jason Kirtland 2007-11-18 20:44:20 +00:00
  • d3f6ae2332 - Clarified use of python's Decimal Jason Kirtland 2007-11-18 19:01:42 +00:00
  • ea627ebe5c Migrated Connection.properties to Connection.info ('info' is the new standard name for user-writable property collections that came out of [ticket:573]). 'properties' is now an alias, will be removed in 0.5. Jason Kirtland 2007-11-18 18:19:52 +00:00
  • 08a434881f - added a little more checking for garbage-collection dereferences in InstanceState.__cleanup() to reduce "gc ignored" errors on app shutdown Mike Bayer 2007-11-18 17:31:09 +00:00
  • 68027f623a added some ORDER BYs to appease the ever picky postgres Mike Bayer 2007-11-18 17:17:04 +00:00
  • 268834989c - PickleType will compare using == when set up with mutable=False, and not the is operator. To use is or any other comparator, send in a custom comparison function using PickleType(comparator=my_custom_comparator). Mike Bayer 2007-11-18 16:32:47 +00:00
  • 177c2219c6 test cases were not fully testing contains_eager() with regards to [ticket:777], fixed contains_eager() for more than one level deep Mike Bayer 2007-11-18 16:18:54 +00:00
  • 95807fd287 some wide zoomark ranges... Mike Bayer 2007-11-18 07:23:00 +00:00
  • 31b32896e8 cut down a good deal of Join construction overhead Mike Bayer 2007-11-18 06:51:17 +00:00
  • 61edeeae4c logging fixes Mike Bayer 2007-11-18 05:46:45 +00:00
  • 79aa1a6b25 fixed both group-deferred attributes and expired attributes to not blow away changes made on attributes before the load takes place Mike Bayer 2007-11-18 05:16:52 +00:00
  • 43d476ce60 - oracle will now reflect "DATE" as an OracleDateTime column, not OracleDate Mike Bayer 2007-11-18 02:44:15 +00:00
  • 89da016272 removed is_expired() method since the meaning of "expired" is per-attribute now Mike Bayer 2007-11-18 02:22:41 +00:00
  • d86eb9ba4f oops, print statements... Mike Bayer 2007-11-18 02:18:52 +00:00
  • be50f4f13a typos Mike Bayer 2007-11-18 02:15:34 +00:00
  • 622a26a655 - session.refresh() and session.expire() now support an additional argument "attribute_names", a list of individual attribute keynames to be refreshed or expired, allowing partial reloads of attributes on an already-loaded instance. - finally simplified the behavior of deferred attributes, deferred polymorphic load, session.refresh, session.expire, mapper._postfetch to all use a single codepath through query._get(), which now supports a list of individual attribute names to be refreshed. the *one* exception still remaining is mapper._get_poly_select_loader(), which may stay that way since its inline with an already processing load operation. otherwise, query._get() is the single place that all "load this instance's row" operation proceeds. - cleanup all over the place Mike Bayer 2007-11-18 02:13:56 +00:00
  • e076169d39 fixed further issues with row translation [ticket:868] Mike Bayer 2007-11-15 15:10:05 +00:00
  • d5da9a56bc Restored Python 2.3 compatibility (in IdentitySet) Jason Kirtland 2007-11-14 22:46:14 +00:00
  • 64b7a0cd6e modified last commit; the eager loader only undefers columns from the primary mapped table. Mike Bayer 2007-11-14 16:59:49 +00:00
  • a03aa84c31 - DeferredColumnLoader checks row for column, if present sends it to ColumnLoader to create the row processor - eager loaders ensure deferred foreign key cols are present in the primary list of columns (and secondary...). because eager loading with LIMIT/OFFSET doesn't re-join to the parent table anymore this is now necessary. [ticket:864] Mike Bayer 2007-11-14 16:43:21 +00:00
  • 7f0b5edc92 Removed some distractions, ala r3770. Jason Kirtland 2007-11-14 01:26:50 +00:00
  • f4a9e4512b Removed some distractions. Jason Kirtland 2007-11-14 00:43:49 +00:00
  • f4ee7a1bcb - added having() method to Query, applies HAVING to the generated statement in the same way as filter() appends to the WHERE clause. Mike Bayer 2007-11-13 23:07:01 +00:00
  • fb36643893 More column type __repr__ corrections. Jason Kirtland 2007-11-13 19:29:16 +00:00
  • e31665b82f AbstractType __repr__ robustification. Jason Kirtland 2007-11-13 16:50:16 +00:00
  • e684b93a69 Remove usage of deprecated in_ syntax Paul Johnston 2007-11-11 18:23:59 +00:00
  • 7f85c1e443 - Pool listeners preserved on pool.recreate() - Docstring rampage Jason Kirtland 2007-11-10 19:31:06 +00:00
  • df3cbebe3c Removed out of date identity map language (thanks, Jiten) Jason Kirtland 2007-11-10 15:47:19 +00:00
  • b6b720609d added self referential test Mike Bayer 2007-11-10 14:36:03 +00:00
  • ea46e556f9 - anonymous column expressions are automatically labeled. e.g. select([x* 5]) produces "SELECT x * 5 AS anon_1". This allows the labelname to be present in the cursor.description which can then be appropriately matched to result-column processing rules. (we can't reliably use positional tracking for result-column matches since text() expressions may represent multiple columns). Mike Bayer 2007-11-10 03:02:16 +00:00
  • 681c8fc51c - mysql float types now do an end run around the base class and respect precision=None and length=None - Added the mysteriously missing mysql cast support - Added mysql REAL synonym for schema generation Jason Kirtland 2007-11-09 19:55:31 +00:00
  • c1d5cdb940 more searching for equiv columns Mike Bayer 2007-11-09 16:54:47 +00:00
  • 476d395f5e - fixed error where Query.add_column() would not accept a class-bound attribute as an argument; Query also raises an error if an invalid argument was sent to add_column() (at instances() time) [ticket:858] Mike Bayer 2007-11-09 16:36:46 +00:00
  • 9d21a7f080 - query doesn't throw an error if you use distinct() and an order_by() containing UnaryExpressions (or other) together [ticket:848] Mike Bayer 2007-11-09 16:25:28 +00:00
  • d54ca6a62a a tweak, still requiring test coverage, to add more "foreign key equivalents" to the equivalent_columns collection Mike Bayer 2007-11-09 15:11:38 +00:00
  • 2cbb133567 more changes to traverse-and-clone; a particular element will only be cloned once and is then re-used. the FROM calculation of a Select normalizes the list of hide_froms against all previous incarnations of each FROM clause, using a tag attached from cloned clause to previous. Mike Bayer 2007-11-08 18:06:21 +00:00
  • 7a25be0f42 - identified some cases where Alias needs to be cloned; but still cant clone when its an alias of a Table; added some test coverage for one particular case from the doctests - fixed "having" example in doctests, updated eager load example Mike Bayer 2007-11-08 00:26:23 +00:00
  • 004345d7c9 updated zoomark test_1a_populate callcounts. if the calls keep being removed like this then soon there will be none left. Ants Aasma 2007-11-08 00:11:46 +00:00
  • 750439ac5f - fixed remainder of [ticket:853] - bindparam 'shortname' is deprecated - fixed testing.assert_compile() to actually generate bind param dict before asserting - added bind param assertions to CRUDTest.test_update Mike Bayer 2007-11-07 22:25:01 +00:00
  • a914fae9db - <Engine|Connection>._execute_clauseelement becomes a public method Connectable.execute_clauseelement Mike Bayer 2007-11-07 21:56:23 +00:00
  • 4b6881af55 - fix to compiled bind parameters to not mistakenly populate None [ticket:853] Mike Bayer 2007-11-07 21:48:16 +00:00
  • f9c8d1cf34 fixed the previous TLTransaction checkin Mike Bayer 2007-11-07 21:46:48 +00:00
  • af070d037b - fixed the close() method on Transaction when using strategy='threadlocal' Mike Bayer 2007-11-07 18:31:35 +00:00
  • c1a9a96ba5 adjusted "blank out primary key" rule to check for "allow_null_pks" on target mapper. this was revealed by recent attributes.py change in r3695 that causes a value of "None" to register as part of the attribute history's added_items() collection (i.e. since AttributeHistory compares against NO_VALUE instead of None). Mike Bayer 2007-11-07 01:36:16 +00:00
  • e09fed05c7 - fixed very hard-to-reproduce issue where by the FROM clause of Query could get polluted by certain generative calls [ticket:852] Mike Bayer 2007-11-07 00:52:49 +00:00
  • 7cd2c7d299 fixed/added coverage for list extension; [ticket:855] Mike Bayer 2007-11-06 19:19:30 +00:00
  • 45d23d96c4 Added missing InternalError exception wrapper [ticket:854] Jason Kirtland 2007-11-06 18:21:28 +00:00
  • 8f5d0cc4a2 Create a storage field for arbitrary info on tables/columns; ticket #573 Paul Johnston 2007-11-06 10:41:40 +00:00
  • 5c060ab22a Added note about EXT_CONTINUE to 3.x -> 4.x migration guide Rick Morrison 2007-11-05 22:52:21 +00:00
  • bcb586a93c Migrated maxdb behavioral assumptions from unsupported to fails_on Jason Kirtland 2007-11-05 22:11:30 +00:00
  • d36a3940a0 Added testing.fails_on('db') failure-asserter. Jason Kirtland 2007-11-05 22:02:00 +00:00
  • 724eb54efd - figured out a way to get previous oracle behavior back. the ROWID thing is still a pretty thorny issue. Mike Bayer 2007-11-05 19:38:01 +00:00
  • 5a70cb7fa5 - adjustments to oracle ROWID logic...recent oid changes mean we have to use "rowid" against the select itself (i.e. its just...'rowid', no table name). seems to work OK but not sure if issues will arise - fixes to oracle bind param stuff to account for recent removal of ClauseParameters object. Mike Bayer 2007-11-05 19:23:08 +00:00
  • 00c2077cbc - oid_column proxies more intelligently off of Select, CompoundSelect - fixes platform-affected bugs in missing the correct "oid" column - locate_all_froms() is expensive; added an attribute-level cache for it - put a huge warning on all select.append_XXX() methods stating that derived collections like locate_all_froms() may become invalid if already initialized Mike Bayer 2007-11-05 18:30:30 +00:00
  • 5172668531 Whitespace cleanup Jason Kirtland 2007-11-05 17:26:17 +00:00
  • 977e86dc9b - base_columns on ColumnElement becomes a list; as usual, because columns in CompoundSelects may extend from more than one root column. - keys_ok argument from corresponding_column() removed. no more name-based matching of columns anywhere. - DictDecorator is gone. all row translators provided by orm.util.create_row_adapter(). Mapper and contains_alias() cache the adapters on target mapper to avoid re-computation of adapters. - create_row_adapter() accepts an "equivalent_columns" map as produced by Mapper, so that row adapters can take join conditions into account (as usual again, to help with the CompoundSelects produced by polymorphic_union). - simplified TableSingleton to just provide lookup; moved all initialization into Table. - the "properties" accessor on Mapper is removed; it now throws an informative exception explaining the usage of mapper.get_property() and mapper.iterate_properties Mike Bayer 2007-11-05 17:18:21 +00:00
  • 43498def13 - SHOW CREATE TABLE output is slightly different if msyql is in ANSI mode Jason Kirtland 2007-11-05 17:15:41 +00:00
  • 0e25c2d9e8 - rewrote and simplified the system used to "target" columns across selectable expressions. On the SQL side this is represented by the "corresponding_column()" method. This method is used heavily by the ORM to "adapt" elements of an expression to similar, aliased expressions, as well as to target result set columns originally bound to a table or selectable to an aliased, "corresponding" expression. The new rewrite features completely consistent and accurate behavior. - the "orig_set" and "distance" elements as well as all associated fanfare are gone (hooray !) - columns now have an optional "proxies" list which is a list of all columns they are a "proxy" for; only CompoundSelect cols proxy more than one column (just like before). set operations are used to determine lineage. - CompoundSelects (i.e. unions) only create one public-facing proxy column per column name. primary key collections come out with just one column per embedded PK column. - made the alias used by eager load limited subquery anonymous. Mike Bayer 2007-11-05 00:59:19 +00:00
  • 303e753b2d - func. objects can be pickled/unpickled [ticket:844] Mike Bayer 2007-11-04 22:04:22 +00:00
  • 7aead4d40f - func. objects can be pickled/unpickled [ticket:844] Mike Bayer 2007-11-04 22:03:40 +00:00
  • 8ebc8ee5ba - eager loading with LIMIT/OFFSET applied no longer adds the primary table joined to a limited subquery of itself; the eager loads now join directly to the subquery which also provides the primary table's columns to the result set. This eliminates a JOIN from all eager loads with LIMIT/OFFSET. [ticket:843] Mike Bayer 2007-11-03 23:17:34 +00:00
  • 0af3f8f35b - rewritten ClauseAdapter merged from the eager_minus_join branch; this is a much simpler and "correct" version which will copy all elements exactly once, except for those which were replaced with target elements. It also can match a wider variety of target elements including joins and selects on identity alone. Mike Bayer 2007-11-03 22:13:17 +00:00
  • 784eaa108a Added a profiled benchmark for orm attribute modification & flush Jason Kirtland 2007-11-03 22:03:18 +00:00
  • ede4b6c279 - Swap operator.eq for lambda x,y: x==y - Some docstring re-formatting Jason Kirtland 2007-11-03 21:59:39 +00:00
  • 4f24608846 Formatting for 0.4.1 Jason Kirtland 2007-11-03 20:53:37 +00:00
  • a6d121b6a8 Added some more notes for maxdb Jason Kirtland 2007-11-03 20:42:07 +00:00
  • 429e69db67 - Removed equality, truth and hash() testing of mapped instances. Mapped classes can now implement arbitrary __eq__ and friends. [ticket:676] Jason Kirtland 2007-11-03 20:23:26 +00:00
  • 4210a1ef23 - removed "name" attribute from FromClause, Join, Select, CompoundSelect. its needless and led to some very strange anonymous label names - removed what was apparently cruft in some column-targeting code Mike Bayer 2007-11-03 20:12:59 +00:00
  • 8dd51943a0 added small clarification on single-table inheritance mapper def Rick Morrison 2007-11-03 16:11:41 +00:00
  • 9cdc083ed1 doc updates for save_on_init=False, merge(...dont_save=True) Mike Bayer 2007-11-02 21:02:22 +00:00
  • d355ea021d - extra merge test - merge with dont_load also propagates _state.modified Mike Bayer 2007-11-02 18:05:06 +00:00
  • 4161271a8c - merge() includes a keyword argument "dont_load=True". setting this flag will cause the merge operation to not load any data from the database in response to incoming detached objects, and will accept the incoming detached object as though it were already present in that session. Use this to merge detached objects from external caching systems into the session. Mike Bayer 2007-11-02 17:58:20 +00:00
  • ceb782ba49 More improvements to testlib's mapper decorator Jason Kirtland 2007-11-02 00:27:40 +00:00
  • 55c9b05cdb Tweaks for assert_unordered_result Jason Kirtland 2007-11-01 23:13:30 +00:00
  • c87295cdfd Added AssertMixin.assert_unordered_result Jason Kirtland 2007-11-01 20:59:30 +00:00
  • 2e9501683d - session checks more carefully when determining "object X already in another session"; e.g. if you pickle a series of objects and unpickle (i.e. as in a Pylons HTTP session or similar), they can go into a new session without any conflict - added stricter checks around session.delete() similar to update() - shored up some old "validate" stuff in session/uow Mike Bayer 2007-11-01 20:12:36 +00:00
  • 1bf0aee385 Added rowset() testing helper. Jason Kirtland 2007-11-01 19:40:08 +00:00
  • ca73fbab87 Fixed truth-evaluation of mapped objects (part of [ticket:676] Jason Kirtland 2007-11-01 16:36:50 +00:00
  • 66cd772094 - merged factor_down_bindparams branch. - removed ClauseParameters object; compiled.params returns a regular dictionary now, as well as result.last_inserted_params()/last_updated_params(). - various code trimming, method removals. Mike Bayer 2007-11-01 03:58:21 +00:00
  • ad9f8b8158 Added command line options to add tripwires for __hash__, __eq__ and __nonzero__ on mapped classes. Jason Kirtland 2007-10-31 23:49:09 +00:00
  • d5aa08160a - A more efficient IdentitySet Jason Kirtland 2007-10-31 19:53:27 +00:00
  • 3f4d34b42c - split ScalarInstrumentedAttribute into a "scalar" and an "object" version. The "object" version loads the existing value on set/del, fires events, and handles trackparent operations; the "scalar" version does not. - column loaders now use the "scalar" version of InstrumentedAttribute, so that event handlers etc. don't fire off for regular column attribute operations. - some adjustments to AttributeHistory to work properly for non-loaded attributes - deferred column attributes no longer trigger a load operation when the attribute is assigned to. in those cases, the newly assigned value will be present in the flushes' UPDATE statement unconditionally. Mike Bayer 2007-10-31 19:11:22 +00:00
  • 60c3a1e8a2 dont call up new session unless save_on_init Mike Bayer 2007-10-31 17:15:30 +00:00