Mike Bayer [Fri, 19 Nov 2010 23:44:09 +0000 (18:44 -0500)]
- active_history flag also added to composite().
The flag has no effect in 0.6, but is instead
a placeholder flag for forwards compatibility,
as it will be needed in 0.7 for composites.
[ticket:1976]
Mike Bayer [Thu, 18 Nov 2010 23:44:35 +0000 (18:44 -0500)]
- Added as_uuid=True flag to the UUID type, will receive
and return values as Python UUID() objects rather than
strings. Currently, the UUID type is only known to
work with psycopg2. [ticket:1956]
Mike Bayer [Thu, 18 Nov 2010 19:55:19 +0000 (14:55 -0500)]
- Added active_history flag to relationship()
and column_property(), forces attribute events to
always load the "old" value, so that it's available to
attributes.get_history(). [ticket:1961]
- modernize test_relationship, give test classes meaningful names
Mike Bayer [Thu, 18 Nov 2010 17:19:31 +0000 (12:19 -0500)]
- The cx_oracle "decimal detection" logic, which takes place
for for result set columns with ambiguous numeric characteristics,
now uses the decimal point character determined by the locale/
NLS_LANG setting, using an on-first-connect detection of
this character. cx_oracle 5.0.3 or greater is also required
when using a non-period-decimal-point NLS_LANG setting.
[ticket:1953].
Mike Bayer [Sat, 13 Nov 2010 18:19:36 +0000 (13:19 -0500)]
- move inline "import" statements to use new "util.importlater()" construct. cuts
down on clutter, timeit says there's a teeny performance gain, at least where
the access is compared against attr.subattr. these aren't super-critical
calls anyway
- slight inlining in _class_to_mapper
Mike Bayer [Fri, 12 Nov 2010 15:49:17 +0000 (10:49 -0500)]
- On the same theme, the REFERENCES clause in a CREATE TABLE
that includes a remote schema to a *different* schema
than that of the parent table doesn't render at all,
as cross-schema references do not appear to be supported.
Mike Bayer [Fri, 12 Nov 2010 15:36:03 +0000 (10:36 -0500)]
- The REFERENCES clause in a CREATE TABLE that includes
a remote schema name now renders the remote name without
the schema clause, as required by SQLite. [ticket:1851]
Mike Bayer [Tue, 9 Nov 2010 16:40:23 +0000 (11:40 -0500)]
- Implemented sequence check capability for the C
version of RowProxy, as well as 2.7 style
"collections.Sequence" registration for RowProxy.
[ticket:1871]
Mike Bayer [Fri, 5 Nov 2010 05:02:48 +0000 (01:02 -0400)]
- "innerjoin" flag doesn't take effect along the chain
of joinedload() joins if a previous join in that chain
is an outer join, thus allowing primary rows without
a referenced child row to be correctly returned
in results. [ticket:1954]
Mike Bayer [Wed, 3 Nov 2010 19:45:21 +0000 (15:45 -0400)]
- mysql
- Fixed error handling for Jython + zxjdbc, such that
has_table() property works again. Regression from
0.6.3 (we don't have a Jython buildbot, sorry)
[ticket:1960]
Mike Bayer [Tue, 26 Oct 2010 20:12:04 +0000 (16:12 -0400)]
- Fixed bug whereby a non-"mutable" attribute modified event
which occurred on an object that was clean except for
preceding mutable attribute changes would fail to strongly
reference itself in the identity map. This would cause the
object to be garbage collected, losing track of any changes
that weren't previously saved in the "mutable changes"
dictionary.
Mike Bayer [Sun, 24 Oct 2010 16:00:58 +0000 (12:00 -0400)]
- mssql+pymssql dialect now honors the "port" portion
of the URL instead of discarding it. [ticket:1952]
- testing.only_on() accepts db specs optionally as a list
Mike Bayer [Sat, 23 Oct 2010 22:09:36 +0000 (18:09 -0400)]
- Rewrote the reflection of indexes to use sys.
catalogs, so that column names of any configuration
(spaces, embedded commas, etc.) can be reflected.
Note that reflection of indexes requires SQL
Server 2005 or greater. [ticket:1770]
Mike Bayer [Sat, 23 Oct 2010 20:40:39 +0000 (16:40 -0400)]
- Added type_coerce(expr, type_) expression element.
Treats the given expression as the given type when evaluating
expressions and processing result rows, but does not
affect the generation of SQL, other than an anonymous label.
Mike Bayer [Sat, 23 Oct 2010 19:27:21 +0000 (15:27 -0400)]
- Oracle - the implicit_retunring argument to create_engine()
is now honored regardless of detected version of
Oracle. Previously, the flag would be forced
to False if server version info was < 10.
[ticket:1878]
Mike Bayer [Sat, 23 Oct 2010 17:07:56 +0000 (13:07 -0400)]
- New Query methods: query.label(name), query.as_scalar(),
return the query's statement as a scalar subquery
with /without label [ticket:1920];
query.with_entities(*ent), replaces the SELECT list of
the query with new entities.
Roughly equivalent to a generative form of query.values()
which accepts mapped entities as well as column
expressions.
Mike Bayer [Thu, 21 Oct 2010 20:42:32 +0000 (16:42 -0400)]
- Fixed bug in TypeDecorator whereby the dialect-specific
type was getting pulled in to generate the DDL for a
given type, which didn't always return the correct result.
- TypeDecorator can now have a fully constructed type
specified as its "impl", in addition to a type class.
- TypeDecorator will now place itself as the resulting
type for a binary expression where the type coercion
rules would normally return its impl type - previously,
a copy of the impl type would be returned which would
have the TypeDecorator embedded into it as the "dialect"
impl, this was probably an unintentional way of achieving
the desired effect.
- TypeDecorator.load_dialect_impl() returns "self.impl" by
default, i.e. not the dialect implementation type of
"self.impl". This to support compilation correctly.
Behavior can be user-overridden in exactly the same way
as before to the same effect.
Mike Bayer [Wed, 20 Oct 2010 21:58:35 +0000 (17:58 -0400)]
- document is_modified() caveats including that the "old" value isn't always
present, and that this results in a positive response for "changed"
[ticket:1928]
Mike Bayer [Sun, 17 Oct 2010 19:23:14 +0000 (15:23 -0400)]
- the NoseSQLAlchemyPlugin has been moved to a
new package "sqlalchemy_nose" which installs
along with "sqlalchemy". This so that the "nosetests"
script works as always but also allows the
--with-coverage option to turn on coverage before
SQLAlchemy modules are imported, allowing coverage
to work correctly.
- added some new ignores
Mike Bayer [Fri, 15 Oct 2010 15:59:02 +0000 (11:59 -0400)]
- Added a new "lazyload" option "immediateload".
Issues the usual "lazy" load operation automatically
as the object is populated. The use case
here is when loading objects to be placed in
an offline cache, or otherwise used after
the session isn't available, and straight 'select'
loading, not 'joined' or 'subquery', is desired.
[ticket:1914]
Mike Bayer [Fri, 15 Oct 2010 15:43:59 +0000 (11:43 -0400)]
- engine_from_config() now accepts 'debug' for
'echo', 'echo_pool', 'force' for 'convert_unicode',
boolean values for 'use_native_unicode'.
[ticket:1899]
Mike Bayer [Sun, 3 Oct 2010 17:11:41 +0000 (13:11 -0400)]
- default compilation of a type will check if the type class's module is
inside of sqlalchemy.dialects, in which case that dialect's default
will be used instead of DefaultDialect.
Mike Bayer [Sat, 2 Oct 2010 05:30:17 +0000 (01:30 -0400)]
- this test began working for oracle as of r14af1f73fbbd. Additionally,
the operation wasn't actually "working" on sqlite, mysql prior to that
rev, but no assertions checked. added assertions for those.
Mike Bayer [Sat, 2 Oct 2010 00:55:42 +0000 (20:55 -0400)]
- Fixed bug in query.update() where 'evaluate' or 'fetch'
expiration would fail if the column expression key was
a class attribute with a different keyname as the
actual column name. [ticket:1935]
Mike Bayer [Sat, 2 Oct 2010 00:29:04 +0000 (20:29 -0400)]
- add additional logic that duplicates mapper's prop.copy(); prop.columns.append(col)
logic when columns are present in a joined subclass with an attribute name different
than the column name itself [ticket:1931]
- add coverage to verify that we need to check (obj.name or name) when
deciding if a Column from a mixin should be added to the mapped table
Mike Bayer [Wed, 29 Sep 2010 06:11:38 +0000 (02:11 -0400)]
- CircularDependencyError now has .cycles and .edges
members, which are the set of elements involved in
one or more cycles, and the set of edges as 2-tuples.
[ticket:1890]
Mike Bayer [Tue, 28 Sep 2010 16:43:36 +0000 (12:43 -0400)]
- Fixed bug whereby columns on a mixin wouldn't propagate
correctly to a single-table inheritance scheme where
the attribute name is different than that of the column.
[ticket:1930]. Note [ticket:1931] which is the same
issue for joined inh, not yet resolved.
Mike Bayer [Sat, 25 Sep 2010 23:25:31 +0000 (19:25 -0400)]
- @classproperty 's official name/location for usage
with declarative is sqlalchemy.ext.declarative.mapperproperty.
Same thing, but moving there since it is more of a
"marker" that's specific to declararative,
not just an attribute technique. [ticket:1915]
Mike Bayer [Sat, 25 Sep 2010 22:38:01 +0000 (18:38 -0400)]
- Fixed recursion overflow which could occur when operating
with two expressions both of type "NullType", but
not the singleton NULLTYPE instance. [ticket:1907]
Mike Bayer [Wed, 22 Sep 2010 18:22:16 +0000 (14:22 -0400)]
- in depth docs about some merge() tips
- docs about backref cascade
- Another new flag on relationship(), cascade_backrefs,
disables the "save-update" cascade when the event was
initiated on the "reverse" side of a bidirectional
relationship. This is a cleaner behavior so that
many-to-ones can be set on a transient object without
it getting sucked into the child object's session,
while still allowing the forward collection to
cascade. We *might* default this to False in 0.7.
Mike Bayer [Tue, 21 Sep 2010 22:09:29 +0000 (18:09 -0400)]
- Query.select_from() has been beefed up to help
ensure that a subsequent call to query.join()
will use the select_from() entity, assuming it's
a mapped entity and not a plain selectable,
as the default "left" side, not the first entity
in the Query object's list of entities.