Commit Graph

7018 Commits

Author SHA1 Message Date
Mike Bayer 2bee05098e callcounts due to more engine event logic 2012-07-19 09:49:36 -04:00
Mike Bayer 3e55ed778b - [feature] Connection event listeners can
now be associated with individual
Connection objects, not just Engine
objects.  [ticket:2511]
2012-07-18 20:23:01 -04:00
Mike Bayer e8ff3047c6 a lot of docs 2012-07-18 19:08:31 -04:00
Mike Bayer 9c0de7fcf7 - with InstanceState more public, underscore all its methods
that change object state as these aren't intended for public
use.
2012-07-18 16:43:02 -04:00
Mike Bayer dff7c2ad2c - document the inspection system 2012-07-18 14:13:18 -04:00
Mike Bayer 643a9afa86 this can be any expression 2012-07-18 12:46:09 -04:00
Mike Bayer 2a0740e22b pep8 2012-07-18 10:38:21 -04:00
Mike Bayer 02ebb49439 - move ext to relative imports 2012-07-17 20:24:14 -04:00
Mike Bayer de115ae406 - a big renaming of all the _Underscore classes to have
plain names.  The old names are still defined for
backwards compatibility.
- _BindParamClause renamed to BindParameter
2012-07-17 20:04:22 -04:00
Mike Bayer 6051636d89 try to get these to pass on jenkins 2012-07-17 12:41:06 -04:00
Mike Bayer aebd6c73ba pypy doesn't seem to decrement __subclasses__(), just skip for now 2012-07-17 12:09:14 -04:00
Mike Bayer c214e436c2 adjust the compat namedtuple to handle subclassing 2012-07-17 12:05:59 -04:00
Mike Bayer 5b2df4215f relax this variance for now 2012-07-17 09:33:52 -04:00
Mike Bayer eaec7fd2b0 try to loosen the times up here to reduce failures due to latency 2012-07-17 09:32:11 -04:00
Mike Bayer e45a4150fd - totally remove _entity_info and _extended_entity_info, replacing all usage
with inspect()
2012-07-16 20:09:38 -04:00
Mike Bayer 7472505874 - justify NamedTuple, now called KeyedTuple
- fix this test
2012-07-16 17:56:53 -04:00
Mike Bayer 8f04c53191 some test fixes and cleanup 2012-07-16 17:37:32 -04:00
Mike Bayer ce9a702dbd - express most of the orm.util functions in terms of the inspection system
- modify inspection system:
	1. raise a new exception for any case where the inspection
        context can't be returned.  this supersedes the "not mapped"
        errors.
        2. don't configure mappers on a mapper inspection.  this allows
        the inspectors to be used during mapper config time.  instead,
        the mapper configures on "with_polymorphic_selectable" now,
        which is needed for all queries
- add a bunch of new "is_XYZ" attributes to inspectors
- finish making the name change of "compile" -> "configure", for some reason
this was only done partially
2012-07-16 17:29:02 -04:00
Mike Bayer 1dc09bf6ed genindex is 100% valid 2012-07-16 11:07:54 -04:00
Mike Bayer fce89ccf0c - [bug] Fixed bug mostly local to new
AbstractConcreteBase helper where the "type"
    attribute from the superclass would not
    be overridden on the subclass to produce the
    "reserved for base" error message, instead placing
    a do-nothing attribute there.  This was inconsistent
    vs. using ConcreteBase as well as all the behavior
    of classical concrete mappings, where the "type"
    column from the polymorphic base would be explicitly
    disabled on subclasses, unless overridden
    explicitly.
2012-07-14 20:33:16 -04:00
Mike Bayer 800efc7525 - [feature] *Very limited* support for
inheriting mappers to be GC'ed when the
    class itself is deferenced.  The mapper
    must not have its own table (i.e.
    single table inh only) without polymorphic
    attributes in place.
    This allows for the use case of
    creating a temporary subclass of a declarative
    mapped class, with no table or mapping
    directives of its own, to be garbage collected
    when dereferenced by a unit test.
    [ticket:2526]
2012-07-14 15:41:31 -04:00
Mike Bayer 6dad6332cd - [feature] The registry of classes
in declarative_base() is now a
    WeakValueDictionary.  So subclasses of
    "Base" that are dereferenced will be
    garbage collected, *if they are not
    referred to by any other mappers/superclass
    mappers*.  [ticket:2526]
