summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/ext
Commit message (Collapse)AuthorAgeFilesLines
* - apply an import refactoring to the ORM as wellMike Bayer2013-08-143-6/+7
| | | | | | | | | - rework the event system so that event modules load after their targets, dependencies are reversed - create an improved strategy lookup system for the ORM - rework the ORM to have very few import cycles - move out "importlater" to just util.dependency - other tricks to cross-populate modules in as clear a way as possible
* - add event.contains() function to the event package, returns TrueMike Bayer2013-07-261-1/+1
| | | | | if the given target/event/fn is set up to listen. - repair mutable package which is doing some conditional event listening
* tpoMike Bayer2013-07-201-9/+9
|
* - Improved the examples in ``examples/generic_associations``, includingMike Bayer2013-07-192-1/+41
| | | | | | | | | | | | | | | that ``discriminator_on_association.py`` makes use of single table inheritance do the work with the "discriminator". Also added a true "generic foreign key" example, which works similarly to other popular frameworks in that it uses an open-ended integer to point to any other table, foregoing traditional referential integrity. While we don't recommend this pattern, information wants to be free. Also in 0.8.3. - Added a convenience class decorator :func:`.as_declarative`, is a wrapper for :func:`.declarative_base` which allows an existing base class to be applied using a nifty class-decorated approach. Also in 0.8.3.
* Minor hybrid extension documentation updatepr/18David Beitey2013-07-191-2/+2
|
* - Added new method to the :func:`.insert` constructMike Bayer2013-07-051-0/+6
| | | | | | | | | | :meth:`.Insert.from_select`. Given a list of columns and a selectable, renders ``INSERT INTO (table) (columns) SELECT ..``. While this feature is highlighted as part of 0.9 it is also backported to 0.8.3. [ticket:722] - The :func:`.update`, :func:`.insert`, and :func:`.delete` constructs will now interpret ORM entities as FROM clauses to be operated upon, in the same way that select() already does. Also in 0.8.3.
* ORM descriptors such as hybrid properties can now be referencedMike Bayer2013-07-021-10/+12
| | | | | | by name in a string argument used with ``order_by``, ``primaryjoin``, or similar in :func:`.relationship`, in addition to column-bound attributes. [ticket:2761]
* - add a test for pullreq 8Mike Bayer2013-06-231-3/+3
| | | | - simplify
* make tests passpr/8Devi2013-06-201-1/+1
|
* check if compostite_class is of class typeDevi2013-06-191-1/+2
| | | | before checking if it is a subclass of `MutableComposite`
* - rework PropComparator.adapted() to be PropComparator.adapt_to_entity(),Mike Bayer2013-06-171-1/+1
| | | | | | | passes in AliasedInsp and allows more flexibility. - rework the AliasedClass/AliasedInsp relationship so that AliasedInsp has all state and functionality. AliasedClass is just a facade. [ticket:2756]
* Added additional criterion to the ==, != comparators, used withMike Bayer2013-06-081-4/+26
| | | | | | | | | | | | | | | | | | | scalar values, for comparisons to None to also take into account the association record itself being non-present, in addition to the existing test for the scalar endpoint on the association record being NULL. Previously, comparing ``Cls.scalar == None`` would return records for which ``Cls.associated`` were present and ``Cls.associated.scalar`` is None, but not rows for which ``Cls.associated`` is non-present. More significantly, the inverse operation ``Cls.scalar != None`` *would* return ``Cls`` rows for which ``Cls.associated`` was non-present. Additionally, added a special use case where you can call ``Cls.scalar.has()`` with no arguments, when ``Cls.scalar`` is a column-based value - this returns whether or not ``Cls.associated`` has any rows present, regardless of whether or not ``Cls.associated.scalar`` is NULL or not. [ticket:2751]
* Fixed bug where :class:`.MutableDict` didn't report a change eventMike Bayer2013-06-031-0/+4
| | | | | when ``clear()`` was called. [ticket:2730]
* - fix a dict while iterate mutationMike Bayer2013-05-271-1/+1
| | | | | - illustrate how OrderedDict can catch these, but commented out to save function overhead
* clean up some of this collection stuffMike Bayer2013-05-261-18/+12
|
* a pass where we try to squash down as many list()/keys() combinationsMike Bayer2013-05-264-6/+6
| | | | as possible
* do a sweep of some obvious 3kismsMike Bayer2013-05-261-16/+27
|
* Merge branch 'rel_0_9' of bitbucket.org:zzzeek/sqlalchemy into rel_0_9Mike Bayer2013-05-261-1/+1
|\
| * - fixing AbstractConcreteBase import in docstring, 0.9diana2013-05-261-1/+1
| | | | | | branch, [ticket:2717]
* | extension testsMike Bayer2013-05-261-9/+7
| |
* | fix serializer tests. something is wrong with non-C pickle but for some ↵Mike Bayer2013-05-261-19/+2
|/ | | | | | reason py3k's pickle seems to be OK? not sure why that is, as this is all related to http://bugs.python.org/issue998998
* most of ORM passing...Mike Bayer2013-05-041-0/+2
|
* - the raw 2to3 runMike Bayer2013-04-277-50/+52
| | | | - went through examples/ and cleaned out excess list() calls
* fix here, was only failing in the py3k versionMike Bayer2013-04-261-1/+1
|
* Fixes to the ``sqlalchemy.ext.serializer`` extension, includingMike Bayer2013-04-261-2/+3
| | | | | | | that the "id" passed from the pickler is turned into a string to prevent against bytes being parsed on Py3K, as well as that ``relationship()`` and ``orm.join()`` constructs are now properly serialized. [ticket:2698] and some other observed issues.
* Fixed indirect regression regarding :func:`.has_inherited_table`,Mike Bayer2013-04-091-1/+1
| | | | | | | | | | | where since it considers the current class' ``__table__``, was sensitive to when it was called. This is 0.7's behavior also, but in 0.7 things tended to "work out" within events like ``__mapper_args__()``. :func:`.has_inherited_table` now only considers superclasses, so should return the same answer regarding the current class no matter when it's called (obviously assuming the state of the superclass). [ticket:2656]
* this step is not neededMike Bayer2013-02-251-3/+0
|
* formattingMike Bayer2013-02-021-3/+7
|
* clean up ordering list docs, [ticket:2557]Mike Bayer2013-02-021-73/+92
|
* MutableDict.__delitem__ should require only 'key' argumentAudrius Kažukauskas2013-01-171-2/+2
|
* happy new year (see #2645)Diana Clarke2013-01-0112-12/+12
|
* Fixes grammar in docstring.Taavi Burns2012-12-311-1/+1
|
* Extended the :doc:`/core/inspection` system so that all Python descriptorsMike Bayer2012-12-292-4/+48
| | | | | | | | 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`.
* fixing broken links (see #2625)Diana Clarke2012-12-061-5/+6
|
* The :class:`.MutableComposite` type did not allow for theMike Bayer2012-12-031-35/+56
| | | | | | | | | | | :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]
* - refactor of pathing mechanics, to address #2614, #2617Mike Bayer2012-12-011-0/+8
| | | | | | | | | | | | | | | | | | | - 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.
* Allow use of synonyms in primaryjoin / secondaryjoin conditionsRichard Mitchell2012-11-271-2/+5
|
* just a pep8 pass of lib/sqlalchemy/extDiana Clarke2012-11-199-193/+261
|
* just a pep8 pass of lib/sqlalchemy/ext/declarativeDiana Clarke2012-11-194-48/+78
|
* iterate through column_attrs hereMike Bayer2012-11-181-8/+6
|
* - add HSTOREMike Bayer2012-11-171-3/+0
| | | | - this was a mistake in mutable
* - hstore adjustmentsMike Bayer2012-11-171-20/+58
|
* - store only MultipleClassMarkers inside of ModuleMarker, thenMike Bayer2012-10-282-26/+71
| | | | | | store ModuleMarkers for multiple roots, one for each token in a module path. this allows partial path resolution. - docs to this effect
* - fix declarative __init__Mike Bayer2012-10-041-4/+2
|
* - commit Priit Laes docstring fixesMike Bayer2012-09-301-21/+10
| | | | - don't even talk about metadata.bind in declarative
* - [bug] Fixed a disconnect that slowly evolvedMike Bayer2012-09-141-2/+6
| | | | | | | | | | | between a @declared_attr Column and a directly-defined Column on a mixin. In both cases, the Column will be applied to the declared class' table, but not to that of a joined inheritance subclass. Previously, the directly-defined Column would be placed on both the base and the sub table, which isn't typically what's desired. [ticket:2565]
* - [feature] Added a hook to the system of renderingMike Bayer2012-09-091-0/+15
| | | | | | | CREATE TABLE that provides access to the render for each Column individually, by constructing a @compiles function against the new schema.CreateColumn construct. [ticket:2463]
* - [feature] declared_attr can now be used withMike Bayer2012-08-273-9/+91
| | | | | | attributes that are not Column or MapperProperty; including any user-defined value as well as association proxy objects. [ticket:2517]
* - [feature] Conflicts between columns onMike Bayer2012-08-273-7/+121
| | | | | | | single-inheritance declarative subclasses, with or without using a mixin, can be resolved using a new @declared_attr usage described in the documentation. [ticket:2472]
* hybrids: illustrate correlated subqueryMike Bayer2012-08-271-5/+62
|