Commit Graph

4547 Commits

Author SHA1 Message Date
Mike Bayer 425b7388cc - Removed the usage of the "collections.MutableMapping"
abc from the ext.mutable docs as it was being used
incorrectly and makes the example more difficult
to understand in any case.  [ticket:2152]
2011-04-28 12:10:24 -04:00
Mike Bayer 7df21e5a1f - a non_primary mapper will inherit the _identity_class
of the primary mapper.  This so that a non_primary
established against a class that's normally in an
inheritance mapping will produce results that are
identity-map compatible with that of the primary
mapper [ticket:2151] (also in 0.6.8)
2011-04-27 12:54:15 -04:00
Mike Bayer 81a025fca4 - Fixed a potential KeyError which under some
circumstances could occur with the identity
    map, part of [ticket:2148]
2011-04-25 11:33:06 -04:00
Mike Bayer 02fa8bacaa - added Query.with_session() method, switches
Query to use a different session.

- horizontal shard query should use execution
options per connection as per [ticket:2131]
2011-04-23 18:38:01 -04:00
Philip Jenvey 2a2cd33314 utilize the zxjdbc PostgresqlHandler for better Decimal handling. hopefully
this won't be necessary eventually (refs http://bugs.jython.org/issue1499)
2011-04-23 13:10:53 -07:00
Mike Bayer d216298073 - metadata.reflect() and reflection.Inspector()
had some reliance on GC to close connections
  which were internally procured, fixed this.
- added --zero-timeout option to nose fixture, sets pool_timeout to zero
2011-04-23 10:45:11 -07:00
Mike Bayer 3452a2ba03 - Fixed bug whereby if FetchedValue was passed
to column server_onupdate, it would not
have its parent "column" assigned, added
test coverage for all column default assignment
patterns.  [ticket:2147]  also in 0.6.8
2011-04-23 12:34:17 -04:00
Mike Bayer 7b2a76c4a3 grumpy fix 2011-04-22 22:17:43 -04:00
Mike Bayer 0c1c6431bc document the behavior of get() regarding invalid usages as per [ticket:2144] 2011-04-22 18:41:13 -04:00
Mike Bayer eb569b672b - It is an error to call query.get() when the
given entity is not a single, full class
entity or mapper (i.e. a column).  This is
a deprecation warning in 0.6.8.
[ticket:2144]
2011-04-22 18:33:55 -04:00
Mike Bayer 5b8a84ea44 remove erroneously committed pdb 2011-04-20 15:51:28 -04:00
Mike Bayer 0c560edee7 - Added explicit check for when Column .name
is assigned as blank string [ticket:2140]
2011-04-20 15:49:33 -04:00
Mike Bayer c718dea749 - Fixed the psycopg2_version parsing in the
psycopg2 dialect.
2011-04-18 12:38:08 -04:00
Mike Bayer b02193bd7e - Fixed regression introduced in 0.7b4 (!) whereby
query.options(someoption("nonexistent name")) would
fail to raise an error.  Also added additional
error catching for cases where the option would
try to build off a column-based element, further
fixed up some of the error messages tailored
in [ticket:2069]
- added another huge crapload of tests to the existing
crapload of tests we already had for options..._get_paths()
and dependencies are covered 100% now
- one case still doesn't do the "right" thing, using an option
specific to relationships will silently pass if the endpoint
is a column-based attribute, and vice versa.
2011-04-17 21:03:02 -04:00
Mike Bayer 566f468877 - move documentation of available execution options to Connection - this is the main
place these should be used
- Executable disallows "compiled_cache" option for now which was previously being ignored
[ticket:2131]
- Query now passes execution options to the Connection rather than the statement
so that all options are allowed including compiled cache.
2011-04-17 16:10:59 -04:00
Mike Bayer 69dcd805d2 - Added explicit true()/false() constructs to expression
lib - coercion rules will intercept "False"/"True"
into these constructs.  In 0.6, the constructs were
typically converted straight to string, which was
no longer accepted in 0.7.  [ticket:2117]
2011-04-17 15:37:12 -04:00
Mike Bayer ae363b0663 - Before/after attach events for PrimaryKeyConstraint
now function, tests added for before/after events
on all constraint types.  [ticket:2105]
2011-04-17 13:53:21 -04:00
Mike Bayer 509f3fb492 - Fixed incorrect usage of "," in over() clause
being placed between the "partition" and "order by"
clauses.  [ticket:2134]
2011-04-17 13:40:37 -04:00
Mike Bayer fcded554df - rework setup.py script to work with:
- Python 3
   - Python 3 builds if Distribute isn't installed
