Mike Bayer [Thu, 7 Apr 2011 21:58:48 +0000 (17:58 -0400)]
- Some fixes to the state handling regarding
backrefs, typically when autoflush=False, where
the back-referenced collection wouldn't
properly handle add/removes with no net
change. Thanks to Richard Murri for the
test case + patch. [ticket:2123]
Mike Bayer [Thu, 7 Apr 2011 17:47:43 +0000 (13:47 -0400)]
- The limit/offset keywords to select() as well
as the value passed to select.limit()/offset()
will be coerced to integer. [ticket:2116]
- Oracle dialect adds use_binds_for_limits=False
create_engine() flag, will render the LIMIT/OFFSET
values inline instead of as binds, reported to
modify the execution plan used by Oracle.
[ticket:2116]
Mike Bayer [Mon, 28 Mar 2011 00:38:50 +0000 (20:38 -0400)]
- Documented SQLite DATE/TIME/DATETIME types.
[ticket:2029]
- add "currentmodule" directive to all the dialect type docs to
ensure users import from the dialect package, not the "base" module
Mike Bayer [Sun, 27 Mar 2011 23:44:40 +0000 (19:44 -0400)]
- Using column names that would require quotes
for the column itself or for a name-generated
bind parameter, such as names with special
characters, underscores, non-ascii characters,
now properly translate bind parameter keys when
talking to cx_oracle. [ticket:2100]
Mike Bayer [Wed, 23 Mar 2011 03:44:38 +0000 (23:44 -0400)]
- Fixed bug in QueuePool, SingletonThreadPool whereby
connections that were discarded via overflow or periodic
cleanup() were not explicitly closed, leaving garbage
collection to the task instead. This generally only
affects non-reference-counting backends like Jython
and Pypy. Thanks to Jaimy Azle for spotting
this. [ticket:2102]
Mike Bayer [Thu, 17 Mar 2011 20:56:30 +0000 (16:56 -0400)]
- port query options test suite over from 0.7, plus extra test for [ticket:2098]
- apply fix for [ticket:2098] that just checks "if mapper is None". 0.7 has a
more comprehensive rework of this section already.
Mike Bayer [Wed, 16 Mar 2011 18:09:25 +0000 (14:09 -0400)]
- Rewrote the query used to get the definition of a view,
typically when using the Inspector interface, to
use sys.sql_modules instead of the information schema,
thereby allowing views definitions longer than 4000
characters to be fully returned. [ticket:2071]
Mike Bayer [Wed, 16 Mar 2011 16:47:42 +0000 (12:47 -0400)]
- The horizontal_shard ShardedSession class accepts the common
Session argument "query_cls" as a constructor argument,
to enable further subclassing of ShardedQuery.
[ticket:2090]
- The Beaker caching example allows a "query_cls" argument
to the query_callable() function. [ticket:2090]
Mike Bayer [Sat, 5 Mar 2011 17:19:40 +0000 (12:19 -0500)]
- Tightened the iterate vs. remove mutex around the
identity map iteration, attempting to reduce the
chance of an (extremely rare) reentrant gc operation
causing a deadlock. Might remove the mutex in
0.7. [ticket:2087]
Mike Bayer [Thu, 10 Feb 2011 16:42:35 +0000 (11:42 -0500)]
- A warning is emitted in the unusual case that an
append or similar event on a collection occurs after
the parent object has been dereferenced, which
prevents the parent from being marked as "dirty"
in the session. This will be an exception in 0.7.
[ticket:2046]
Mike Bayer [Wed, 9 Feb 2011 21:30:49 +0000 (16:30 -0500)]
- figured out the ::autodata directive, can move the docstring for
expression.func into the .py module
- added a note about logging only being checked on new connections,
as one user had this issue awhile back, and I suspect it for
a current ML user issue
Mike Bayer [Wed, 9 Feb 2011 21:04:29 +0000 (16:04 -0500)]
- The compiler extension now supports overriding the default
compilation of expression._BindParamClause including that
the auto-generated binds within the VALUES/SET clause
of an insert()/update() statement will also use the new
compilation rules. [ticket:2042]
Mike Bayer [Wed, 9 Feb 2011 20:16:13 +0000 (15:16 -0500)]
- Fixed bug where a column with a SQL or server side default
that was excluded from a mapping with include_properties
or exclude_properties would result in UnmappedColumnError.
[ticket:1995]
Mike Bayer [Fri, 4 Feb 2011 22:37:36 +0000 (17:37 -0500)]
- When explicit sequence execution derives the name
of the auto-generated sequence of a SERIAL column,
which currently only occurs if implicit_returning=False,
now accommodates if the table + column name is greater
than 63 characters using the same logic Postgresql uses.
[ticket:1083]
Mike Bayer [Wed, 2 Feb 2011 23:11:17 +0000 (18:11 -0500)]
- Fixed bug where "middle" class in a polymorphic hierarchy
would have no 'polymorphic_on' column if it didn't also
specify a 'polymorphic_identity', leading to strange
errors upon refresh, wrong class loaded when querying
from that target. [ticket:2038]
Mike Bayer [Sun, 30 Jan 2011 19:55:55 +0000 (14:55 -0500)]
- A warning is emitted when a joined-table inheriting mapper
has no primary keys on the locally mapped table
(but has pks on the superclass table). [ticket:2019]
Mike Bayer [Sat, 8 Jan 2011 21:05:09 +0000 (16:05 -0500)]
- document implicit_returning feature on create_engine()
- add "Triggers" section to MS-SQL docs describing implicit_returning
flag on both Table and create_engine(). [ticket:1994]
Mike Bayer [Sat, 8 Jan 2011 20:33:38 +0000 (15:33 -0500)]
- Threadlocal engine returns itself upon begin(),
begin_nested(); engine then implements contextmanager
methods to allow the "with" statement. [ticket:2004]
Mike Bayer [Thu, 6 Jan 2011 17:25:17 +0000 (12:25 -0500)]
- Fixed bug regarding "subqueryload" strategy whereby
the join would fail if using a multi-level load
of the form from A->joined-subclass->C [ticket:2014]
Mike Bayer [Tue, 4 Jan 2011 17:38:54 +0000 (12:38 -0500)]
- sorry, I really don't want metaclass recipes in the main documentation. Don't
want people using them, thinking they're needed in the general case, confused, etc.
The two sections here are moved to the wiki for now.
Mike Bayer [Tue, 4 Jan 2011 02:11:12 +0000 (21:11 -0500)]
- Firebird numeric type now checks for Decimal explicitly,
lets float() pass right through, thereby allowing
special values such as float('inf'). [ticket:2012]
Mike Bayer [Thu, 30 Dec 2010 17:20:03 +0000 (12:20 -0500)]
- A little more verbiage to the "primaryjoin" error,
in an unusual condition that the join condition
"works" for viewonly but doesn't work for non-viewonly,
and foreign_keys wasn't used - adds "foreign_keys" to
the suggestion. Also add "foreign_keys" to the
suggestion for the generic "direction" error.
Mike Bayer [Tue, 28 Dec 2010 19:56:26 +0000 (14:56 -0500)]
- A warning is emitted when version_id_col is specified
on an inheriting mapper when the inherited mapper
already has one, if those column expressions are not
the same. [ticket:1987]
Mike Bayer [Tue, 21 Dec 2010 20:58:28 +0000 (15:58 -0500)]
- Fixed bug which prevented composite mapped
attributes from being used on a mapped select statement.
[ticket:1997]. Note the workings of composite are slated to
change significantly in 0.7.
Mike Bayer [Wed, 15 Dec 2010 21:26:05 +0000 (16:26 -0500)]
- Fixed uow bug whereby expired objects passed to
Session.delete() would not have unloaded references
or collections taken into account when deleting
objects, despite passive_deletes remaining at
its default of False. [ticket:2002]
Mike Bayer [Wed, 8 Dec 2010 18:46:29 +0000 (13:46 -0500)]
- Threadlocal engine methods rollback(), commit(),
prepare() won't raise if no transaction is in progress;
this was a regression introduced in 0.6. [ticket:1998]
Mike Bayer [Sun, 28 Nov 2010 16:10:41 +0000 (11:10 -0500)]
- Query.get() will raise if the number of params
in a composite key is too large, as well as too
small. [ticket:1977]
- the above change smoked out an old mistake in a unit test.
Gaëtan de Menten [Sat, 27 Nov 2010 21:27:42 +0000 (22:27 +0100)]
fixed a small potential memory leak in UnicodeResultProcessor (for some weird
reason, it didn't actually leak in my tests) by providing a dealloc method to
the type, and added a test to ensure it stays that way. Closes #1981.
Mike Bayer [Thu, 25 Nov 2010 17:20:13 +0000 (12:20 -0500)]
- Fixed operator precedence rules for multiple
chains of a single non-associative operator.
I.e. "x - (y - z)" will compile as "x - (y - z)"
and not "x - y - z". Also works with labels,
i.e. "x - (y - z).label('foo')"
[ticket:1984]
- Single element tuple expressions inside an IN clause
parenthesize correctly, also from [ticket:1984],
added tests for PG
- re-fix again importlater, [ticket:1983]
Mike Bayer [Wed, 24 Nov 2010 17:21:59 +0000 (12:21 -0500)]
- SqlSoup overhaul
- Added "map_to()" method to SqlSoup, which is a "master"
method which accepts explicit arguments for each aspect of
the selectable and mapping, including a base class per
mapping. [ticket:1975]
- Mapped selectables used with the map(), with_labels(),
join() methods no longer put the given argument into the
internal "cache" dictionary. Particularly since the
join() and select() objects are created in the method
itself this was pretty much a pure memory leaking behavior.
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]