Commit Graph

2307 Commits

Author SHA1 Message Date
Mike Bayer ee8dde9f1c typo 2012-12-09 14:43:49 -05:00
Mike Bayer 7443d50d31 - documentation and changelog for [ticket:2601] 2012-12-09 14:12:22 -05:00
Mike Bayer fef25bdcf9 add a doc for the [ticket:2631] quirk 2012-12-08 20:39:32 -05:00
Mike Bayer 3859742a91 Fixed bug where using server_onupdate=<FetchedValue|DefaultClause>
without passing the "for_update=True" flag would apply the default
object to the server_default, blowing away whatever was there.
The explicit for_update=True argument shouldn't be needed with this usage
(especially since the documentation shows an example without it being
used) so it is now arranged internally using a copy of the given default
object, if the flag isn't set to what corresponds to that argument.
Also in 0.7.10. [ticket:2631]
2012-12-08 20:28:43 -05:00
Mike Bayer 33bafcb132 Fixed bug whereby using a label_length on dialect that was smaller
than the size of actual column identifiers would fail to render
the columns correctly in a SELECT statement.
[ticket:2610]
2012-12-08 19:25:04 -05:00
Mike Bayer 927b985983 - multivalued inserts, [ticket:2623]
- update "not supported" messages for empty inserts, mutlivalue inserts

- rework the ValuesBase approach for multiple value sets so that stmt.parameters
does store a list for multiple values; the _has_multiple_parameters flag now indicates
which of the two modes the statement is within.  it now raises exceptions if a subsequent
call to values() attempts to call a ValuesBase with one mode in the style of the other
mode; that is, you can't switch a single- or multi- valued ValuesBase to the other mode,
and also if a multiple value is passed simultaneously with a kwargs set.
Added tests for these error conditions

- Calling values() multiple times in multivalue mode now extends the parameter list to
include the new parameter sets.

- add error/test if multiple *args were passed to ValuesBase.values()

- rework the compiler approach for multivalue inserts, back to where
_get_colparams() returns the same list of (column, value) as before, thereby
maintaining the identical number of append() and other calls when multivalue
is not enabled.  In the case of multivalue, it makes a last-minute switch to return
a list of lists instead of the single list.  As it constructs the additional lists, the inline
defaults and other calculated default parameters of the first parameter
set are copied into the newly generated lists so that these features continue
to function for a multivalue insert.   Multivalue inserts now add no additional
function calls to the compilation for regular insert constructs.

- parameter lists for multivalue inserts now includes an integer index for all
parameter sets.

- add detailed documentation for ValuesBase.values(), including careful wording
to describe the difference between multiple values and an executemany() call.

- add a test for multivalue insert + returning - it works !