- rework install documentation again
- raise if doc build with mako < 0.4.1
- Python 3.1 builds force doctest parse but then fails due to distribute bug,
  so remove usage of backslash \\ in hybrid.py docstring
- put in the latest ez_setup.py
2011-04-17 13:22:33 -04:00
Mike Bayer 4f6f0edd78 a crapload of doc tweaks including [ticket:1666], thanks Toby ! 2011-04-16 12:04:54 -04:00
Mike Bayer 5cd415d264 no idea what "auto-commit" means here. some reorg. 2011-04-15 12:55:31 -04:00
Mike Bayer 2d34ded2d8 - fixed bug where "from" clause gathering from an
over() clause would be an itertools.chain() and
    not a list, causing "can only concatenate list"
    TypeError when combined with other clauses.
2011-04-14 23:44:03 -04:00
Mike Bayer f9113b5dbf - Fixed support for precision numerics when using
pg8000. [ticket:2132]
2011-04-14 13:54:47 -04:00
Mike Bayer 674d4f8d3f - a "having" clause would be copied from the
inside to the outside query if from_self()
were used; in particular this would break
an 0.7 style count() query [ticket:2130].
(also in 0.6.7)
2011-04-13 19:27:40 -04:00
Mike Bayer 1da499a838 - Added checks inside the UOW to detect the unusual
condition of being asked to UPDATE or DELETE
on a primary key value that contains NULL
in it.  [ticket:2127]

- Some refinements to attribute history.  More
changes are pending possibly in 0.8, but
for now history has been modified such that
scalar history doesn't have a "side effect"
of populating None for a non-present value.
This allows a slightly better ability to
distinguish between a None set and no actual
change, affects [ticket:2127] as well.

- rewriting the history tests in test_attributes to be
individual per operation/assertion.   its a huge job
so this is partial for the moment.
2011-04-10 20:22:11 -04:00
Mike Bayer fb97a666bb - Fixed bug where reflection of foreign key
created as "REFERENCES <tablename>" without
col name would fail.  [ticket:2115]
(also in 0.6.7)
2011-04-10 10:47:34 -04:00
Mike Bayer a347c03907 - no encoding with arrays
- rework the "builtin types" thing with the ReplayableSession to be py3k compatible
2011-04-08 15:59:28 -04:00
Mike Bayer df3bf65f12 - more liberal check here
- dont encode enums in py3k
2011-04-08 15:16:12 -04:00
Mike Bayer ee542a109f - assume in py3k that description encoding is None unless the dialect really
overrides it
- psycopg2 + 3k supports unicode statements...
2011-04-08 14:54:45 -04:00
Mike Bayer a645032262 - 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]
(also in 0.6.7).
2011-04-07 17:56:01 -04:00
Mike Bayer 51fea2e159 - The limit/offset keywords to select() as well
as the value passed to select.limit()/offset()
will be coerced to integer.  [ticket:2116]
(also in 0.6.7)
- 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] (Also in 0.6.7)
2011-04-07 13:34:38 -04:00
Mike Bayer 708a25e76a - Some fixes to "evaulate" and "fetch" evaluation
when query.update(), query.delete() are called.
The retrieval of records is done after autoflush
in all cases, and before update/delete is
emitted, guarding against unflushed data present
as well as expired objects failing during
the evaluation.  [ticket:2122]
2011-04-07 12:49:29 -04:00
Mike Bayer ed5783772d - Still more wording adjustments when a query option
can't find the target entity.  Explain that the
    path must be from one of the root entities.
