Commit Graph

2307 Commits

Author SHA1 Message Date
Mike Bayer 26fb4b8163 - Added new helper function :func:.was_deleted, returns True
if the given object was the subject of a :meth:`.Session.delete`
operation.
- An object that's deleted from a session will be de-associated with
that session fully after the transaction is committed, that is
the :func:`.object_session` function will return None.
[ticket:2658]
2013-02-20 18:24:46 -05:00
Mike Bayer 5c2ccaf729 link to flushing 2013-02-18 18:49:09 -05:00
Mike Bayer 83603df51c add a link here 2013-02-18 16:31:18 -05:00
Mike Bayer 124b240fb1 - fix to PDF generation failing totally, latex tools here
are broken but will see if RTD produces a pdf
2013-02-14 15:58:11 -05:00
Mike Bayer ce9d61be9b see also for session commit, rollback 2013-02-11 21:10:55 -05:00
Mike Bayer b6b147c5ec engines 2013-02-09 14:35:36 -05:00
Mike Bayer f28a122a7d start putting "toplevel" back in as interphinx can't link to :doc: 2013-02-09 14:33:52 -05:00
Mike Bayer 22b3181866 The cx_oracle dialect will no longer run the bind parameter names
through ``encode()``, as this is not valid on Python 3, and prevented
statements from functioning correctly on Python 3.  We now
encode only if ``supports_unicode_binds`` is False, which is not
the case for cx_oracle when at least version 5 of cx_oracle is used.
2013-02-08 12:42:36 -05:00
Mike Bayer b6195b1f75 Fixed bug whereby :meth:.Query.yield_per would set the execution
options incorrectly, thereby breaking subsequent usage of the
:meth:`.Query.execution_options` method.  Courtesy Ryan Kelly.
[ticket:2661]
2013-02-08 01:20:41 -05:00
Mike Bayer 30723f75af 0.7.10 release date 2013-02-07 20:06:20 -05:00
Mike Bayer 89ddc328c5 changelog 2013-02-02 21:04:08 -05:00
Mike Bayer f4f3c56cd3 Fixed the consideration of the `between()` operator
so that it works correctly with the new relationship local/remote
system.
[ticket:1768]
2013-02-02 20:48:53 -05:00
Mike Bayer af44efe26e Fixed a bug regarding column annotations which in particular
could impact some usages of the new :func:`.orm.remote` and
:func:`.orm.local` annotation functions, where annotations
could be lost when the column were used in a subsequent
expression.
[ticket:2660]
2013-02-02 20:06:31 -05:00
Mike Bayer a6697a83e5 Added a conditional import to the `gaerdbms` dialect which attempts
to import rdbms_apiproxy vs. rdbms_googleapi to work
on both dev and production platforms.  Also now honors the
``instance`` attribute.  Courtesy Sean Lynch.
[ticket:2649]
2013-02-02 18:40:56 -05:00
Mike Bayer 681a0b1d67 changelog for 0.7 2013-02-02 17:00:54 -05:00
Mike Bayer cb19f227f3 The :meth:.ColumnOperators.in_ operator will now coerce
values of ``None`` to :func:`.null`.
[ticket:2496]
2013-02-02 16:17:58 -05:00
Mike Bayer da3d817f36 Added a new argument to :class:.Enum and its base
:class:`.SchemaType` ``inherit_schema``.  When set to ``True``,
the type will set its ``schema`` attribute of that of the
:class:`.Table` to which it is associated.  This also occurs
during a :meth:`.Table.tometadata` operation; the :class:`.SchemaType`
is now copied in all cases when :meth:`.Table.tometadata` happens,
and if ``inherit_schema=True``, the type will take on the new
schema name passed to the method.   The ``schema`` is important
when used with the Postgresql backend, as the type results in
a ``CREATE TYPE`` statement. [ticket:2657]
2013-02-01 20:47:02 -05:00
Mike Bayer 1c82e1cff7 - documentation for any()/all() 2013-01-28 13:49:18 -05:00
Audrius Kažukauskas dbdf4f25e2 Add ANY/ALL construct support for PostgreSQL's ARRAY type 2013-01-28 19:58:06 +02:00
Mike Bayer e26b28224d Fixed bug where :meth:.Table.tometadata would fail if a
:class:`.Column` had both a foreign key as well as an
alternate ".key" name for the column.   Also in 0.7.10.
[ticket:2643]
2013-01-27 11:23:59 -05:00
Mike Bayer 2cf83604c6 #2629
insert().returning() raises an informative CompileError if attempted
to compile on a dialect that doesn't support RETURNING.
2013-01-25 12:57:59 -05:00
Mike Bayer a477f8a61e the consideration of a pending object as
an "orphan" has been modified to more closely match the
behavior as that of persistent objects, which is that the object
is expunged from the :class:`.Session` as soon as it is
de-associated from any of its orphan-enabled parents.  Previously,
the pending object would be expunged only if de-associated
from all of its orphan-enabled parents.  The new flag ``legacy_is_orphan``
is added to :func:`.orm.mapper` which re-establishes the
legacy behavior. [ticket:2655]
2013-01-24 21:31:23 -05:00
Mike Bayer b1df6fab53 Fixed the (most likely never used) "@collection.link" collection
method, which fires off each time the collection is associated
or de-associated with a mapped object - the decorator
was not tested or functional.  The decorator method
is now named :meth:`.collection.linker` though the name "link"
remains for backwards compatibility.  Courtesy Luca Wehrstedt.
[ticket:2653]
2013-01-21 18:17:10 -05:00
Mike Bayer 2c425c9680 - Made some fixes to the system of producing custom instrumented
collections, mainly that the usage of the @collection decorators
will now honor the __mro__ of the given class, applying the
logic of the sub-most classes' version of a particular collection
method.   Previously, it wasn't predictable when subclassing
an existing instrumented class such as :class:`.MappedCollection`
whether or not custom methods would resolve correctly.
[ticket:2654]