- remove the very old/never used "postgresql_returning"/"firebird_returning" flags.
2012-12-08 14:25:42 -05:00
Diana Clarke f8caf05593 fixing InstrumentationManager links 2012-12-07 22:42:34 -05:00
Mike Bayer 9d817406e2 The Oracle LONG type, while an unbounded text type, does not appear
to use the cx_Oracle.LOB type when result rows are returned,
so the dialect has been repaired to exclude LONG from
having cx_Oracle.LOB filtering applied.  Also in 0.7.10.
[ticket:2620]
2012-12-06 19:30:49 -05:00
Mike Bayer 8f55656186 merge dance 2012-12-06 19:14:39 -05:00
Mike Bayer af1a545bdd Repaired the usage of `.prepare()` in conjunction with
cx_Oracle so that a return value of ``False`` will result
in no call to ``connection.commit()``, hence avoiding
"no transaction" errors.   Two-phase transactions have
now been shown to work in a rudimental fashion with
SQLAlchemy and cx_oracle, however are subject to caveats
observed with the driver; check the documentation
for details.  Also in 0.7.10.
[ticket:2611]
2012-12-06 19:10:06 -05:00
Diana Clarke 54f45deb97 fixing broken links (see #2625) 2012-12-06 00:00:17 -05:00
Diana Clarke 73f25332b9 fixing broken links (see #2625) 2012-12-05 23:19:24 -05:00
Mike Bayer 850fb33094 changelog 2012-12-03 19:59:05 -05:00
Mike Bayer d89d71d1da The :class:.MutableComposite type did not allow for the
:meth:`.MutableBase.coerce` method to be used, even though
the code seemed to indicate this intent, so this now works
and a brief example is added.  As a side-effect,
the mechanics of this event handler have been changed so that
new :class:`.MutableComposite` types no longer add per-type
global event handlers.  Also in 0.7.10

[ticket:2624]
2012-12-03 19:49:42 -05:00
Mike Bayer c333b68071 whitespace 2012-12-03 19:49:05 -05:00
Mike Bayer 4950b85e83 - BinaryExpression now keeps track of "left" and "right" as passed in,
so that they can be compared in ``__nonzero__`` prior to their
self_group() step.  [ticket:2621]
2012-12-02 12:37:52 -05:00
Mike Bayer b66dad46f3 - refactor of pathing mechanics, to address #2614, #2617
- paths now store Mapper + MapperProperty now instead of string key,
so that the parent mapper for the property is known, supports same-named
properties on multiple subclasses
- the Mapper within the path is now always relevant to the property
to the right of it.  PathRegistry does the translation now, instead
of having all the outside users of PathRegistry worry about it,
to produce a path that is much more consistent.  Paths are now
consistent with mappings in all cases.  Special logic to get at
"with_polymorphic" structures and such added also.
- AliasedClass now has two modes, "use_mapper_path" and regular;
"use_mapper_path" is for all those situations where we put an AliasedClass
in for a plain class internally, and want it to "path" with the
plain mapper.
- The AliasedInsp is now the first class "entity" for an AliasedClass,
and is passed around internally and used as attr._parententity
and such.  it is the AliasedClass analogue for Mapper.
2012-12-01 20:12:23 -05:00
Mike Bayer 65dd01233f Added missing import for "fdb" to the experimental
"firebird+fdb" dialect.  [ticket:2622]
2012-11-29 17:28:56 -05:00
Mike Bayer 1a3383e3fb more warnings 2012-11-28 11:14:58 -05:00
Richard Mitchell 92535b4b57 Allow use of synonyms in primaryjoin / secondaryjoin conditions 2012-11-27 14:03:42 +00:00
Mike Bayer e2697d547e Added a new exception to detect the case where two
subclasses are being loaded using with_polymorphic(),
each subclass contains a relationship attribute of the same
name, and eager loading is being applied to one or both.
This is an ongoing bug which can't be immediately fixed,
so since the results are usually wrong in any case it raises an
exception for now.   0.7 has the same issue, so an exception
raise here probably means the code was returning the wrong
data in 0.7.  [ticket:2614]
2012-11-24 16:14:58 -05:00
Mike Bayer 252bce8b02 merge Audrius HSTORE commits from bitbucket 2012-11-24 10:49:14 -05:00
Mike Bayer 0f0ce7c9b7 - recognize that do_rollback() and do_commit() work with a DBAPI connection,
whereas the other do_rollback_twophase(), savepoint etc. work with
:class:`.Connection`.  the context on these are different as twophase/savepoint
are available at the :class:`.Connection` level, whereas commit/rollback are needed
at a lower level as well.  Rename the argument to "dbapi_connection" when the conneciton
is in fact the DBAPI interface.
- start thinking about being able to track "autocommit" vs. "commit", but not sure
we have a need for this yet.
- have Pool call out to a Dialect for all rollback/commit/close operations now.  Pool
no longer calls DBAPI methods directly.  May use this for a workaround for [ticket:2611]
- add a new Pool event reset() to allow the pool's reset of the connection to be intercepted.
- remove methods in Informix dialect which appear to be hardcoding some isolation
settings on new Transaction only; the isolation API should be implemented for Informix.
also removed "flag" for transaction commit/rollback being not available; this should
be based on server/DBAPI version and we will need someone with test access in order
to help determine how this should work
2012-11-22 23:45:24 -05:00
Audrius Kažukauskas 8134f2d0bf Add special containment operation methods for PG array type 2012-11-20 23:24:34 +02:00
Mike Bayer d1adef463a another hide from 2to3 test 2012-11-18 13:34:25 -05:00
Mike Bayer a1aed312fc comment out PDF for now, it sucks 2012-11-18 12:36:24 -05:00
Mike Bayer 1e29a74bd6 Fixed a gotcha where inadvertently calling list() on a
:class:`.ColumnElement` would go into an endless loop, if
      :meth:`.ColumnOperators.__getitem__` were implemented.
      A new NotImplementedError is emitted via ``__iter__()``.
2012-11-18 10:38:02 -05:00
Mike Bayer 8d9620a046 mutable dict 2012-11-17 23:03:00 -05:00
Mike Bayer cda08307be - hstore documentation, migration
- don't need a custom exception here, just use ValueError
2012-11-17 22:58:23 -05:00
Mike Bayer 713a1d3b24 - add HSTORE
- this was a mistake in mutable
2012-11-17 22:08:14 -05:00
Mike Bayer 50fb37e19e migration doc 2012-11-17 20:46:13 -05:00
Mike Bayer 4356741c48 - hstore adjustments 2012-11-17 20:45:17 -05:00
Mike Bayer 790024f5a3 Reflection support has been added to the Sybase dialect.
Big thanks to Ben Trofatter for all the work developing and
testing this. [ticket:1753]
2012-11-17 11:39:11 -05:00
Idan Kamara 65e66cdf37 docs/orm: spelling fix 2012-11-14 14:35:29 +02:00
Mike Bayer 59f0685290 The :meth:.Connection.connect and :meth:.Connection.contextual_connect
methods now return a "branched" version so that the :meth:`.Connection.close`
method can be called on the returned connection without affecting the
original.   Allows symmetry when using :class:`.Engine` and
:class:`.Connection` objects as context managers.
2012-11-14 01:18:58 -05:00
Mike Bayer 504daf1bc0 Fixed :meth:.MetaData.reflect to correctly use
the given :class:`.Connection`, if given, without
opening a second connection from that connection's
:class:`.Engine`. [ticket:2604]
2012-11-14 00:52:31 -05:00
Mike Bayer 27db59b337 Fixed bug whereby using "key" with Column
in conjunction with "schema" for the owning
Table would fail to locate result rows due
to the MSSQL dialect's "schema rendering"
logic's failure to take .key into account.
Also in 0.7.10. [ticket:2607]
2012-11-13 23:43:31 -05:00
Mike Bayer d2a99b2043 add docs regarding fetchedvalue with primary keys, [ticket:2598] 2012-11-12 16:07:04 -05:00
Mike Bayer 6397a4ff4b Fixed bug in type_coerce() whereby typing information
could be lost if the statement were used as a subquery
inside of another statement, as well as other similar
situations.  Among other things, would cause
typing information to be lost when the Oracle/mssql dialects
would apply limit/offset wrappings. [ticket:2603]
2012-11-12 15:48:40 -05:00
Mike Bayer 9dd08c2eca Fixed regression where query.update() would produce
an error if an object matched by the "fetch"
synchronization strategy wasn't locally present.
Courtesy Scott Torborg. [ticket:2602]
2012-11-12 12:44:42 -05:00
Mike Bayer 607af882c3 Support for reflection of the "name" of primary key
constraints added, courtesy Dave Moore. mssql [ticket:2600]
2012-11-10 15:37:51 -05:00
Mike Bayer d30ab8495c Fixed bug whereby the ".key" of a Column wasn't being
used when producing a "proxy" of the column against
a selectable.   This probably didn't occur in 0.7
since 0.7 doesn't respect the ".key" in a wider
range of scenarios. [ticket:2597]
2012-10-31 14:30:47 -04:00
Mike Bayer f0a9d39634 update the intro 2012-10-31 00:55:43 -04:00
Mike Bayer 5ccc8efa30 improve some autodoc links 2012-10-31 00:41:28 -04:00
Mike Bayer c1f677b04e more of these 2012-10-31 00:17:56 -04:00
Mike Bayer 78b6200557 - i think this is a sphinx bug 2012-10-31 00:17:16 -04:00
Mike Bayer c6f6431e15 - use a better example for relationship annotations
- added missing postgresql ARRAY features
2012-10-31 00:13:00 -04:00
Mike Bayer d2e8b5e36c release date 2012-10-30 19:09:01 -04:00
Mike Bayer 8a1dfd5c1d add in inherited methods to many of these 2012-10-30 16:20:45 -04:00
Mike Bayer 88125742f2 tweaks 2012-10-28 20:07:18 -04:00