2011-04-06 10:36:33 -04:00
Mike Bayer b80e9b805f - The "pool.manage" feature doesn't use pickle
anymore to hash the arguments for each pool.
2011-04-05 14:26:28 -04:00
Mike Bayer b462373b46 - REAL has been added to the core types. Supported
by Postgresql, SQL Server, MySQL, SQLite.  Note
that the SQL Server and MySQL versions, which
add extra arguments, are also still available
from those dialects.  [ticket:2081]
2011-04-05 12:40:55 -04:00
Mike Bayer d34bc7da31 - The 'useexisting' flag on Table has been superceded
by a new pair of flags 'keep_existing' and
'extend_existing'.   'extend_existing' is equivalent
to 'useexisting' - the existing Table is returned,
and additional constructor elements are added.
With 'keep_existing', the existing Table is returned,
but additional constructor elements are not added -
these elements are only applied when the Table
is newly created.   [ticket:2109]
2011-04-05 12:04:42 -04:00
Mike Bayer cfc1274834 - add some function examples, [ticket:2107]
- have "packagenames" be present on FunctionElement by default
so that compiler.visit_function() can be called
- add a test for that
2011-04-02 16:32:05 -04:00
Mike Bayer 301438235e - Fixed mutable extension docs to show the
correct type-association methods.
[ticket:2118]
2011-04-02 16:00:35 -04:00
Mike Bayer 0b52a5ae74 - Added @event.listens_for() decorator, given
target + event name, applies the decorated
function as a listener.  [ticket:2106]
- remove usage of globals from test.base.test_events
2011-04-02 13:29:11 -04:00
Mike Bayer eb4a843318 some additional clarification on typeengine docs 2011-03-30 14:22:41 -04:00
Mike Bayer b99cd60cb8 - beef up the "augmenting existing types" section
- add docstirngs for everything TypeDecorator [ticket:2086]
2011-03-30 14:07:27 -04:00
Mike Bayer 218c3cb365 - AssertionPool now stores the traceback indicating
where the currently checked out connection was
acquired; this traceback is reported within
the assertion raised upon a second concurrent
checkout; courtesy Gunnlaugur Briem
[ticket:2103]
2011-03-30 12:30:54 -04:00
Mike Bayer 90aa366fb3 - and fix the message that was the actual subject of [ticket:2063] 2011-03-27 21:14:06 -04:00
Mike Bayer 33691f6837 - Reworded the exception raised when a flush
is attempted of a subclass that is not polymorphic
against the supertype.  [ticket:2063]
2011-03-27 21:06:32 -04:00
Mike Bayer 6882cb17e9 - add a note about snapshot isolation [ticket:2078] 2011-03-27 20:50:47 -04:00
Mike Bayer d355a3be3b - Documented SQLite DATE/TIME/DATETIME types.
[ticket:2029] (also in 0.6.7)
- add "currentmodule" directive to all the dialect type docs to
ensure users import from the dialect package, not the "base" module
2011-03-27 20:34:39 -04:00
Mike Bayer 545b70e8a2 - 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]  (Also
in 0.6.7)
2011-03-27 19:39:39 -04:00
Mike Bayer 68a350d462 - remove test.sql._base, test.engine._base, test.orm._base, move those classes to a new test.lib.fixtures module
- move testing.TestBase to test.lib.fixtures
- massive search and replace
2011-03-27 16:27:27 -04:00
Mike Bayer de529fb81c - adjust the previous checkin a bit. need to transfer sequences over from pickle
even if they are *not* restated.  its necessary here to do a "replacement"
scheme when an incoming sequence replaces the previous.  Theoretically
we could do what Table does here, i.e. use a singleton constructor, but
this is heavyhanded.   The most recent sequence placed in is the winner
is likely the most expected behavior.
2011-03-23 17:38:54 -04:00
Mike Bayer 93da3087f1 - Fixed regression whereby MetaData() coming
back from unpickling did not keep track of
new things it keeps track of now, i.e.
collection of Sequence objects, list
of schema names.  [ticket:2104]
2011-03-23 17:25:57 -04:00