- The undocumented (and hopefully unused) system of producing
custom collections using an ``__instrumentation__`` datastructure
associated with the collection has been removed, as this was a complex
and untested feature which was also essentially redundant versus the
decorator approach.   Other internal simplifcations to the
orm.collections module have been made as well.
2013-01-21 17:57:24 -05:00
Mike Bayer b1a01a6256 - replace mssql_ordering with generalized #695 solution
- documentation for mssql index options plus changelog and fixes
2013-01-20 12:43:39 -05:00
Mike Bayer 7fedf99586 :class:.Index now supports arbitrary SQL expressions and/or
functions, in addition to straight columns.   Common modifiers
include using ``somecolumn.desc()`` for a descending index and
``func.lower(somecolumn)`` for a case-insensitive index, depending on the
capabilities of the target backend.
[ticket:695]
2013-01-16 21:04:32 -05:00
Mike Bayer 46a9209cde Added a py3K conditional around unnecessary .decode()
call in mssql information schema, fixes reflection
in Py3K. Also in 0.7.10. [ticket:2638]
2013-01-12 19:51:13 -05:00
Mike Bayer 576224edd0 - add workaround for sqlite memusage tests, so no longer need to count to 220/skip tests
- Fixed potential memory leak which could occur if an
arbitrary number of :class:`.sessionmaker` objects
were created.   The anonymous subclass created by
the sessionmaker, when dereferenced, would not be garbage
collected due to remaining class-level references from the
event package.  This issue also applies to any custom system
that made use of ad-hoc subclasses in conjunction with
an event dispatcher.  Also in 0.7.10. [ticket:2650]
2013-01-12 17:21:35 -05:00
Mike Bayer 56b1f4c884 - changelog for pullreq 32
- Fixed a regression whereby the "collation" parameter
of the character types CHAR, NCHAR, etc. stopped working,
as "collation" is now supported by the base string types.
The TEXT, NCHAR, CHAR, VARCHAR types within the
MSSQL dialect are now synonyms for the base types.
- move out the type rendering tests into DB-agnostic tests
and remove some of the old "create" statements.  tests here
are still very disorganized.
2013-01-12 12:14:15 -05:00
Mike Bayer 274fec2460 note the change needed to the beaker example also 2013-01-08 11:05:13 -05:00
Mike Bayer 7f3cefeba8 Fixed a regression in the examples/dogpile_caching example
which was due to the change in #2614.
2013-01-08 10:59:26 -05:00
Mike Bayer 06ddce3215 :meth:.Query.merge_result can now load rows from an outer join
where an entity may be ``None`` without throwing an error.
[ticket:2640]
2013-01-08 10:55:46 -05:00
Mike Bayer ac1ee45fcc Tweaked the "REQUIRED" symbol used by the compiler to identify
INSERT/UPDATE bound parameters that need to be passed, so that
it's more easily identifiable when writing custom bind-handling
code. [ticket:2648]
2013-01-08 10:04:55 -05:00
Mike Bayer a94f2f81af Fixed bug in :func:.postgresql.array construct whereby using it
inside of an :func:`.expression.insert` construct would produce an
error regarding a parameter issue in the ``self_group()`` method.
2013-01-02 11:26:37 -05:00
Diana Clarke 14528afd6f happy new year (see #2645) 2013-01-01 19:31:00 -05:00
Diana Clarke 5db55c999f happy new year (see #2645) 2013-01-01 13:46:21 -05:00
Taavi Burns 59f78fbcdc Removes garbage from the end of an example SQL query line. 2012-12-31 00:32:01 -05:00
Taavi Burns 3657f21224 Adjusts example code so it can be successfully pasted into a REPL. 2012-12-31 00:31:43 -05:00
Mike Bayer b30ef87d27 Extended the :doc:/core/inspection system so that all Python descriptors
associated with the ORM or its extensions can be retrieved.
This fulfills the common request of being able to inspect
all :class:`.QueryableAttribute` descriptors in addition to
extension types such as :class:`.hybrid_property` and
:class:`.AssociationProxy`.  See :attr:`.Mapper.all_orm_descriptors`.
2012-12-29 19:31:28 -05:00
Mike Bayer 559b83312c changelog for pullreq 33 2012-12-28 20:45:39 -05:00
Diana Clarke 6691e1a022 fixing typos in the types docs (see #2639) 2012-12-23 18:15:12 -05:00
Diana Clarke 49ff85bfd8 typo in joined table inheritance docs see #2641 2012-12-23 16:13:59 -05:00
Mike Bayer efbbe88705 - revert the full iteration of the collection for a passive history event; that's
the wrong behavior, and for the original #2637 issue we will have to fix the
association proxy, which is #2642
2012-12-22 10:36:55 -05:00
Mike Bayer 3522785ef4 - significantly rework the approach to collection events and history within DynamicAttributeImpl
- Fixes to the "dynamic" loader on :func:`.relationship`, includes
that backrefs will work properly even when autoflush is disabled,
history events are more accurate in scenarios where multiple add/remove
of the same object occurs, as can often be the case in conjunction
with the association proxy.  [ticket:2637]
2012-12-21 17:53:57 -05:00
Diana Clarke 72d4f3e220 docs - missing 'attr' in AssociationProxy join see #2636 2012-12-16 08:01:08 -05:00
Mike Bayer 332560b1fd 0.8.0b2 2012-12-14 15:40:05 -05:00
Mike Bayer 850e881ce2 More adjustment to this SQLite related issue which was released in
0.7.9, to intercept legacy SQLite quoting characters when reflecting
foreign keys.  In addition to intercepting double quotes, other
quoting characters such as brackets, backticks, and single quotes
are now also intercepted. [ticket:2568]
2012-12-14 10:29:46 -05:00
Mike Bayer ce3333a65c The :meth:.Query.select_from method can now be used with a
:func:`.aliased` construct without it interfering with the entities
being selected.  [ticket:2635]
2012-12-13 18:45:15 -05:00
Mike Bayer fbd81de0eb Fixed a regression caused by 🎫2410 whereby a
:class:`.CheckConstraint` would apply itself back to the
original table during a :meth:`.Table.tometadata` operation, as
it would parse the SQL expression for a parent table. The
operation now copies the given expression to correspond to the
new table.
[ticket:2633]
2012-12-11 16:31:41 -05:00
Mike Bayer 70d38af42e Fixed table reflection for Oracle when accessing a synonym that refers
to a DBLINK remote database; while the syntax has been present in the
Oracle dialect for some time, up until now it has never been tested.
The syntax has been tested against a sample database linking to itself,
however there's still some uncertainty as to what should be used for the
"owner" when querying the remote database for table information.
Currently, the value of "username" from user_db_links is used to
match the "owner".  [ticket:2619]
2012-12-09 18:28:08 -05:00