2012-07-14 14:24:51 -04:00
Mike Bayer 58adf7b729 - break up configure_property
- fix this test for 2.5
2012-07-14 13:20:46 -04:00
Mike Bayer 9cab0f1f16 move mapper-level UOW functionality straight into unitofwork also. there's
no need for this to be per-mapper.   can't move dependency init
off of property though as this init needs to happen up front, added a test
to prove it.
2012-07-14 12:52:21 -04:00
Mike Bayer 3eaedb38d3 - move load_scalar_attributes out to loading.py 2012-07-14 11:51:11 -04:00
Mike Bayer 0dde519fe1 attempt to fix this test for pypy 2012-07-11 11:35:36 -04:00
Mike Bayer 0e41673ed4 - [bug] Fixed more un-intuitivenesses in CTEs
which prevented referring to a CTE in a union
    of itself without it being aliased.
    CTEs now render uniquely
    on name, rendering the outermost CTE of a given
    name only - all other references are rendered
    just as the name.   This even includes other
    CTE/SELECTs that refer to different versions
    of the same CTE object, such as a SELECT
    or a UNION ALL of that SELECT. We are
    somewhat loosening the usual link between object
    identity and lexical identity in this case.
    A true name conflict between two unrelated
    CTEs now raises an error.
2012-07-10 11:00:49 -04:00
Mike Bayer b297b40fca - [bug] ORM will perform extra effort to determine
that an FK dependency between two tables is
not significant during flush if the tables
are related via joined inheritance and the FK
dependency is not part of the inherit_condition,
saves the user a use_alter directive.
[ticket:2527]
2012-07-05 10:19:59 -04:00
Mike Bayer 838c4eca94 add section on replacing result_processor()/bind_processor() 2012-07-03 19:59:37 -04:00
Mike Bayer 6056d6f446 2.3 is a distant memory 2012-07-03 14:10:39 -04:00
Mike Bayer 4ad163fec6 rework imports here 2012-07-03 14:02:55 -04:00
Mike Bayer 6ff2d2969e except the example was wrong. 2012-07-02 13:56:28 -04:00
Mike Bayer 503592a0d8 - add a nice example about begin_nested as context manager. 2012-07-02 13:08:09 -04:00
Mike Bayer fc747dc844 - this is now ported to 0.7.9 2012-06-30 12:16:24 -04:00
Mike Bayer 45007b9c2e add a section on many-to-many deletes 2012-06-25 16:42:39 -04:00
Mike Bayer 844831c14f notify_all workaround for 2.5 2012-06-25 14:25:36 -04:00
Mike Bayer cdfef65dd6 add 2.5 compat for next() 2012-06-25 14:21:53 -04:00
Mike Bayer a1a58219c2 turn commit_all into an iterative method 2012-06-25 13:12:48 -04:00
Mike Bayer fc7e74101a - pass kw through here 2012-06-25 12:48:00 -04:00
Mike Bayer 5771ae2ebf - move cte tests into their own test/sql/test_cte.py
- rework bindtemplate system of "numbered" params by applying
the numbers last, as we now need to generate these out of order
in some cases
- add positional assertion to assert_compile
- add new cte_positional collection to track bindparams generated
within cte visits; splice this onto the beginning of self.positiontup
at cte render time, [ticket:2521]
2012-06-25 12:42:47 -04:00
Mike Bayer 7b1a1a66cd - change notify to notify_all() so all waiters exit immediately,
continuing [ticket:2522]
2012-06-25 11:15:50 -04:00
Mike Bayer c5f8241006 remove WeakIdentityMapping tests 2012-06-24 02:29:08 -04:00
Mike Bayer 467f7c1e02 - somehting is making this test have an inconsistent callcount 2012-06-24 02:07:43 -04:00
Mike Bayer 319aa982a1 - [moved] The InstrumentationManager interface
and the entire related system of alternate
class implementation is now moved out
to sqlalchemy.ext.instrumentation.   This is
a seldom used system that adds significant
complexity and overhead to the mechanics of
class instrumentation.  The new architecture
allows it to remain unused until
InstrumentationManager is actually imported,
at which point it is bootstrapped into
the core.
2012-06-24 02:06:10 -04:00
Mike Bayer e47f2e03ce 2.5 compat 2012-06-23 15:37:18 -04:00
Mike Bayer ee8b7d3178 - fix this import
- call loading.instances
2012-06-23 14:59:42 -04:00
Mike Bayer 794fa13ce2 - absolute imports in connectors, databases 2012-06-23 14:58:12 -04:00
Mike Bayer 7e86fae937 absolute imports in core, sql 2012-06-23 14:55:28 -04:00
Mike Bayer 0efac1d93e - move all of orm to use absolute imports
- break out key mechanics of loading objects
into new "orm.loading" module, removing implementation
details from both mapper.py and query.py. is analogous
to persistence.py
- some other cleanup and old cruft removal
2012-06-23 14:45:47 -04:00
Mike Bayer df62f4501e - simplify setup_entity and related calls
- break _compile_context() into three methods
2012-06-23 12:39:46 -04:00