Mike Bayer [Thu, 22 Feb 2007 22:59:51 +0000 (22:59 +0000)]
- a full select() construct can be passed to query.select() (which
worked anyway), but also query.selectfirst(), query.selectone() which
will be used as is (i.e. no query is compiled). works similarly to
sending the results to instances().
Mike Bayer [Wed, 21 Feb 2007 21:55:45 +0000 (21:55 +0000)]
- removed deprecated method of specifying custom collections on classes;
you must now use the "collection_class" option. the old way was
beginning to produce conflicts when people used assign_mapper(), which
now patches an "options" method, in conjunction with a relationship
named "options". (relationships take precedence over monkeypatched
assign_mapper methods).
Mike Bayer [Tue, 20 Feb 2007 18:01:16 +0000 (18:01 +0000)]
fix to the fix for [ticket:454], prevent other mappers in a load operation from using the main extension option send to the query (i.e. mappers used for eager loads etc).
Mike Bayer [Tue, 20 Feb 2007 01:04:07 +0000 (01:04 +0000)]
- added "alias" argument to contains_eager(). use it to specify the string name
or Alias instance of an alias used in the query for the eagerly loaded child items.
easier to use than "decorator"
Mike Bayer [Tue, 20 Feb 2007 00:09:37 +0000 (00:09 +0000)]
- moved SynonymProperty to interfaces, since its more generalized and synonym-aware operations
take place without knowning so much about properties
- mapper options like eagerload(), lazyload(), deferred(), will work for "synonym()" relationships [ticket:485]
Rick Morrison [Sun, 18 Feb 2007 19:43:05 +0000 (19:43 +0000)]
Completed previously missed patches from tickets 422 and 415
get unit tests to work with pyodbc [ticket:481]
fix blank password on adodbapi [ticket:371]
Mike Bayer [Sat, 17 Feb 2007 23:40:31 +0000 (23:40 +0000)]
- modified patch for [ticket:379] - detecting synonyms, dblinks in reflection. test passes
except for DBLINK which I cannot get to work on my oracle-xe database.
- probable (also untested) fix for [ticket:363], better error message if we get None back for
remote table information (which is due to rights)
Mike Bayer [Sat, 17 Feb 2007 02:31:56 +0000 (02:31 +0000)]
- added a Sequence to the unicode test tables to help Oracle
- fixed named PrimaryKeyConstraint generation on oracle [ticket:466] courtesy andrija at gmail
Mike Bayer [Sat, 17 Feb 2007 01:18:54 +0000 (01:18 +0000)]
- fixed oracle list of binary types to check for their presence in the module (such as BFILE not in all versions of cx_Oracle)
- removed oracle-handicap from binary unit test to test [ticket:435] fix, added an extra row containing None
Mike Bayer [Thu, 15 Feb 2007 02:07:06 +0000 (02:07 +0000)]
- some cleanup to the unitofwork test suite (needs much more)
- fixed relationship deletion error when one-to-many child item is moved to a new
parent in a single unit of work [ticket:478]
Mike Bayer [Wed, 14 Feb 2007 02:00:49 +0000 (02:00 +0000)]
- fixed relationship deletion error where parent/child with a single column as PK/FK
on the child would raise a "blank out the primary key" error, if manually deleted
or "delete" cascade without "delete-orphan" was used
Mike Bayer [Tue, 13 Feb 2007 22:53:05 +0000 (22:53 +0000)]
- fixed argument passing to straight textual execute() on engine, connection.
can handle *args or a list instance for positional, **kwargs or a dict instance
for named args, or a list of list or dicts to invoke executemany()
Mike Bayer [Sat, 10 Feb 2007 23:39:06 +0000 (23:39 +0000)]
- implemented foreign_keys argument on relation() [ticket:385]
- PropertyLoader figures out accurate remote_side collection based
on foreign_keys, legacy foreignkey, primary/secondaryjoin/polymorphic
- reworked lazyloader, sync to work straight off foreign_keys/
remote_side collections
Mike Bayer [Tue, 6 Feb 2007 19:22:44 +0000 (19:22 +0000)]
- fixed "remote_side" in testrelationonbaseclass [ticket:461]
- added --reversetop arg to testbase to allow reversing the input collection
for topological sorts, to better reveal dependency issues
Mike Bayer [Sun, 4 Feb 2007 23:45:45 +0000 (23:45 +0000)]
- added "schema" argument to all has_table() calls, only supported so far by PG
- added basic unit test for PG reflection of tables in an alternate schema
Mike Bayer [Sun, 4 Feb 2007 03:43:22 +0000 (03:43 +0000)]
- added literal_column() to specify a column clause that should not undergo any quoting
- straight text sent to select() added as literal_column
- fix for issue in [ticket:450]
Mike Bayer [Sun, 4 Feb 2007 03:12:27 +0000 (03:12 +0000)]
- more quoting fixes for [ticket:450]...quoting more aggressive (but still skips already-quoted literals)
- got mysql to have "format" as default paramstyle even if mysql module not available, allows unit tests
to pass in non-mysql system for [ticket:457]. all the dialects should be changed to pass in their usual
paramstyle.
Mike Bayer [Fri, 2 Feb 2007 18:18:31 +0000 (18:18 +0000)]
- added a "supports_execution()" method to ClauseElement, so that individual
kinds of clauses can express if they are appropriate for executing...such as,
you can execute a "select", but not a "Table" or a "Join".
Mike Bayer [Thu, 1 Feb 2007 21:38:16 +0000 (21:38 +0000)]
- clear_mappers() just blows away all of ArgSingleton for now
- lazy clause goes against parent.mapped_table instead of parent.local_table,
helps it to recognize self-referential condition between a descendant joined-table-inheritance mapper
Mike Bayer [Thu, 1 Feb 2007 03:18:08 +0000 (03:18 +0000)]
- the "polymorphic_primaryjoin" again goes against the parent's non-polymorphic local table.
lazy load clause evaluation is plenty solid enough to handle it this time.
- the join_to() method on PropertyLoader takes the parent mapper as an argument and alisiazes
the primaryjoin against that mapper's selectable, so that the same primary join can be used against
the base mapper, any inheriting mapper, etc., whether or not it uses a polymorphic union (although
needs to be tested against alternate polymorphic unions added on subclasses). fixes [ticket:448]
Mike Bayer [Thu, 1 Feb 2007 01:47:54 +0000 (01:47 +0000)]
- improved support for complex queries embedded into "where" criterion
for query.select() [ticket:449]
- contains_eager('foo') automatically implies eagerload('foo')
- query.options() can take a combiantion MapperOptions and tuples of MapperOptions,
so that functions can return groups
- refactoring to Aliasizer and ClauseAdapter so that they share a common base methodology,
which addresses all sql.ColumnElements instead of just schema.Column. common list-processing
methods added.
- query.compile and eagerloader._aliasize_orderby make usage of improved list processing on
above.
- query.compile, within the "nested select generate" step processes the order_by clause using
the ClauseAdapter instead of Aliasizer since there is only one "target"
Mike Bayer [Tue, 30 Jan 2007 01:01:22 +0000 (01:01 +0000)]
further work on insuring clear_mappers() really works. assignmapper identified
as a much trickier thing to clean out. added a unit test so that if any new collections get introduced
we are still testing.
Mike Bayer [Sun, 28 Jan 2007 23:33:53 +0000 (23:33 +0000)]
merged the polymorphic relationship refactoring branch in. i want to go further on that branch and introduce the foreign_keys argument, and further centralize the "intelligence" about the joins and selectables into PropertyLoader so that lazyloader/sync can be simplified, but the current branch goes pretty far.
- relations keep track of "polymorphic_primaryjoin", "polymorphic_secondaryjoin" which it derives from the plain primaryjoin/secondaryjoin.
- lazy/eagerloaders work from those polymorphic join objects.
- the join exported by PropertyLoader to Query/SelectResults is the polymorphic join, so that join_to/etc work properly.
- Query builds itself against the base Mapper again, not the "polymorphic" mapper. uses the "polymorphic" version
only as appropriate. this helps join_by/join_to/etc to work with polymorphic mappers.
- Query will also adapt incoming WHERE criterion to the polymorphic mapper, i.e. the "people" table becomes the "person_join" automatically.
- quoting has been modified since labels made out of non-case-sensitive columns could themselves require quoting..so case_sensitive defaults to True if not otherwise specified (used to be based on the identifier itself).
- the test harness gets an ORMTest base class and a bunch of the ORM unit tests are using it now, decreases a lot of redundancy.
Mike Bayer [Wed, 24 Jan 2007 23:37:03 +0000 (23:37 +0000)]
- calling corresponding_column with keys_ok matches columns on name, not key, since
the name is meaningful with regards to SQL relationships, the key is not
- adjustments to the recent polymorphic relationship refactorings, specifically
for many-to-one relationships to polymorphic unions that did not contain the
base table [ticket:439]. the lazy/eager clause adaption to the selectable
will match up on straight column names (i.e. its a more liberal policy)
- lazy loader will not attempt to adapt the clause to the selectable if
loads_polymorphic is not enabled, since the more liberal policy of adapting
columns fails for more elaborate join conditions
- will have to see if ppl want to do complex joins with polymorphic relations...
may have to add "polymorphic_primaryjoin" in that case as a last resort (would make
working around these issues a snap, tho...)