summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/ext/sqlsoup.py
Commit message (Collapse)AuthorAgeFilesLines
* - remove sqlsoup [ticket:2262]Mike Bayer2012-04-241-813/+0
| | | | - remove sqlalchemy.exceptions [ticket:2433]
* typos in lib/sqlalchemy/extDiana Clarke2012-03-171-2/+2
|
* sqlsoup is released separatelyMike Bayer2012-01-081-2/+9
|
* fix small update doc issue [ticket:2158]Mike Bayer2012-01-081-1/+1
|
* happy new yearMike Bayer2012-01-041-1/+1
|
* fix a whole bunch of note:: / warning:: that were inline,Mike Bayer2011-12-251-3/+7
| | | | no longer compatible with docutils 0.8
* - SQLSoup will not be included in version 0.8Mike Bayer2011-09-261-0/+5
| | | | | | | | of SQLAlchemy; while useful, we would like to keep SQLAlchemy itself focused on one ORM usage paradigm. SQLSoup will hopefully soon be superseded by a third party project. [ticket:2262]
* - remove some remaining sys.modules shenanigansrel_0_7b1Mike Bayer2011-02-121-1/+1
| | | | | | | | | - The "sqlalchemy.exceptions" alias in sys.modules has been removed. Base SQLA exceptions are available via "from sqlalchemy import exc". The "exceptions" alias for "exc" remains in "sqlalchemy" for now, it's just not patched into sys.modules.
* rename 'frozendict' to 'immutabledict', since 'frozen' implies hashabilityMike Bayer2011-01-201-1/+1
| | | | | like frozenset which isn't really the purpose of 'immutabledict' (could be someday, in which case, we'd change the name back :) )
* - whitespace removal bonanzaMike Bayer2011-01-021-56/+56
|
* - clean up copyright, update for 2011, stamp every file withMike Bayer2011-01-021-0/+6
| | | | | a consistent tag - AUTHORS file
* narrow down cascades in session some moreMike Bayer2010-12-191-2/+3
|
* this is newMike Bayer2010-11-241-0/+2
|
* - SqlSoup overhaulMike Bayer2010-11-241-133/+359
| | | | | | | | | | | | | - Added "map_to()" method to SqlSoup, which is a "master" method which accepts explicit arguments for each aspect of the selectable and mapping, including a base class per mapping. [ticket:1975] - Mapped selectables used with the map(), with_labels(), join() methods no longer put the given argument into the internal "cache" dictionary. Particularly since the join() and select() objects are created in the method itself this was pretty much a pure memory leaking behavior.
* almost through.Mike Bayer2010-09-041-1/+9
|
* - the SqlSoup constructor accepts a `base` argument which specifiesMike Bayer2010-05-081-5/+8
| | | | | the base class to use for mapped classes, the default being `object`. [ticket:1783]
* - The official name for the relation() function is nowMike Bayer2010-03-171-6/+6
| | | | | | relationship(), to eliminate confusion over the relational algebra term. relation() however will remain available in equal capacity for the foreseeable future. [ticket:1740]
* remove __cmp__, move to __lt__ , __eq__ per ↵Mike Bayer2010-02-201-5/+16
| | | | http://docs.python.org/dev/3.0/whatsnew/3.0.html#ordering-comparisons
* send along the sqlsoup engine for encoding purposes.Mike Bayer2010-01-211-6/+7
|
* - ensure correct session usage + testsMike Bayer2010-01-211-5/+5
|
* - sqlsoup objects no longer have the 'query' attribute - it'sMike Bayer2010-01-161-4/+31
| | | | | not needed for sqlsoup's usage paradigm and it gets in the way of a column that is actually named 'query'.
* - added a real unit test for sqlsoupMike Bayer2009-11-091-164/+103
| | | | | | | | | | | - removed doctest stuff - redid session docs for sqlsoup - sqlsoup stays within the transaction of a Session now, is explcitly autocommit=False by default and includes commit()/rollback() methods - sqlsoup db.<sometable>.update() and delete() now call query(cls).update() and delete(), respectively. - sqlsoup now has execute() and connection(), which call upon the Session methods of those names, ensuring that the bind is in terms of the SqlSoup object's bind.
* merge 0.6 series to trunk.Mike Bayer2009-08-061-2/+8
|
* add schema to entity methodJonathan Ellis2009-03-091-2/+5
|
* - Query now implements __clause_element__() which producesMike Bayer2009-01-271-3/+3
| | | | | | | | | | its selectable, which means a Query instance can be accepted in many SQL expressions, including col.in_(query), union(query1, query2), select([foo]).select_from(query), etc. - the __selectable__() interface has been replaced entirely by __clause_element__().
* - The "clear()", "save()", "update()", "save_or_update()"Mike Bayer2009-01-171-2/+5
| | | | | | Session methods have been deprecated, replaced by "expunge_all()" and "add()". "expunge_all()" has also been added to ScopedSession.
* - Concrete inheriting mappers now instrument attributes which are inherited ↵Mike Bayer2009-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from the superclass, but are not defined for the concrete mapper itself, with an InstrumentedAttribute that issues a descriptive error when accessed. [ticket:1237] - Added a new `relation()` keyword `back_populates`. This allows configuation of backreferences using explicit relations. [ticket:781] This is required when creating bidirectional relations between a hierarchy of concrete mappers and another class. [ticket:1237] - Test coverage added for `relation()` objects specified on concrete mappers. [ticket:1237] - A short documentation example added for bidirectional relations specified on concrete mappers. [ticket:1237] - Mappers now instrument class attributes upon construction with the final InstrumentedAttribute object which remains persistent. The `_CompileOnAttr`/`__getattribute__()` methodology has been removed. The net effect is that Column-based mapped class attributes can now be used fully at the class level without invoking a mapper compilation operation, greatly simplifying typical usage patterns within declarative. [ticket:1269] - Index now accepts column-oriented InstrumentedAttributes (i.e. column-based mapped class attributes) as column arguments. [ticket:1214] - Broke up attributes.register_attribute into two separate functions register_descriptor and register_attribute_impl. The first assembles an InstrumentedAttribute or Proxy descriptor, the second assembles the AttributeImpl inside the InstrumentedAttribute. register_attribute remains for outside compatibility. The argument lists have been simplified. - Removed class_manager argument from all but MutableScalarAttributeImpl (the branch had removed class_ as well but this has been reverted locally to support the serializer extension). - Mapper's previous construction of _CompileOnAttr now moves to a new MapperProperty.instrument_class() method which is called on all MapperProperty objects at the moment the mapper receives them. All MapperProperty objects now call attributes.register_descriptor within that method to assemble an InstrumentedAttribute object directly. - InstrumentedAttribute now receives the "property" attribute from the given PropComparator. The guesswork within the constructor is removed, and allows "property" to serve as a mapper compilation trigger. - RelationProperty.Comparator now triggers compilation of its parent mapper within a util.memoized_property accessor for the "property" attribute, which is used instead of "prop" (we can probably remove "prop"). - ColumnProperty and similar handle most of their initialization in their __init__ method since they must function fully at the class level before mappers are compiled. - SynonymProperty and ComparableProperty move their class instrumentation logic to the new instrument_class() method. - LoaderStrategy objects now add their state to existing InstrumentedAttributes using attributes.register_attribute_impl. Both column and relation-based loaders instrument in the same way now, with a unique InstrumentedAttribute *and* a unique AttributeImpl for each class in the hierarchy. attribute.parententity should now be correct in all cases. - Removed unitofwork.register_attribute, and simpified the _register_attribute methods into a single function in strategies.py. unitofwork exports the UOWEventHandler extension directly. - To accomodate the multiple AttributeImpls across a class hierarchy, the sethasparent() method now uses an optional "parent_token" attribute to identify the "parent". AbstractRelationLoader sends the MapperProperty along to serve as this token. If the token isn't present (which is only the case in the attributes unit tests), the AttributeImpl is used instead, which is essentially the same as the old behavior. - Added new ConcreteInheritedProperty MapperProperty. This is invoked for concrete mappers within _adapt_inherited_property() to accomodate concrete mappers which inherit unhandled attributes from the base class, and basically raises an exception upon access. [ticket:1237] - attributes.register_attribute and register_descriptor will now re-instrument an attribute unconditionally without checking for a previous attribute. Not sure if this is controversial. It's needed so that ConcreteInheritedProperty instrumentation can be overridden by an incoming legit MapperProperty without any complexity. - Added new UninstrumentedColumnLoader LoaderStrategy. This is used by the polymorphic_on argument when the given column is not represented within the mapped selectable, as is typical with a concrete scenario which maps to a polymorphic union. It does not configure class instrumentation, keeping polymorphic_on from getting caught up in the new concrete attribute-checking logic. - RelationProperty now records its "backref" attributes using a set assigned to `_reverse_property` instead of a scalar. The `back_populates` keyword allows any number of properties to be involved in a single bidirectional relation. Changes were needed to RelationProperty.merge(), DependencyProcessor to accomodate for the new multiple nature of this attribute. - Generalized the methodology used by ManyToManyDP to check for "did the other dependency already handle this direction", building on the `_reverse_property` collection. - post_update logic within dependency.py moves to use the same methodology as ManyToManyDP so that "did the other dependency do this already" checks are made to be specific to the two dependent instances. - Caught that RelationProperty.merge() was writing to instance.__dict__ directly (!) - repaired to talk to instance_state.dict. - Removed needless eager loading example from concrete mapper docs. - Added test for [ticket:965]. - Added the usual Node class/nodes table to orm/_fixtures.py, but haven't used it for anything yet. We can potentially update test/orm/query.py to use this fixture. - Other test/documentation cleanup.
* allow repr to leave stuff as unicode. I can't think of any reason for the ↵Jonathan Ellis2008-10-291-23/+17
| | | | old behavior except that I didn't understand unicode when I wrote it. Not that I claim to fully understand it now. fixes #1136
* fix #821Jonathan Ellis2008-10-281-0/+3
|
* r/m wildcard imports. fixes #1195Jonathan Ellis2008-10-271-3/+3
|
* And thus ends support for Python 2.3.Jason Kirtland2008-07-151-1/+1
|
* use normal ScopedSession, with autoflush, instead of custom oneJonathan Ellis2008-06-271-26/+8
|
* r4695 merged to trunk; trunk now becomes 0.5.Mike Bayer2008-05-091-10/+24
| | | | 0.4 development continues at /sqlalchemy/branches/rel_0_4
* add relate(), entity() methodsJonathan Ellis2008-03-121-3/+41
|
* `from foo import (name, name)` isn't valid syntax for 2.3. ah well.Jason Kirtland2007-08-211-0/+1
| | | | omitting modules from sqlalchemy.__all__...
* ReST docstring fixJason Kirtland2007-08-191-1/+1
|
* 1. Module layout. sql.py and related move into a package called "sql".Mike Bayer2007-08-181-3/+3
| | | | | | | | | | | | 2. compiler names changed to be less verbose, unused classes removed. 3. Methods on Dialect which return compilers, schema generators, identifier preparers have changed to direct class references, typically on the Dialect class itself or optionally as attributes on an individual Dialect instance if conditional behavior is needed. This takes away the need for Dialect subclasses to know how to instantiate these objects, and also reduces method overhead by one call for each one. 4. as a result of 3., some internal signatures have changed for things like compiler() (now statement_compiler()), preparer(), etc., mostly in that the dialect needs to be passed explicitly as the first argument (since they are just class references now). The compiler() method on Engine and Connection is now also named statement_compiler(), but as before does not take the dialect as an argument. 5. changed _process_row function on RowProxy to be a class reference, cuts out 50K method calls from insertspeed.py
* fix url for 04 docsJonathan Ellis2007-08-081-1/+1
|
* update SS docs to 0.4Jonathan Ellis2007-08-081-52/+35
|
* merging 0.4 branch to trunk. see CHANGES for details. 0.3 moves to ↵Mike Bayer2007-07-271-6/+7
| | | | maintenance branch in branches/rel_0_3.
* - the various "engine" arguments, such as "engine", "connectable",Mike Bayer2007-07-121-2/+3
| | | | | | | | | "engine_or_url", "bind_to", etc. are all present, but deprecated. they all get replaced by the single term "bind". you also set the "bind" of MetaData using metadata.bind = <engine or connection>. this is part of 0.4 forwards compatibility where "bind" is the only keyword. [ticket:631]
* - Deprecated DynamicMetaData- use ThreadLocalMetaData or MetaData insteadJason Kirtland2007-07-061-2/+2
| | | | | - Deprecated BoundMetaData- use MetaData instead - Removed DMD and BMD from documentation
* add a couple expository notes to docs; fix a couple rst buglets. use modern ↵Jonathan Ellis2007-06-011-12/+28
| | | | mapper style (i.e., no need to add it to klass as an attribute).
* - column label and bind param "truncation" also generateMike Bayer2007-03-281-2/+2
| | | | | | | | | | | deterministic names now, based on their ordering within the full statement being compiled. this means the same statement will produce the same string across application restarts and allowing DB query plan caching to work better. - cleanup to sql.ClauseParameters since it was just falling apart, API made more explicit - many unit test tweaks to adjust for bind params not being "pre" truncated, changes to ClauseParameters
* migrated (most) docstrings to pep-257 format, docstring generator using ↵Mike Bayer2007-02-251-79/+135
| | | | | | straight <pre> + trim() func for now. applies most of [ticket:214], compliemnts of Lele Gaifax
* added 'ascii' as default encoding in case getdefaultlocale()[1] comes up ↵Mike Bayer2007-02-041-1/+1
| | | | with None (see [ticket:457])
* justify textJonathan Ellis2007-01-231-8/+9
|
* add example of joining to labeled tableJonathan Ellis2007-01-231-1/+10
|
* split out SelectableClassType from TableClassType, so we don't have to do an ↵Jonathan Ellis2007-01-231-17/+37
| | | | isinstance check for each dml op
* document "Accessing the Session"Jonathan Ellis2007-01-171-1/+16
|