Commit Graph

  • f431017f40 - Applied some safe collections optimizations and annotated a few key places for future optimization. As-is, masseagerload shows a speed up and overall function reduction compared to 0.4 pre-collections. - Some minor cleanups in collections + related Jason Kirtland 2007-06-28 17:42:34 +00:00
  • 2b1a7aa593 eek! wrong tranasctional command for like, years now.... Mike Bayer 2007-06-28 16:36:09 +00:00
  • 5cd9662399 added extra session.clear() to enable example to work Mike Bayer 2007-06-28 15:06:36 +00:00
  • 7bb67e363d fix to "populate_existing" Mike Bayer 2007-06-27 23:12:08 +00:00
  • 7b87fcecd6 - Replaced collection api: The "InstrumentedList" proxy is replaced with a proxy-free, decorator-based approach for user-space instrumentation and a "view" adapter for interaction with the user's collection within the orm. Fixes [ticket:213], [ticket:548], [ticket:563]. - This needs many more unit tests. There is significant indirect coverage through association proxy, but direct tests are needed, specifically in the decorators and add/remove event firing. - Collections are now instrumented via decorations rather than proxying. You can now have collections that manage their own membership, and your class instance will be directly exposed on the relation property. The changes are transparent for most users. - InstrumentedList (as it was) is removed, and relation properties no longer have 'clear()', '.data', or any other added methods beyond those provided by the collection type. You are free, of course, to add them to a custom class. - __setitem__-like assignments now fire remove events for the existing value, if any. - dict-likes used as collection classes no longer need to change __iter__ semantics- itervalues() is used by default instead. This is a backwards incompatible change. - subclassing dict for a mapped collection is no longer needed in most cases. orm.collections provides canned implementations that key objects by a specified column or a custom function of your choice. - collection assignment now requires a compatible type- assigning None to clear a collection or assinging a list to a dict collection will now raise an argument error. - AttributeExtension moved to interfaces, and .delete is now .remove The event method signature has also been swapped around. Jason Kirtland 2007-06-27 21:08:14 +00:00
  • 01e9fa8f47 - fix to the "column_prefix" flag so that the mapper does not trip over synonyms (and others) that are named after the column's actual "key" (since, column_prefix means "dont use the key"). Mike Bayer 2007-06-27 20:38:43 +00:00
  • a1a2fe7400 merge from trunk fix for undetected disconnects for mysql (ticket #625), r2793 Ants Aasma 2007-06-27 09:54:33 +00:00
  • 6f70a1c386 some errors of droppedm mysql connections weren't being caught by the disconnect detecting logic, fixes #625 Ants Aasma 2007-06-27 09:51:17 +00:00
  • 6f630e98a6 merge 2791 from trunk, fix for bad error message (ticket #607) Ants Aasma 2007-06-26 19:07:51 +00:00
  • 2268526d4c better error message for NoSuchColumnError, fix ticket #607 Ants Aasma 2007-06-26 19:01:33 +00:00
  • 8b89aa795c merge compound select grouping patch from trunk (ticket #623) Ants Aasma 2007-06-26 18:31:57 +00:00
  • 51c0d90c8d add missing grouping for compound selects. fixes ticket #623 Ants Aasma 2007-06-26 18:00:57 +00:00
  • c533030643 merge from trunk #624 fix, modulo operator escaping Ants Aasma 2007-06-26 16:38:16 +00:00
  • b191254d8a fix #624, modulo operator escaping on mysql and postgres someone should test this with oracle, firebird and sql server also Ants Aasma 2007-06-26 16:37:30 +00:00
  • 73b76e57ac merged between precedence from trunk ([2785]) Ants Aasma 2007-06-25 19:20:53 +00:00
  • 987581e6d2 fix precedence of between (ticket #621) Ants Aasma 2007-06-25 18:14:40 +00:00
  • 9225b3dee9 merged operator precedence fixes/tests IN fixes/tests from trunk r2782-r2783 Mike Bayer 2007-06-25 17:22:14 +00:00
  • bc58df9c1f - fixed precedence of operators so that parenthesis are correctly applied [ticket:620] - calling <column>.in_() (i.e. with no arguments) will return "CASE WHEN (<column> IS NULL) THEN NULL ELSE 0 END = 1)", so that NULL or False is returned in all cases, rather than throwing an error [ticket:545] Mike Bayer 2007-06-25 17:07:25 +00:00
  • 4cc6c4f4fc docstring cleanup, removal of some ORM cruft Mike Bayer 2007-06-25 03:47:29 +00:00
  • 0e209828b5 moved "clone" conditional blocks into separate copy_internals() method; was a conflation of tasks having them in the same place like that. Mike Bayer 2007-06-25 03:14:01 +00:00
  • 952c9e8f6d removed ConnectionProvider. engines have a "pool" attribute now. Mike Bayer 2007-06-24 20:58:08 +00:00
  • 11b0fdc1b6 merged trunk r2755-r2778 Mike Bayer 2007-06-24 20:09:54 +00:00
  • 3404bd8d82 - fixed limit/offset compilation for postgres Mike Bayer 2007-06-24 20:00:44 +00:00
  • 13ac46eb3f - merge of generative_sql branch - copy_container() removed. ClauseVisitor.traverse() now features "clone" flag which allows traversal with copy-and-modify-in-place behavior - select() objects copyable now [ticket:52] [ticket:569] - improved support for custom column_property() attributes which feature correlated subqueries...work better with eager loading now. - accept_visitor() methods removed. ClauseVisitor now genererates method names based on class names, or an optional __visit_name__ attribute. calls regular visit_XXX methods as they exist, can optionally call an additional "pre-descent" enter_XXX method to allow stack-based operations on traversals - select() and union()'s now have "generative" behavior. methods like order_by() and group_by() return a *new* instance - the original instance is left unchanged. non-generative methods remain as well. - the internals of select/union vastly simplified - all decision making regarding "is subquery" and "correlation" pushed to SQL generation phase. select() elements are now *never* mutated by their enclosing containers or by any dialect's compilation process Mike Bayer 2007-06-24 19:58:41 +00:00
  • f9dc30f239 added test for correlation of scalar subqueries to a JOIN object Mike Bayer 2007-06-24 18:46:02 +00:00
  • 7cfd3973ce - fixed "where"/"from" criterion of select() to accept a unicode string in addition to regular string - both convert to text() Mike Bayer 2007-06-23 18:47:28 +00:00
  • 909cf3fd5d - Added missing orm import Jason Kirtland 2007-06-22 21:10:30 +00:00
  • 1af29a42d2 - added dialect flag "auto_convert_lobs", defaults to True; will cause any LOB objects detected in a result set to be forced into OracleBinary so that the LOB is read() automatically, if no typemap was present (i.e., if a textual execute() was issued). Mike Bayer 2007-06-22 15:36:54 +00:00
  • 64e920cee8 - expanded assignment test, ensure that re-assigning the value of an association mutates the backing object (rather than a delete and create with new primary keys) Jason Kirtland 2007-06-21 21:01:04 +00:00
  • 3c1a7710f0 - added standalone distinct() function in addition to column.distinct() [ticket:558] Mike Bayer 2007-06-21 17:42:42 +00:00
  • a0f01fc86c - merged trunk r2730-r2755 - removed "clear_mapper()" method Mike Bayer 2007-06-20 22:53:03 +00:00
  • a1fe6e2c76 - forwards-compatibility with 0.4: added one(), first(), and all() to Query - added selectone_by() to assignmapper Mike Bayer 2007-06-20 22:28:54 +00:00
  • e846724192 update changelog Mike Bayer 2007-06-20 22:09:51 +00:00
  • 671d7fdadf added a unit test to test PK "collapsing" as in [changeset:2636], to help illustrate for [ticket:611] Mike Bayer 2007-06-20 21:59:38 +00:00
  • 58dbbab392 fixed overly eager check for ClauseElement type in filter() Mike Bayer 2007-06-20 21:24:34 +00:00
  • 6793bbd079 fixed outerjoin() to use correct start point Mike Bayer 2007-06-20 21:17:28 +00:00
  • 48ebb102ea - added synchronization to the mapper() construction step, to avoid thread collections when pre-existing mappers are compiling in a different thread [ticket:613] Mike Bayer 2007-06-20 21:08:10 +00:00
  • 33648e7176 - fixed very stupid bug when deleting items with many-to-many uselist=False relations Mike Bayer 2007-06-20 18:53:33 +00:00
  • 2e72d7e15f orig_set is a Set [ticket:614] Mike Bayer 2007-06-20 15:35:33 +00:00
  • 2e82f5de0c - finally figured out how to get setuptools version in, available as sqlalchemy.__version__ [ticket:428] Mike Bayer 2007-06-19 17:48:46 +00:00
  • 440701c82d - finally figured out how to get setuptools version in, available as sqlalchemy.__version__ [ticket:428] Mike Bayer 2007-06-19 17:46:57 +00:00
  • 6ba5ecb379 - added Interval type to types.py [ticket:595] Mike Bayer 2007-06-17 01:18:31 +00:00
  • 243ce000ec filter() checks for ClauseElement [ticket:535] Mike Bayer 2007-06-17 01:06:00 +00:00
  • 37762aad5c - merged last_inserted_ids() fix from trunk [changeset:2743] Mike Bayer 2007-06-17 00:57:06 +00:00
  • 909758df8e - result.last_inserted_ids() should return a list that is identically sized to the primary key constraint of the table. values that were "passively" created and not available via cursor.lastrowid will be None. - sqlite: string PK column inserts dont get overwritten with OID [ticket:603] Mike Bayer 2007-06-17 00:49:08 +00:00
  • 23525a3ea8 - datetime fixes: got subsecond TIMESTAMP to work [ticket:604], added OracleDate which supports types.Date with only year/month/day Mike Bayer 2007-06-17 00:13:31 +00:00
  • 93215f429d - sqlite better handles datetime/date/time objects mixed and matched with various Date/Time/DateTime columns Mike Bayer 2007-06-17 00:10:04 +00:00
  • d1e474ed74 test case for oracle timestamp adaption Mike Bayer 2007-06-16 23:36:19 +00:00
  • 6cd584d303 - Fixed typo blocking some assoc proxy dict assignments, added test Jason Kirtland 2007-06-16 22:04:13 +00:00
  • c19a707131 - Eh, dummy_threading trick didn't actually work for no-op'ing overflow. Works now, but less readable. - Shaped the script from ticket #608 into a test case Jason Kirtland 2007-06-16 18:46:23 +00:00
  • 3c9ed9f4bc - Put a mutex around the QueuePool's overflow handlings Jason Kirtland 2007-06-16 15:51:13 +00:00
  • 5b779d30c3 - Added testbase.Table and testbase.Column, interceptors that can set up test-run- and dialect-specific options on those objects All tests re-pointed to go through the interceptors - Removed mysql_engine= from table declarations, replaced with a general flag indicating storage requirements - Added ability to choose a global MySQL storage engine for all tests --mysql-engine=<whatever> If none is specified, tests use the old db-default/InnoDB behavior - Added ability to append arbitrary table creation params --table-option=KEY=VALUE For MySQL 3, use this to set mysql_type instead of --mysql-engine - Removed a couple dead test modules Jason Kirtland 2007-06-15 22:35:53 +00:00
  • 1fba10839c unit test fix Mike Bayer 2007-06-15 16:53:00 +00:00
  • 4b3af119f7 - added "explcit" create/drop/execute support for sequences (i.e. you can pass a "connectable" to each of those methods on Sequence) - checkfirst flag propigates for sequence creates/drops Mike Bayer 2007-06-15 16:51:25 +00:00
  • 47c3ce38aa - merged trunk 2629-2730 - fixes to is_select() which is now an important method - mysql unit tests fixes Mike Bayer 2007-06-14 18:37:20 +00:00
  • baba8281df - result sets from CRUD operations close their underlying cursor immediately. will also autoclose the connection if defined for the operation; this allows more efficient usage of connections for successive CRUD operations with less chance of "dangling connections". Mike Bayer 2007-06-14 18:17:05 +00:00
  • ca5480de91 fixed up really old tests to work without legacy engine syntax Mike Bayer 2007-06-14 04:14:19 +00:00
  • 84420a1d0f - Iteration over dict association proxies is now dict-like, not InstrumentedList-like (e.g. over keys instead of values). - Don't tightly bind proxies to source collections (fixes #597) - Handle slice objects on orderinglist's __setitem__ Jason Kirtland 2007-06-14 00:11:51 +00:00
  • 2c65ce7536 Multiple MSSQL fixes; see ticket #581 Paul Johnston 2007-06-13 18:53:16 +00:00
  • e4cd7b2ed4 - MySQL TEXT-derived types weren't respecting convert_unicode, fixes #601 - unicode type test now exercises Unicode() and Unicode(len) Jason Kirtland 2007-06-13 17:47:54 +00:00
  • e629fa9685 r/m psycopg1 support Jonathan Ellis 2007-06-12 20:44:13 +00:00
  • a95c6e3fa9 add explanation of prefab db connections Jonathan Ellis 2007-06-12 20:43:43 +00:00
  • a9da36da05 fix apparent typo Jonathan Ellis 2007-06-12 20:39:48 +00:00
  • 32310c713f merge 2684-2686 from trunk Jonathan Ellis 2007-06-12 20:22:57 +00:00
  • e1ae27d94f - Faster FOR UPDATE tests Jason Kirtland 2007-06-12 01:58:26 +00:00
  • 60bbb80202 - Added tests for SELECT ... FOR UPDATE - Added postgres support for FOR UPDATE NOWAIT via select(for_update='nowait') Jason Kirtland 2007-06-12 00:45:23 +00:00
  • 2a052cd593 - result.last_inserted_ids() should return a list that is identically sized to the primary key constraint of the table. values that were "passively" created and not available via cursor.lastrowid will be None. Mike Bayer 2007-06-11 22:39:03 +00:00
  • 6b293a78d3 - MetaData loses 'name' attribute - no more global_connect() Mike Bayer 2007-06-11 19:48:36 +00:00
  • ce2d1c7159 added separate test for metadata some cleanup to query.py unit test added settable "engine" property on MetaData Mike Bayer 2007-06-11 19:31:19 +00:00
  • cd358b8c9d - added "aliased joins" feature to query.filter_by() - further work on modernizing/cleaning up unit tests Mike Bayer 2007-06-10 23:53:03 +00:00
  • f17ba4c7be merged StaticPool implementation Mike Bayer 2007-06-09 21:44:36 +00:00
  • 86c9ffeea6 added StaticPool, stores just one connection. Mike Bayer 2007-06-09 20:59:59 +00:00
  • a337890d82 version number Mike Bayer 2007-06-09 17:50:24 +00:00
  • eb3ee48990 added test for testing against "outerjoin" Mike Bayer 2007-06-08 15:08:30 +00:00
  • 4302d162ae documented eager load fix Mike Bayer 2007-06-08 14:24:10 +00:00
  • 4215a5f200 - eager loader calls select_mapper so that poly rulesets get picked up - changed polymorph example to use a single set of outerjoins Mike Bayer 2007-06-08 03:17:11 +00:00
  • 561203f232 - added a third layer of inheritance to polymorph test - added some extra logic to mapper to try to convert a "foreign key" holding PK-col into a non-FK col - apparently, polymorphic loading can now be achieved with LEFT OUTER JOINs quite easily (i.e. no UNIONs). this needs to be studied further (i.e. why was I making everyone use UNION ALL all this time) Mike Bayer 2007-06-08 02:12:36 +00:00
  • bf8d8436ec extra test for corresponding column fix Mike Bayer 2007-06-07 03:02:03 +00:00
  • 5430c7177a - fixed bug where selectable.corresponding_column(selectable.c.col) would not return selectable.c.col, if the selectable is a join of a table and another join involving the same table. messed up ORM decision making [ticket:593] - removed is_natural_case function from ANSIIdentifierPreparer Mike Bayer 2007-06-06 23:39:25 +00:00
  • a74da6d21e - fixed bug where selectable.corresponding_column(selectable.c.col) would not return selectable.c.col, if the selectable is a join of a table and another join involving the same table. messed up ORM decision making [ticket:593] Mike Bayer 2007-06-06 23:37:18 +00:00
  • 72113780f3 Rick Morrison 2007-06-06 17:13:13 +00:00
  • 9b61ea39a8 - moved another chunk of mapper.py tests to query.py test suite - got all tests/extensions working with new APIs - axed proxyengine until further notice - SelectResults folds into a 10 line wrapper for Query, loses join_to() (use join()) - test cleanup Mike Bayer 2007-06-05 23:12:03 +00:00
  • 2290d9cd6d Query refactoring is complete. just needs filter_by([args], **kwargs) feature and it should then comply with the 0.4 spec Mike Bayer 2007-06-05 20:12:33 +00:00
  • f8d99d8118 - Rearrange placement of 'fields' (mysql 4.1 reserved word) so that it won't accidentally get lost Jason Kirtland 2007-06-05 19:31:42 +00:00
  • 58947cf025 - added 'fields' to reserved words [ticket:590] Mike Bayer 2007-06-05 19:20:08 +00:00
  • d761c24892 - added 'fields' to reserved words [ticket:590] Mike Bayer 2007-06-05 19:19:16 +00:00
  • 2e8903cf84 - long-identifier detection fixed to use > rather than >= for max ident length [ticket:589] - reformat changelog Mike Bayer 2007-06-05 19:16:35 +00:00
  • b35e93ecf4 - long-identifier detection fixed to use > rather than >= for max ident length [ticket:589] Mike Bayer 2007-06-05 19:14:13 +00:00
  • 0126f32b31 more paring down... Mike Bayer 2007-06-05 00:50:22 +00:00
  • 6abe864ceb refactoring step 2. all deprecated functions now express their functionality in terms of generative behavior. also the thing will run like crap right now until the next refactor stage...stay tuned Mike Bayer 2007-06-04 23:50:22 +00:00
  • 177483cd19 migrating all the "deprecated" methods away from the current methods. step two will be to change the deprecated methods to all express their functionality (primarily) in terms of the non-deprecated methods. Mike Bayer 2007-06-04 20:58:23 +00:00
  • 67cfc86b97 - added all(), first(), and one() - created new test framework for query. migrating old test/orm/mapper.py tests over to new query.py Mike Bayer 2007-06-04 18:14:59 +00:00
  • 7e4ca78574 join() will check existing objects in the FROM clause and not re-join to one which is already present Mike Bayer 2007-06-04 15:20:42 +00:00
  • 6163b363d0 - interfaces lib in docstrings - query.join() resets the joinpoint - added filter(), filter_by() to assignmapper Mike Bayer 2007-06-04 15:10:34 +00:00
  • cbc33de2fe pg test wasnt really working with that particular default..its a TODO rel_0_3_8 Mike Bayer 2007-06-02 20:33:15 +00:00
  • 51a2c7576a - added filter(), filter_by() to assignmapper Mike Bayer 2007-06-02 19:45:48 +00:00
  • aa32c6d6fd added reset_joinpoint() feature for query, interim until 0.4 Mike Bayer 2007-06-02 19:36:28 +00:00
  • d518d49d8e added interfaces package to orm Mike Bayer 2007-06-02 19:09:30 +00:00
  • 65f0edb949 - removed cascade_mappers(). long overdue. - removed sqlalchemy.orm from sqlalchemy.__init__ namespace. still needs updates in documentation, tutorial pages - moved MapperExtension to interfaces package - moved ExtensionCarrier to orm.util Mike Bayer 2007-06-02 19:06:13 +00:00
  • 96ee77cd09 fix running tests on Windows Jonathan Ellis 2007-06-01 04:55:17 +00:00