Commit Graph

  • b640456af1 Updated bit about coverage.py Jason Kirtland 2008-01-16 23:53:01 +00:00
  • 55c0ab5b2b - dynamic relations, when referenced, create a strong reference to the parent object so that the query still has a parent to call against even if the parent is only created (and otherwise dereferenced) within the scope of a single expression [ticket:938] Mike Bayer 2008-01-16 22:06:15 +00:00
  • 626e83dc28 - default the root logger level only if unset Jason Kirtland 2008-01-16 18:10:08 +00:00
  • 924b639215 maintain the ordering of the given collection of columns when reducing so that primary key collections remain ordered the same as in the mapped table Mike Bayer 2008-01-15 18:33:30 +00:00
  • 2c06e82557 avoid unnecessary mapper.extension copy Mike Bayer 2008-01-15 18:21:13 +00:00
  • 9eced72c03 finally, a really straightforward reduce() method which reduces cols to the minimal set for every test case I can come up with, and now replaces all the cruft in Mapper._compile_pks() as well as Join.__init_primary_key(). mappers can now handle aliased selects and figure out the correct PKs pretty well [ticket:933] Mike Bayer 2008-01-15 17:59:27 +00:00
  • 4870a41d27 - select_table mapper turns straight join into aliased select + custom PK, to allow joins onto select_table mappers - starting a generalized reduce_columns func Mike Bayer 2008-01-15 02:34:17 +00:00
  • 868a0584ba added more (failing) tests to query, will need to fix [ticket:932] [ticket:933] Mike Bayer 2008-01-14 18:50:10 +00:00
  • b2d1c5aa87 - query.join() can now accept class-mapped attributes as arguments, which can be used in place or in any combination with strings. In particular this allows construction of joins to subclasses on a polymorphic relation, i.e. query(Company).join(['employees', Engineer.name]), etc. Mike Bayer 2008-01-14 04:20:26 +00:00
  • 9e1a35ef3d - applying some refined versions of the ideas in the smarter_polymorphic branch - slowly moving Query towards a central "aliasing" paradigm which merges the aliasing of polymorphic mappers to aliasing against arbitrary select_from(), to the eventual goal of polymorphic mappers which can also eagerload other relations - supports many more join() scenarios involving polymorphic mappers in most configurations - PropertyAliasedClauses doesn't need "path", EagerLoader doesn't need to guess about "towrap" Mike Bayer 2008-01-14 02:45:30 +00:00
  • 188c2ac8e5 - _get_equivalents() converted into a lazy-initializing property; Query was calling it for polymorphic loads which is really expensive - surrogate_mapper adapts the given order_by, so that order_by can be against the mapped table and is usable for sub-mappers as well. Query properly calls select_mapper.order_by. Mike Bayer 2008-01-13 19:04:55 +00:00
  • 17d3c8764e - testbase is gone, replaced by testenv - Importing testenv has no side effects- explicit functions provide similar behavior to the old immediate behavior of testbase - testing.db has the configured db - Fixed up the perf/* scripts Jason Kirtland 2008-01-12 22:03:42 +00:00
  • c194962019 - Undeclared SAWarnings are now fatal to tests as well. - Fixed typo that was killing runs of individual named tests. Jason Kirtland 2008-01-12 04:52:05 +00:00
  • 05a693fcb7 fixed NOT ILIKE Mike Bayer 2008-01-11 21:30:02 +00:00
  • 6d2d5e923e - added "ilike()" operator to column operations. compiles to ILIKE on postgres, lower(x) LIKE lower(y) on all others [ticket:727] Mike Bayer 2008-01-11 21:24:01 +00:00
  • 664ba44679 Reverted to False Firebird's supports_sane_rowcount Slipped in: even if it seems it could be set to True, I'm still testing the rowcount affair Lele Gaifax 2008-01-11 15:31:15 +00:00
  • a19dc80cfb Try to reflect also the Sequence on the PK under Firebird Lele Gaifax 2008-01-11 15:27:02 +00:00
  • 8dd825b413 - Warnings are now issued as SAWarning instead of RuntimeWarning; util.warn() wraps this up. - SADeprecationWarning has moved to exceptions. An alias remains in logging until 0.5. Jason Kirtland 2008-01-11 01:28:43 +00:00
  • 3e9df22546 Include column name in length-less String warning (more [ticket:912]) Jason Kirtland 2008-01-10 23:16:56 +00:00
  • 04ad3303dc - unit test for r4048 Mike Bayer 2008-01-10 22:45:07 +00:00
  • f1cb136a62 - added a mapper() flag "eager_defaults"; when set to True, defaults that are generated during an INSERT or UPDATE operation are post-fetched immediately, instead of being deferred until later. This mimics the old 0.3 behavior. Mike Bayer 2008-01-10 22:32:51 +00:00
  • 062b8c0eb1 - added extra fk override test - proper error message is raised when trying to access expired instance attributes with no session present Mike Bayer 2008-01-10 18:05:20 +00:00
  • 37570dc25e Recognize another Firebird exception in dialect.is_disconnect() Lele Gaifax 2008-01-10 17:40:38 +00:00
  • 63662e37ca - finally added PGMacAddr type to postgres [ticket:580] Mike Bayer 2008-01-10 15:24:14 +00:00
  • fc537e41cb converted tests to use remote_side and foreign_keys. but...wow these are hard tests.. Mike Bayer 2008-01-10 06:51:51 +00:00
  • bf36c648f2 Reworked r4042- undeclared deprecation warnings are now *fatal* to tests. No surprises. Jason Kirtland 2008-01-10 02:37:39 +00:00
  • 84576e3258 test suite deprecation rampage Jason Kirtland 2008-01-09 22:54:51 +00:00
  • 046ec98a0b bump. Jason Kirtland 2008-01-09 22:53:33 +00:00
  • 0a860c6fb0 formatting, added UnicodeText rel_0_4_2p3 Mike Bayer 2008-01-09 21:37:42 +00:00
  • 912432179a Silenced deprecation warnings when testing deprecated extensions... Jason Kirtland 2008-01-09 20:41:14 +00:00
  • 4c705b6089 Added explicit length to more testing String columns. Jason Kirtland 2008-01-09 20:29:04 +00:00
  • 54f7111662 re-bump Jason Kirtland 2008-01-09 20:23:53 +00:00
  • c83bb94e0d Added UnicodeText alias Jason Kirtland 2008-01-09 20:22:41 +00:00
  • 979c9323dc - fixed bug with session.dirty when using "mutable scalars" (such as PickleTypes) Mike Bayer 2008-01-09 18:52:35 +00:00
  • eefd1f78a2 redid the _for_ddl String/Text deprecation warning correctly [ticket:912] Mike Bayer 2008-01-09 18:09:49 +00:00
  • 6eb9c11e7b - fixed bug in union() so that select() statements which don't derive from FromClause objects can be unioned Mike Bayer 2008-01-08 21:53:37 +00:00
  • 93d6f1d58a - Text type is properly exported now and does not raise a warning on DDL create Mike Bayer 2008-01-08 08:55:18 +00:00
  • c111f6f93d Fixed reflection of mysql empty string column defaults. Jason Kirtland 2008-01-08 07:46:37 +00:00
  • 2fc1bf2615 bump Mike Bayer 2008-01-07 20:13:29 +00:00
  • 500982b7b3 logged [ticket:923] fix rel_0_4_2b Mike Bayer 2008-01-07 19:59:23 +00:00
  • 46720f0bbc Fix for ticket [923] Rick Morrison 2008-01-07 19:33:29 +00:00
  • e8feacf1db - fixed an attribute history bug whereby assigning a new collection to a collection-based attribute which already had pending changes would generate incorrect history [ticket:922] Mike Bayer 2008-01-07 18:52:02 +00:00
  • acd13f99f1 - suppressing *all* errors in InstanceState.__cleanup() now. Mike Bayer 2008-01-06 20:41:48 +00:00
  • d879135085 - fixed bug which could occur with polymorphic "union" mapper which falls back to "deferred" loading of inheriting tables Mike Bayer 2008-01-06 20:32:45 +00:00
  • a78914942c - synonyms can now be created against props that don't exist yet, which are later added via add_property(). This commonly includes backrefs. (i.e. you can make synonyms for backrefs without worrying about the order of operations) [ticket:919] Mike Bayer 2008-01-05 23:27:02 +00:00
  • 8fe38c7e95 - changed name of TEXT to Text since its a "generic" type; TEXT name is deprecated until 0.5. The "upgrading" behavior of String to Text when no length is present is also deprecated until 0.5; will issue a warning when used for CREATE TABLE statements (String with no length for SQL expression purposes is still fine) [ticket:912] Mike Bayer 2008-01-05 22:59:18 +00:00
  • 68a9e6cb1f Added 'function_call_count' assertion decorator. The full-suite vs. isolated run call count discrepancy needs to be ironed out before this can be applied to zoomark. Jason Kirtland 2008-01-05 21:56:22 +00:00
  • 40efd3a9c1 Updates Jason Kirtland 2008-01-05 21:46:08 +00:00
  • 35f7a0b594 Added lots o' info. Jason Kirtland 2008-01-05 20:50:10 +00:00
  • 2bc1c28c44 More overloads: fix cascades for += on a list relation, added operator support to association proxied lists. Jason Kirtland 2008-01-05 19:11:58 +00:00
  • f9fd5bfb86 bump. Jason Kirtland 2008-01-05 18:42:46 +00:00
  • 829e9f8a91 calling this 0.4.2a rel_0_4_2a Mike Bayer 2008-01-05 18:27:12 +00:00
  • e5b6c7bc33 - fixed fairly critical bug whereby the same instance could be listed more than once in the unitofwork.new collection; most typically reproduced when using a combination of inheriting mappers and ScopedSession.mapper, as the multiple __init__ calls per instance could save() the object with distinct _state objects Mike Bayer 2008-01-05 18:26:28 +00:00
  • 9123a1d5ce Experimental: modestly more informative repr() for some expressions (using .description) Jason Kirtland 2008-01-05 00:37:08 +00:00
  • 5e12394aac Migrated a few in-function 'from x import y' to the 'global x; if x is None' style. Jason Kirtland 2008-01-05 00:25:57 +00:00
  • 38bcc2b2f8 Refined bulk-assignment aspects of the r3999 in-place collection operator fix. Also? r4000! Jason Kirtland 2008-01-04 20:40:22 +00:00
  • a230391a37 Fixed in-place set mutation operator support [ticket:920] Jason Kirtland 2008-01-04 20:17:42 +00:00
  • 0c515c5117 Added REPLACE statements to mysql autocommit list. Jason Kirtland 2008-01-04 19:10:18 +00:00
  • 57a5b5f58e func unittest fix Mike Bayer 2008-01-04 03:13:20 +00:00
  • 64de56e55e fix select tests for labeled functions Mike Bayer 2008-01-04 03:09:17 +00:00
  • 1e69e26924 add anonymous labels to function calls Mike Bayer 2008-01-04 01:00:42 +00:00
  • efb89f2113 fix not calling the result processor of PGArray subtypes. (a rather embarrasing copypaste error) [ticket:913] Ants Aasma 2008-01-03 23:38:55 +00:00
  • ebe83b95ad - added very rudimentary yielding iterator behavior to Query. Call query.yield_per(<number of rows>) and evaluate the Query in an iterative context; every collection of N rows will be packaged up and yielded. Use this method with extreme caution since it does not attempt to reconcile eagerly loaded collections across result batch boundaries, nor will it behave nicely if the same instance occurs in more than one batch. This means that an eagerly loaded collection will get cleared out if it's referenced in more than one batch, and in all cases attributes will be overwritten on instances that occur in more than one batch. Mike Bayer 2008-01-02 23:13:02 +00:00
  • e12075efa8 fix weakref issue seen on one buildbot test rel_0_4_2 Mike Bayer 2008-01-02 01:34:25 +00:00
  • a8b62a02dd - further fix to new TypeDecorator, so that subclasses of TypeDecorators work properly - _handle_dbapi_exception() usage changed so that unwrapped exceptions can be rethrown with the original stack trace Mike Bayer 2008-01-02 01:29:38 +00:00
  • 02a4176a65 happy new year Mike Bayer 2008-01-01 17:42:17 +00:00
  • 226a95cb4f fix to new TypeDecorator Mike Bayer 2008-01-01 01:47:58 +00:00
  • 65c618534f fix up oracle handling of LOB/string [ticket:902], slight fixes to defaults.py but we will need to fix up result-type handling some more Mike Bayer 2008-01-01 00:43:24 +00:00
  • 85ab0501f4 filter() criterion takes mapper equivalent_columns into account when it adapts to select_table. more to come in [ticket:917] . Mike Bayer 2007-12-31 10:23:21 +00:00
  • 7cc356a701 remove "is None" from boolean tests Mike Bayer 2007-12-29 20:52:50 +00:00
  • c933619a0d limit scope of try/except Mike Bayer 2007-12-29 20:50:32 +00:00
  • 3689897d0d use long for query runid counter Mike Bayer 2007-12-29 20:46:07 +00:00
  • 57201ca878 - added is_disconnect() support for oracle - fixed _handle_dbapi_error to detect endless loops, doesn't call rollback/cursor.close etc. in case of disconnect Mike Bayer 2007-12-29 20:13:50 +00:00
  • a582fe3b26 - mapped classes which extend "object" and do not provide an __init__() method will now raise TypeError if non-empty *args or **kwargs are present at instance construction time (and are not consumed by any extensions such as the scoped_session mapper), consistent with the behavior of normal Python classes [ticket:908] Mike Bayer 2007-12-29 19:20:38 +00:00
  • 90d38c7407 - fixed Query bug when filter_by() compares a relation against None [ticket:899] Mike Bayer 2007-12-29 18:50:46 +00:00
  • dc94cb7b10 - MapperExtension.before_update() and after_update() are now called symmetrically; previously, an instance that had no modified column attributes (but had a relation() modification) could be called with before_update() but not after_update() [ticket:907] Mike Bayer 2007-12-29 18:33:27 +00:00
  • b528d58d49 - fixed session.refresh() with instance that has custom entity_name [ticket:914] Mike Bayer 2007-12-29 18:22:21 +00:00
  • 0875860acd some rudimentary fixes to get instance-level deferreds/lazy loads to transfer over on merge() Mike Bayer 2007-12-21 21:55:20 +00:00
  • 1a9f98f4f6 cruft ! who knew Mike Bayer 2007-12-21 16:58:18 +00:00
  • 75d7d8d510 added assertion for expiry's current inability to detect a PK switch in the DB Mike Bayer 2007-12-21 16:44:12 +00:00
  • 90c3944dac - disabled the "populate expired/deferred attributes as we come across them" functionality in mapper._instance(), as its not completed, doesn't properly handle mutable scalar attributes, and has poor test coverage Mike Bayer 2007-12-21 16:20:46 +00:00
  • b9dd765d92 mass load wont overwrite modified expired attributes Mike Bayer 2007-12-21 07:26:39 +00:00
  • 2eea612f52 broke up various class-level mapper/instance fanfare into class_level_loader; load-time setup_loader just returns a loader object with no checks Mike Bayer 2007-12-21 07:10:14 +00:00
  • c114f096bd - reworked all lazy/deferred/expired callables to be serializable class instances, added pickling tests - cleaned up "deferred" polymorphic system so that the mapper handles it entirely - columns which are missing from a Query's select statement now get automatically deferred during load. Mike Bayer 2007-12-21 06:57:20 +00:00
  • 2db36bf59c - inheriting mappers now inherit the MapperExtensions of their parent mapper directly, so that all methods for a particular MapperExtension are called for subclasses as well. As always, any MapperExtension can return either EXT_CONTINUE to continue extension processing or EXT_STOP to stop processing. The order of mapper resolution is: <extensions declared on the classes mapper> <extensions declared on the classes' parent mapper> <globally declared extensions>. Mike Bayer 2007-12-20 02:37:48 +00:00
  • 267523e4da - sqlite SLDate type will not erroneously render "microseconds" portion of a datetime or time object when sent to the DB. Mike Bayer 2007-12-20 01:45:36 +00:00
  • a9c7e6f774 forgot CHANGES Rick Morrison 2007-12-19 23:15:25 +00:00
  • 116e19f7f0 Fix for autoload of non-identity PK integer columns [824] Better datetime checking/conversion for pyodbc adodbapi [842] Fix for autoloading schema-qualified tables [901] Convert_unicode support for all dialects [839] Rick Morrison 2007-12-19 23:04:43 +00:00
  • 501447ada3 - Re-raise SystemExit et al in _ConnectionRecord.close - Little code cleanup- decreased verbosity of string formatting. Jason Kirtland 2007-12-19 20:36:37 +00:00
  • b9b0aca757 - auto-reconnect support improved; a Connection can now automatically reconnect after its underlying connection is invalidated, without needing to connect() again from the engine. This allows an ORM session bound to a single Connection to not need a reconnect. Open transactions on the Connection must be rolled back after an invalidation of the underlying connection else an error is raised. Also fixed bug where disconnect detect was not being called for cursor(), rollback(), or commit(). Mike Bayer 2007-12-19 19:51:46 +00:00
  • e7f30cba78 Fix the unpacking of the refered table name under Firebird This fixes a little glitch introduced in [3959], in case of "implicit FKs" (that is, {{{ForeignKey("orders")}}}, where the field(s) is missing). Lele Gaifax 2007-12-19 08:03:57 +00:00
  • ba0267a955 introductory docstring bonanza Mike Bayer 2007-12-18 23:53:40 +00:00
  • 1dc4546aa9 Apply default cascade rules for firebird self-ref ForeignKeys. Jason Kirtland 2007-12-18 19:37:03 +00:00
  • b5908484b1 a little pre-lunch decrufting and cleanup Mike Bayer 2007-12-18 19:32:03 +00:00
  • fee8fe3391 Use an explicit ordering in the query Lele Gaifax 2007-12-18 13:06:24 +00:00
  • 7c1e57879d Add Firebird to the list of DBs that needs explicit sequences Lele Gaifax 2007-12-18 13:03:55 +00:00
  • df68f30777 get most oracle tests in sql working again.... Mike Bayer 2007-12-18 06:13:42 +00:00
  • faf4aca165 - cleanup; lambdas removed from properties; properties mirror same-named functions (more like eventual decorator syntax); remove some old methods, factor out some "raiseerr" ugliness to outer lying functions. - corresponding_column() integrates "require_embedded" flag with other set arithmetic Mike Bayer 2007-12-18 05:40:06 +00:00
  • f6068a3522 - select().as_scalar() will raise an exception if the select does not have exactly one expression in its columns clause. - added "helper exception" to select.type access, generic functions raise the chance of this happening - a slight behavioral change to attributes is, del'ing an attribute does *not* cause the lazyloader of that attribute to fire off again; the "del" makes the effective value of the attribute "None". To re-trigger the "loader" for an attribute, use session.expire(instance, [attrname]). - fix ormtutorial for IS NULL Mike Bayer 2007-12-18 00:24:03 +00:00
  • 420c098d56 fixed del history Mike Bayer 2007-12-16 20:32:56 +00:00