summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/ext
Commit message (Collapse)AuthorAgeFilesLines
* - add QueryContext to load(), refresh()Mike Bayer2010-12-311-2/+2
| | | | | | - add list of attribute names to refresh() - ensure refresh() only called when attributes actually refreshed - tests. [ticket:2011]
* - removes the "on_" prefix.Mike Bayer2010-12-301-17/+17
|
* - mutable examples now move into sqlalchemy.ext.mutableMike Bayer2010-12-291-0/+281
| | | | | | | | | | | - streamline interfaces, get Mutable/MutableComposite to be as minimal in usage as possible - docs for mutable, warnings regrarding mapper events being global - move MutableType/mutable=True outwards, move orm tests to its own module, note in all documentation - still need more events/tests for correct pickling support of composites, mutables. in the case of composites its needed even without mutation. see [ticket:2009]
* - restore declarative support for "composite"Mike Bayer2010-12-231-2/+2
| | | | - add an example of mutable scalars with events
* narrow down cascades in session some moreMike Bayer2010-12-191-2/+3
|
* - clean up the batch insert thingMike Bayer2010-12-111-2/+2
| | | | | | | | | | - add a test for batch inserts - don't need elaborate _inserted_primary_key thing - take some cruft out of ExecutionContext, ResultProxy, EC members can be non-underscored, have mapper just call the EC members for now. - simplify "connection_callable", no need for a "flush_opts" dictionary since this point of expansion is not needed
* - merge default tipMike Bayer2010-12-051-133/+361
|\
| * 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.
* | - add docs for hybridMike Bayer2010-11-281-17/+2
| |
* | - merge metadata/schema/declarative branch, [ticket:1893]Mike Bayer2010-11-201-3/+14
|\ \
| * \ merge tipMike Bayer2010-11-181-0/+4
| |\ \ | | |/
| * | [ticket:1893] implementationMike Bayer2010-11-151-3/+14
| | |
* | | merge tipMike Bayer2010-11-181-0/+4
|\ \ \ | | |/ | |/|
| * | - An error is raised if __table_args__ is not in tupleMike Bayer2010-11-171-0/+4
| |/ | | | | | | or dict format, and is not None. [ticket:1972]
* | merge tipMike Bayer2010-11-141-82/+244
|\ \ | |/
| * - A mixin can now specify a column that overridesMike Bayer2010-10-211-1/+1
| | | | | | | | | | a column of the same name associated with a superclass. Thanks to Oystein Haaland.
| * editMike Bayer2010-10-171-2/+3
| |
| * warn when two classes with the same name end up in the declarative registryChris Withers2010-10-061-0/+7
| |
| * document creating indexes for columns in mixinsChris Withers2010-10-041-0/+75
| |
| * - add additional logic that duplicates mapper's prop.copy(); ↵Mike Bayer2010-10-011-5/+20
| | | | | | | | | | | | | | | | | | prop.columns.append(col) logic when columns are present in a joined subclass with an attribute name different than the column name itself [ticket:1931] - add coverage to verify that we need to check (obj.name or name) when deciding if a Column from a mixin should be added to the mapped table
| * - Fixed bug whereby columns on a mixin wouldn't propagateMike Bayer2010-09-281-3/+6
| | | | | | | | | | | | | | correctly to a single-table inheritance scheme where the attribute name is different than that of the column. [ticket:1930]. Note [ticket:1931] which is the same issue for joined inh, not yet resolved.
| * @mapperproperty -> @declared_attrMike Bayer2010-09-271-31/+31
| |
| * - @classproperty 's official name/location for usageMike Bayer2010-09-251-36/+85
| | | | | | | | | | | | | | with declarative is sqlalchemy.ext.declarative.mapperproperty. Same thing, but moving there since it is more of a "marker" that's specific to declararative, not just an attribute technique. [ticket:1915]
| * make less ficticious ;-)Chris Withers2010-09-241-2/+2
| |
| * - @classproperty (soon/now @mapperproperty) takes effect forMike Bayer2010-09-201-43/+55
| | | | | | | | | | | | __mapper_args__, __table_args__, __tablename__ on a base class that is not a mixin, as well as mixins. [ticket:1922]
| * - fix test_single test to use default dialectMike Bayer2010-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The exception raised by Session when it is used subsequent to a subtransaction rollback (which is what happens when a flush fails in autocommit=False mode) has now been reworded (this is the "inactive due to a rollback in a subtransaction" message). In particular, if the rollback was due to an exception during flush(), the message states this is the case, and reiterates the string form of the original exception that occurred during flush. If the session is closed due to explicit usage of subtransactions (not very common), the message just states this is the case. - The exception raised by Mapper when repeated requests to its initialization are made after initialization already failed no longer assumes the "hasattr" case, since there's other scenarios in which this message gets emitted, and the message also does not compound onto itself multiple times - you get the same message for each attempt at usage. The misnomer "compiles" is being traded out for "initialize".
* | merge tipMike Bayer2010-09-143-1/+13
|\ \ | |/
| * almost through.Mike Bayer2010-09-042-1/+11
| |
| * continued...Mike Bayer2010-09-041-0/+2
| |
* | merge latest tipMike Bayer2010-09-031-2/+5
|\ \ | |/
| * - a large hill to climb. Added declarative examples to all theMike Bayer2010-08-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | "basic relationship" examples, cleaned up the examples and added some more explicitness. Also renamed "treenodes" to "nodes" and added self-referential declarative example. - Added info/examples on how to join tables directly when querying with joined table inheritance. - Starting to talk about hybrids in the main mapper docs some more. introducoed the idea that synonyms are on their way out. - SQL expressions as mapped attributes also gets better verbiage, alternative approaches to them, including hybrids. - modernized the hybrid example. - object_session() as a standalone function wasn't documented ?!
| * - put a link to the wiki table config exampleMike Bayer2010-08-271-1/+3
| |
* | this doesnt actually workMike Bayer2010-08-271-5/+0
| |
* | - hybrid_andMike Bayer2010-08-251-4/+7
| | | | | | | | - move the update_wrapper to synonym for now, we can't assume the return value of hybrid.expr is an updateable wrapper
* | merge tipMike Bayer2010-08-141-1/+1
|\ \ | |/
| * - Another pass through the series of error messagesMike Bayer2010-08-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | emitted when relationship() is configured with ambiguous arguments. The "foreign_keys" setting is no longer mentioned, as it is almost never needed and it is preferable users set up correct ForeignKey metadata, which is now the recommendation. If 'foreign_keys' is used and is incorrect, the message suggests the attribute is probably unnecessary. Docs for the attribute are beefed up. This because all confused relationship() users on the ML appear to be attempting to use foreign_keys due to the message, which only confuses them further since Table metadata is much clearer. - If the "secondary" table has no ForeignKey metadata and no foreign_keys is set, even though the user is passing screwed up information, it is assumed that primary/secondaryjoin expressions should consider only and all cols in "secondary" to be foreign. It's not possible with "secondary" for the foreign keys to be elsewhere in any case. A warning is now emitted instead of an error, and the mapping succeeds. [ticket:1877] - fixed incorrect "Alternate Collection Mappings" reference in the docs, not sure if someone wants to reference "Rows that Point to Themselves" function - "Collection Mapping" is "Advanced Collection Mapping", this section is troublesome since nobody really needs it but it is public API
* | devMike Bayer2010-08-061-14/+9
| |
* | some cleanup, some screwing around with comparators...many more issues coming upMike Bayer2010-08-061-0/+31
| |
* | fix declarativeMike Bayer2010-08-061-3/+4
| |
* | - at long last have gotten the "proxy_property" keywordMike Bayer2010-08-061-4/+7
| | | | | | | | | | | | | | | | arg of register_descriptor to not be needed. synonym, comparable, concreteinherited props now supply a descriptor directly in the class dict, whose __get__(None, cls) supplies a QueryableAttribute. The basic idea is that the hybrid prop can be used for this. Payoff here is arguable, except that hybrid can be at the base of future synonym/comparable operations.
* | - add hybrid extensionMike Bayer2010-08-061-0/+111
|/ | | | - mapper begins to lose awareness of SynonynmProperty, ComparableProperty
* - dont like this noteMike Bayer2010-08-031-15/+15
| | | | | - rewrite this section, also don't talk about extensions anymore since they will be replaced
* fixes, clarifications, removal of misleading statementsMike Bayer2010-08-031-38/+44
|
* - dont like that example, its too much for a section that otherwise isn't soMike Bayer2010-08-031-116/+31
| | | | in depth
* - add an example of declarative with hybrid, including why thisMike Bayer2010-08-021-0/+115
| | | | | is a different use case (i.e. formalized apps vs. quickstart). - solidified docstrings for ForeignKey
* - Fixed bug where "Can't add additional column" messageMike Bayer2010-08-021-1/+2
| | | | would display the wrong name.
* - if @classproperty is used with a regular class-boundMike Bayer2010-08-021-16/+81
| | | | | | | | | | | | | | mapper property attribute, it will be called to get the actual attribute value during initialization. Currently, there's no advantage to using @classproperty on a column or relationship attribute of a declarative class that isn't a mixin - evaluation is at the same time as if @classproperty weren't used. But here we at least allow it to function as expected. - docs for column_property() with declarative - mixin docs in declarative made more clear - mixins are optional - each subsection starts with, "in *declarative mixins*", to reduce confusion
* - worked through about 25% of mappers.rst to implementMike Bayer2010-08-011-0/+2
| | | | | up to date and clear explanations of things, including as much context and description as possible
* - pull out type() ahead of time to cut down on fn calls.Mike Bayer2010-07-131-2/+3
| | | | | | Would replace this with set(dir(self)) but not sure if some class schemes may have issues with dir() (also for low numbers of args, not using the set() probably faster).