Roger Demetrescu [Fri, 12 Oct 2007 12:53:33 +0000 (12:53 +0000)]
firebird: Fixed reflection for Integer and Numeric (after introducing Float column type). Need to review 'column_func' from reflecttable() and write some unit tests...
Roger Demetrescu [Fri, 12 Oct 2007 06:02:15 +0000 (06:02 +0000)]
Firebird: added Float and Time types (FBFloat and FBTime). Fixed BLOB SUB_TYPE for TEXT and Binary types.
Firebird's string types are tested in testtypes.py
Ants Aasma [Mon, 8 Oct 2007 15:25:51 +0000 (15:25 +0000)]
- fix multiple consequent two phase transactions not working with postgres. For some reason implicit transactions are not enough. [ticket:810]
- add an option to scoped session mapper extension to not automatically save new objects to session.
Jason Kirtland [Mon, 8 Oct 2007 03:01:04 +0000 (03:01 +0000)]
- Loosened up test_cant_execute_join for oracle (probably) + bonus typo fix
- Some docstring formatting waiting for pg to finish the tests... waiting...
Jason Kirtland [Sun, 7 Oct 2007 18:54:05 +0000 (18:54 +0000)]
- Rewrote autoincrement tests: added new scenarios, changed the orm fetchid to explicit test of last_row_ids(), and now testing transactional/autocommit modes separately to help catch any subtle issues that may exist due to assumed cursor state during post_exec().
Mike Bayer [Sat, 6 Oct 2007 16:12:58 +0000 (16:12 +0000)]
- oracle does not implicitly convert to unicode for non-typed result
sets (i.e. when no TypeEngine/String/Unicode type is even being used;
previously it was detecting DBAPI types and converting regardless).
should fix [ticket:800]
- fixed oracle out_parameters, likely broke in beta6
- fixed oracle _normalize_case for encoded names, gets unicode reflection test to work
- a few extra tests tweaked/unsupported for oracle
Mike Bayer [Sat, 6 Oct 2007 01:12:19 +0000 (01:12 +0000)]
- null foreign key on a m2o doesn't trigger a lazyload [ticket:803]
- slight simpliication to mapper.populate_instance()
- lamenting the different codepaths between query._get() and DeferredLoader.lazyload()
- query._get() uses all()[0] for single-row load to avoid complexity of first() (same as LazyLoader)
Jason Kirtland [Thu, 4 Oct 2007 18:31:31 +0000 (18:31 +0000)]
Adjusted reserved word reflection test for oracle-style identifier dialects. But probably the CheckConstraint part of this test should just be removed, as it's testing a non-extant feature.
Mike Bayer [Thu, 4 Oct 2007 03:19:38 +0000 (03:19 +0000)]
- move PG RETURNING tests to postgres dialect test
- added server_version_info() support for PG dialect
- exclude PG versions < 8.4 for RETURNING tests
Mike Bayer [Fri, 28 Sep 2007 16:37:52 +0000 (16:37 +0000)]
- doc updates. generated sql docs are against sql.expression now.
- added SessionExtension docs.
- removed old sqlconstruction doc.
- changed 'copy_collections' flag in Select to '_copy_collections'; its
not really "public".
Jason Kirtland [Thu, 27 Sep 2007 17:23:41 +0000 (17:23 +0000)]
- The IdentifierPreprarer's _requires_quotes test is now regex based.
Any out-of-tree dialects that provide custom sets of legal_characters
or illegal_initial_characters will need to move to regexes or override
_requires_quotes.
Mike Bayer [Wed, 26 Sep 2007 23:47:55 +0000 (23:47 +0000)]
- some docstrings for select()
- fixed tutorial doctests to adjust for execution changes, session being weak-referencing
(reloads objects more frequently which get u'' applied to their __repr__())
Jason Kirtland [Wed, 26 Sep 2007 23:37:11 +0000 (23:37 +0000)]
Changed MySQL dialect to use the older LIMIT <offset>, <limit> syntax instead
of LIMIT <l> OFFSET <o> for folks using 3.23. ([ticket:794], thanks for the
patch!)
Mike Bayer [Wed, 26 Sep 2007 17:08:19 +0000 (17:08 +0000)]
- created a link between QueryContext and SelectionContext; the attribute
dictionary of QueryContext is now passed to SelectionContext inside
of Query.instances(), allowing messages to be passed between the two stages.
- removed the recent "exact match" behavior of Alias objects, they're back to
their usual behavior.
- tightened up the relationship between the Query's generation
of "eager load" aliases, and Query.instances() which actually grabs the
eagerly loaded rows. If the aliases were not specifically generated for
that statement by EagerLoader, the EagerLoader will not take effect
when the rows are fetched. This prevents columns from being grabbed accidentally
as being part of an eager load when they were not meant for such, which can happen
with textual SQL as well as some inheritance situations. It's particularly important
since the "anonymous aliasing" of columns uses simple integer counts now to generate
labels.
Mike Bayer [Wed, 26 Sep 2007 14:55:44 +0000 (14:55 +0000)]
- the behavior of String/Unicode types regarding that they auto-convert
to TEXT/CLOB when no length is present now occurs *only* for an exact type
of String or Unicode with no arguments. If you use VARCHAR or NCHAR
(subclasses of String/Unicode) with no length, they will be interpreted
by the dialect as VARCHAR/NCHAR; no "magic" conversion happens there.
This is less surprising behavior and in particular this helps Oracle keep
string-based bind parameters as VARCHARs and not CLOBs [ticket:793].
Mike Bayer [Mon, 24 Sep 2007 19:27:52 +0000 (19:27 +0000)]
- columns from Alias objects, when used to target result-row columns, must match exactly
to the label used in the generated statement. This is so searching for columns in a
result row which match aliases won't accidentally match non-aliased columns.
fixes errors which can arise in eager loading scenarios.
Mike Bayer [Mon, 24 Sep 2007 14:51:23 +0000 (14:51 +0000)]
- added session.is_modified(obj) method; performs the same "history" comparison operation
as occurs within a flush operation; setting include_collections=False gives the same
result as is used when the flush determines whether or not to issue an UPDATE for the
instance's row.
Mike Bayer [Sat, 22 Sep 2007 17:14:15 +0000 (17:14 +0000)]
- added "schema" argument to Sequence; use this with Postgres /Oracle when the sequence is
located in an alternate schema. Implements part of [ticket:584], should fix [ticket:761].
Mike Bayer [Sat, 22 Sep 2007 16:55:36 +0000 (16:55 +0000)]
- merged sa_entity branch. the big change here is the attributes system
deals primarily with the InstanceState and almost never with the instrumented object
directly. This reduces lookups and complexity since we need the state for just about
everything, now its the one place for everything internally.
we also merged the new weak referencing identity map, which will go out in beta6 and
we'll see how that goes !
Mike Bayer [Sat, 22 Sep 2007 15:55:02 +0000 (15:55 +0000)]
- added 'comparator' keyword argument to PickleType. By default, "mutable"
PickleType does a "deep compare" of objects using their dumps() representation.
But this doesn't work for dictionaries. Pickled objects which provide an
adequate __eq__() implementation can be set up with "PickleType(comparator=operator.eq)"
[ticket:560]
Mike Bayer [Sun, 9 Sep 2007 17:01:38 +0000 (17:01 +0000)]
- added 'passive_deletes="all"' flag to relation(), disables all
nulling-out of foreign key attributes during a flush where the parent
object is deleted.
Mike Bayer [Sat, 8 Sep 2007 20:28:26 +0000 (20:28 +0000)]
- adjusted operator precedence of NOT to match '==' and others, so that
~(x <operator> y) produces NOT (x <op> y), which is better compatible with MySQL.
[ticket:764]. this doesn't apply to "~(x==y)" as it does in 0.3 since ~(x==y)
compiles to "x != y", but still applies to operators like BETWEEN.
Mike Bayer [Sat, 8 Sep 2007 19:51:35 +0000 (19:51 +0000)]
- fixes to ShardedSession to work with deferred columns [ticket:771].
- user-defined shard_chooser() function must accept "clause=None"
argument; this is the ClauseElement passed to session.execute(statement)
and can be used to determine correct shard id (since execute() doesn't
take an instance)
Mike Bayer [Fri, 7 Sep 2007 19:57:01 +0000 (19:57 +0000)]
- merged the unit test for the column_prefix fix that was established in the 0.3
trunk in r2795. the actual "fix" part of it I just happened to spot manually
the other day and fixed without testing (forgot what the original failure condition was) in r3449.