Mike Bayer [Thu, 18 Jan 2007 03:33:13 +0000 (03:33 +0000)]
- some deeper error checking when compiling relations, to detect an ambiguous "primaryjoin"
in the case that both sides of the relationship have foreign key references in the primary
join condition
Mike Bayer [Mon, 15 Jan 2007 21:54:16 +0000 (21:54 +0000)]
- added optional constructor to sql.ColumnCollection
- mapper sets its "primary_key" attribute to be the ultimately decided primary_key column collection post-compilation
- added compare() method to MapperProperty, defines a comparison operation of the columns represented by the property to some value
- all the above combines into today's controversial feature: saying query.select_by(somerelationname=someinstance) will create the join of the primary key columns represented by "somerelationname"'s mapper to the actual primary key in "someinstance".
- docs for the above
Mike Bayer [Sun, 14 Jan 2007 20:21:36 +0000 (20:21 +0000)]
- postgres cursor option is now server_side_cursors=False; some users get bad results using them
so theyre off by default
- type system slightly modified to support TypeDecorators that can be overridden by the dialect
- added an NVarchar type to mssql (produces NVARCHAR), also MSUnicode which provides Unicode-translation
for the NVarchar regardless of dialect convert_unicode setting.
Mike Bayer [Fri, 12 Jan 2007 01:57:41 +0000 (01:57 +0000)]
- mysql is inconsistent with what kinds of quotes it uses in foreign keys during a
SHOW CREATE TABLE, reflection updated to accomodate for all three styles [ticket:420]
Mike Bayer [Wed, 10 Jan 2007 07:49:37 +0000 (07:49 +0000)]
- postgres no longer uses client-side cursors, uses more efficient server side
cursors via apparently undocumented psycopg2 behavior recently discovered on the
mailing list. disable it via create_engine('postgres://', client_side_cursors=True)
Mike Bayer [Mon, 8 Jan 2007 19:09:02 +0000 (19:09 +0000)]
- the "op()" function is now treated as an "operation", rather than a "comparison".
the difference is, an operation produces a BinaryExpression from which further operations
can occur whereas comparison produces the more restrictive BooleanExpression
Mike Bayer [Sat, 6 Jan 2007 20:32:47 +0000 (20:32 +0000)]
- added a mutex to the mapper compilation step. ive been reluctant to add any kind
of threading anything to SA but this is one spot that its its really needed since mappers
are typically "global", and while their state does not change during normal operation, the
initial compilation step does modify internal state significantly, and this step usually
occurs not at module-level initialization time (unless you call compile()) but at first-request
time
- added "compile_mappers()" function as a shortcut to compiling all mappers
Mike Bayer [Fri, 5 Jan 2007 18:51:23 +0000 (18:51 +0000)]
- default "timezone" setting is now False. this corresponds to Python's datetime
behavior as well as Postgres' timestamp/time types (which is the only timezone-sensitive
dialect at the moment) [ticket:414]
Mike Bayer [Tue, 2 Jan 2007 03:43:09 +0000 (03:43 +0000)]
- added "none" to the list of cascades, although im not sure if we should really allow "none" since it currently doesnt do anything (what should it do, cancel out the other cascades?)
Mike Bayer [Mon, 1 Jan 2007 00:10:37 +0000 (00:10 +0000)]
- global "insure"->"ensure" change. in US english "insure" is actually
largely interchangeable with "ensure" (so says the dictionary), so I'm not
completely illiterate, but its definitely sub-optimal to "ensure" which is
non-ambiguous.
Mike Bayer [Thu, 28 Dec 2006 00:27:58 +0000 (00:27 +0000)]
- fix to correlation of subqueries when the column list of the select statement
is constructed with individual calls to append_column(); this fixes an ORM
bug whereby nested select statements were not getting correlated with the
main select generated by the Query object.
Mike Bayer [Tue, 12 Dec 2006 19:22:28 +0000 (19:22 +0000)]
- fixes to passive_deletes flag, lazy=None (noload) flag
- added example/docs for dealing with large collections
- added object_session() method to sqlalchemy namespace
Mike Bayer [Sat, 9 Dec 2006 04:00:35 +0000 (04:00 +0000)]
- added onupdate and ondelete keyword arguments to ForeignKey; propigate
to underlying ForeignKeyConstraint if present. (dont propigate in the
other direction, however)
- patched attribute speed enhancement [ticket:389] courtesy Sébastien Lelong
Mike Bayer [Sat, 9 Dec 2006 01:08:25 +0000 (01:08 +0000)]
- identity map in Session is by default *no longer weak referencing*.
to have it be weak referencing, use create_session(weak_identity_map=True)
- some fixes to OrderedProperties
Mike Bayer [Tue, 5 Dec 2006 03:16:35 +0000 (03:16 +0000)]
made backrefs aware of "post_update" and "viewonly" so it doesnt have to be explicitly propigated; also backrefs shouldnt fire off in a post_update situation.
Mike Bayer [Sat, 2 Dec 2006 05:59:50 +0000 (05:59 +0000)]
- added "remote_side" argument to relation(), used only with self-referential
mappers to force the direction of the parent/child relationship. replaces
the usage of the "foreignkey" parameter for "switching" the direction;
while "foreignkey" can still be used to "switch" the direction of a parent/
child relationship, this usage is deprecated; "foreignkey" should always
indicate the actual foreign key columns from now on.
Mike Bayer [Wed, 29 Nov 2006 22:13:58 +0000 (22:13 +0000)]
- sending a selectable to an IN no longer creates a "union" out of multiple
selects; only one selectable to an IN is allowed now (make a union yourself
if union is needed; explicit better than implicit, dont guess, etc.)
Mike Bayer [Sun, 26 Nov 2006 02:36:27 +0000 (02:36 +0000)]
- made kwargs parsing to Table strict; removed various obsoluete "redefine=True" kw's from the unit tests
- documented instance variables in ANSICompiler
- fixed [ticket:120], adds "inline_params" set to ANSICompiler which DefaultDialect picks up on when
determining defaults. added unittests to query.py
- additionally fixed up the behavior of the "values" parameter on _Insert/_Update
- more cleanup to sql/Select - more succinct organization of FROM clauses, removed silly _process_from_dict
methods and JoinMarker object
Mike Bayer [Sat, 25 Nov 2006 21:32:26 +0000 (21:32 +0000)]
- cleanup on some instance vars in Select (is_scalar, is_subquery, _froms is __froms, removed unused 'nowait', '_text', etc)
- cleaned up __repr__ on Column, AbstractTypeEngine
- added standalone intersect(_all), except(_all) functions, unit tests illustrating nesting patterns [ticket:247]