Mike Bayer [Fri, 26 Mar 2010 19:16:00 +0000 (15:16 -0400)]
- Using @classdecorator and similar on mixins to define
__tablename__, __table_args__, etc. now works if
the method references attributes on the ultimate
subclass. [ticket:1749]
Mike Bayer [Fri, 26 Mar 2010 16:03:54 +0000 (12:03 -0400)]
- the TIME and TIMESTAMP types are now availble from the
postgresql dialect directly, which add the PG-specific
argument 'precision' to both. 'precision' and
'timezone' are correctly reflected for both TIME and
TIMEZONE types. [ticket:997]
Mike Bayer [Thu, 25 Mar 2010 22:26:11 +0000 (22:26 +0000)]
- The Oracle dialect will issue VARCHAR type definitions
using character counts, i.e. VARCHAR2(50 CHAR), so that
the column is sized in terms of characters and not bytes.
Column reflection of character types will also use
ALL_TAB_COLUMNS.CHAR_LENGTH instead of
ALL_TAB_COLUMNS.DATA_LENGTH. Both of these behaviors take
effect when the server version is 9 or higher - for
version 8, the old behaviors are used. [ticket:1744]
Mike Bayer [Wed, 24 Mar 2010 23:19:03 +0000 (19:19 -0400)]
- converted all lazy=True|False|None to 'select'|'joined'|'noload'
- converted all eager to joined in examples
- fixed beaker/advanced.py to reference RelationshipCache
Mike Bayer [Wed, 24 Mar 2010 23:11:01 +0000 (19:11 -0400)]
- To accomodate the fact that there are now two kinds of eager
loading available, the new names for eagerload() and
eagerload_all() are joinedload() and joinedload_all(). The
old names will remain as synonyms for the foreseeable future.
- The "lazy" flag on the relationship() function now accepts
a string argument for all kinds of loading: "select", "joined",
"subquery", "noload" and "dynamic", where the default is now
"select". The old values of True/
False/None still retain their usual meanings and will remain
as synonyms for the foreseeable future.
- Added documentation to tutorial,mapper doc, api docs
for subqueryload, subqueryload_all, and other options.
Mike Bayer [Wed, 24 Mar 2010 21:54:52 +0000 (17:54 -0400)]
- made final refinements to the feature and we are 100% go on subquery loading.
- Query.join(Cls.propname, from_joinpoint=True) will check more
carefully that "Cls" is compatible with the current joinpoint,
and act the same way as Query.join("propname", from_joinpoint=True)
in that regard.
Mike Bayer [Wed, 24 Mar 2010 16:46:58 +0000 (12:46 -0400)]
this version works with *all* the polymorphic scenarios by putting the subquery into
an aliased(), so that it can be controlled. self ref breaks now. will move the
joining out to use orm.join().
Mike Bayer [Tue, 23 Mar 2010 18:54:26 +0000 (14:54 -0400)]
- Fixed bug in Query whereby the usage of aliased() constructs
would fail if the underlying table (but not the actual alias)
were referenced inside the subquery generated by
q.from_self() or q.select_from().
Mike Bayer [Tue, 23 Mar 2010 00:15:50 +0000 (20:15 -0400)]
- Fixed bug which affected all eagerload() and similar options
such that "remote" eager loads, i.e. eagerloads off of a lazy
load such as query(A).options(eagerload(A.b, B.c))
wouldn't eagerload anything, but using eagerload("b.c") would
work fine.
- subquery eagerloading very close
Mike Bayer [Mon, 22 Mar 2010 17:16:21 +0000 (13:16 -0400)]
- Fixed bug in Query whereby calling q.join(prop).from_self(...).
join(prop) would fail to render the second join outside the
subquery, when joining on the same criterion as was on the
inside.
Brad Allen [Sun, 21 Mar 2010 04:00:51 +0000 (22:00 -0600)]
For cases when mxODBC's cursor.execute can't do the job, raise a warning and fall back on cursor.executedirect which is less picky. This causes a drastic improvement in passing tests.
Mike Bayer [Sat, 20 Mar 2010 01:12:29 +0000 (21:12 -0400)]
- Fixed bug whereby calling query(A).join(A.bs).add_entity(B)
in a joined inheritance scenario would double-add B as a
target and produce an invalid query. [ticket:1188]
Mike Bayer [Fri, 19 Mar 2010 21:51:50 +0000 (17:51 -0400)]
- StaticPool now initializes, disposes and recreates without
opening a new connection - the connection is only opened when
first requested. dispose() also works on AssertionPool now.
[ticket:1728]
Mike Bayer [Fri, 19 Mar 2010 19:30:48 +0000 (15:30 -0400)]
- join() will now simulate a NATURAL JOIN by default. Meaning,
if the left side is a join, it will attempt to join the right
side to the rightmost side of the left first, and not raise
any exceptions about ambiguous join conditions if successful
even if there are further join targets across the rest of
the left. [ticket:1714]
Mike Bayer [Fri, 19 Mar 2010 17:10:13 +0000 (13:10 -0400)]
- added "lockmode" kw argument to Session.refresh(), will
pass through the string value to Query the same as
in with_lockmode(), will also do version check for a
version_id_col-enabled mapping.
Mike Bayer [Fri, 19 Mar 2010 15:45:42 +0000 (11:45 -0400)]
distinguish between small, large, and many significant digits. the irony
that oracle and sybase are the ones that have the most issues with decimal numbers.
Mike Bayer [Fri, 19 Mar 2010 15:17:14 +0000 (11:17 -0400)]
switching Decimal treatment in MSSQL to be pyodbc specific, added
to connector to share between sybase/mssql. Going
with turning decimals with very low significant digit to floats,
seems to work so far.
Brad Allen [Thu, 18 Mar 2010 20:05:59 +0000 (14:05 -0600)]
Removed MxNumeric and MxFloat because now the sqlalchemy.types base classes support dialects having a class attribute of "supports_native_decimal" indicating native Python Demimal support. Adjusted mssql+mxodbc to use the sqlalchemy.types base classes for Float and Numeric instead of using the base mssql dialect's numeric types.
Brad Allen [Thu, 18 Mar 2010 17:47:45 +0000 (11:47 -0600)]
Hardcoded ident_seed and ident_increment query had bind markers noncompliant with SQL-92, which caused mxODBC failures. This was corrected by using string substitution in building the statement, and removing the bind params.