Jason Kirtland [Fri, 20 Jul 2007 19:43:46 +0000 (19:43 +0000)]
Merged lower case caching, fetching from r2955
Be sure to close rows fetched in reflection (if not autoclosed)
Fixed bind test, needed transactional storage engine for mysql
Mike Bayer [Fri, 20 Jul 2007 15:10:56 +0000 (15:10 +0000)]
- a new mutex that was added in 0.3.9 causes the pool_timeout
feature to fail during a race condition; threads would
raise TimeoutError immediately with no delay if many threads
push the pool into overflow at the same time. this issue has been
fixed.
Mike Bayer [Wed, 18 Jul 2007 18:51:35 +0000 (18:51 +0000)]
- merged some more of the SessionTransaction connection-bound checks from 0.4
- _BinaryExpression.compare() checks for a base set of "commutative" operators and checks for itself in reverse if so
- added ORM-based unit test for the above, fixes [ticket:664]
Mike Bayer [Sun, 15 Jul 2007 06:02:03 +0000 (06:02 +0000)]
- more docs
- got from_statement() to actually work with query, tests were not covering
- added auto-labeling of anonymous columns sent to add_column(), tests
Mike Bayer [Sun, 15 Jul 2007 04:50:11 +0000 (04:50 +0000)]
- columns can be overridden in a reflected table with a "key"
attribute different than the column's name, including for primary key
columns [ticket:650]
- more docs
Mike Bayer [Sat, 14 Jul 2007 23:06:57 +0000 (23:06 +0000)]
- test module turns warnings into exceptions so they can be tested for
- the two mapper PK tests should actually warn on the id column collision
- reverted abc_inheritance back to normal
Mike Bayer [Sat, 14 Jul 2007 21:57:51 +0000 (21:57 +0000)]
- improved ability to get the "correct" and most minimal set of primary key
columns from a join, equating foreign keys and otherwise equated columns.
this is also mostly to help inheritance scenarios formulate the best
choice of primary key columns. [ticket:185]
- added 'bind' argument to Sequence.create()/drop(), ColumnDefault.execute()
Mike Bayer [Fri, 13 Jul 2007 08:12:30 +0000 (08:12 +0000)]
- a warning is issued by Mapper when two primary key columns of the
same name are munged into a single attribute. this happens frequently
when mapping to joins (or inheritance).
Mike Bayer [Fri, 13 Jul 2007 07:36:39 +0000 (07:36 +0000)]
- composite primary key is represented as a non-keyed set to allow for
composite keys consisting of cols with the same name; occurs within a
Join. helps inheritance scenarios formulate correct PK.
- ticket #185 reopened. still need to get Join to produce a minmal PK for fk'ed columns
Mike Bayer [Thu, 12 Jul 2007 22:03:48 +0000 (22:03 +0000)]
- the various "engine" arguments, such as "engine", "connectable",
"engine_or_url", "bind_to", etc. are all present, but deprecated.
they all get replaced by the single term "bind". you also
set the "bind" of MetaData using
metadata.bind = <engine or connection>. this is part of 0.4
forwards compatibility where "bind" is the only keyword.
[ticket:631]
Mike Bayer [Thu, 12 Jul 2007 18:38:55 +0000 (18:38 +0000)]
- converted mapper.py unit test to 0.4's four separate mapper.py, query.py, eager_relations.py, lazy_relations.py.
tests 0.4 forwards compatibility for [ticket:631]
- fixed "reset_joinpoint()" in query to actually work, when the same table appears in two join()s it reuses that
same table as a joinpoint the way 0.4 does.
Mike Bayer [Tue, 10 Jul 2007 06:51:58 +0000 (06:51 +0000)]
more "column targeting" enhancements..columns have a "depth" from their ultimate source column so that corresponding_column() can find the column that is "closest" (i.e. fewest levels of proxying) to the requested column
Mike Bayer [Sun, 8 Jul 2007 21:18:46 +0000 (21:18 +0000)]
- ForeignKey to a table in a schema thats not the default schema
requires the schema to be explicit; i.e. ForeignKey('alt_schema.users.id')
- the fix in "schema" above fixes postgres reflection of foreign keys from an
alt-schema table to a public schema table
Jason Kirtland [Fri, 6 Jul 2007 00:58:09 +0000 (00:58 +0000)]
- Deprecated DynamicMetaData- use ThreadLocalMetaData or MetaData instead
- Deprecated BoundMetaData- use MetaData instead
- Removed DMD and BMD from documentation
Mike Bayer [Thu, 5 Jul 2007 00:09:06 +0000 (00:09 +0000)]
- replaced calls for mapper.props in Query with mapper.get_property(),
which resolves synonyms. fixes [ticket:598] for join/join_to/join_via/with_parent
Mike Bayer [Sat, 30 Jun 2007 16:57:20 +0000 (16:57 +0000)]
improved handling of exceptions upon __init__(): will preserve the stack
trace of the original __init__ exception; errors raised during session.expunge() will be
reported as warnings
Mike Bayer [Sat, 30 Jun 2007 01:14:15 +0000 (01:14 +0000)]
- added a mutex to QueuePool's "overflow" calculation to prevent a race
condition that can bypass max_overflow; merged from 0.4 branch r2736-2738.
also made the locking logic simpler, tried to get the test to create a
failure on OSX (not successful)
Mike Bayer [Sat, 30 Jun 2007 00:20:26 +0000 (00:20 +0000)]
- MetaData and all SchemaItems are safe to use with pickle. slow
table reflections can be dumped into a pickled file to be reused later.
Just reconnect the engine to the metadata after unpickling. [ticket:619]
Mike Bayer [Fri, 29 Jun 2007 23:50:25 +0000 (23:50 +0000)]
postgres:
- added support for reflection of domains [ticket:570]
- types which are missing during reflection resolve to Null type
instead of raising an error
- moved reflection/types/query unit tests specific to postgres to new
postgres unittest module
Mike Bayer [Wed, 27 Jun 2007 20:38:43 +0000 (20:38 +0000)]
- fix to the "column_prefix" flag so that the mapper does not
trip over synonyms (and others) that are named after the column's actual
"key" (since, column_prefix means "dont use the key").
Mike Bayer [Mon, 25 Jun 2007 17:07:25 +0000 (17:07 +0000)]
- fixed precedence of operators so that parenthesis are correctly applied
[ticket:620]
- calling <column>.in_() (i.e. with no arguments) will return
"CASE WHEN (<column> IS NULL) THEN NULL ELSE 0 END = 1)", so that
NULL or False is returned in all cases, rather than throwing an error
[ticket:545]
Mike Bayer [Fri, 22 Jun 2007 15:36:54 +0000 (15:36 +0000)]
- added dialect flag "auto_convert_lobs", defaults to True; will cause any
LOB objects detected in a result set to be forced into OracleBinary
so that the LOB is read() automatically, if no typemap was present
(i.e., if a textual execute() was issued).
Mike Bayer [Wed, 20 Jun 2007 21:08:10 +0000 (21:08 +0000)]
- added synchronization to the mapper() construction step, to avoid
thread collections when pre-existing mappers are compiling in a
different thread [ticket:613]
Mike Bayer [Sun, 17 Jun 2007 00:49:08 +0000 (00:49 +0000)]
- result.last_inserted_ids() should return a list that is identically
sized to the primary key constraint of the table. values that were
"passively" created and not available via cursor.lastrowid will be None.
- sqlite: string PK column inserts dont get overwritten with OID [ticket:603]
Jason Kirtland [Thu, 14 Jun 2007 00:11:51 +0000 (00:11 +0000)]
- Iteration over dict association proxies is now dict-like, not
InstrumentedList-like (e.g. over keys instead of values).
- Don't tightly bind proxies to source collections (fixes #597)
- Handle slice objects on orderinglist's __setitem__