summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* this definitely has to go - theres bugs in merge(), serialization whichMike Bayer2010-01-101-176/+0
| | | | | prevent it from being useful. will have a much more comprehensive example in 0.6.
* new example - apply Beaker caching to a relation().Mike Bayer2010-01-081-0/+176
|
* - Fixed a slight inaccuracy in the sharding example.Mike Bayer2009-10-251-1/+7
| | | | | | Comparing equivalence of columns in the ORM is best accomplished using col1.shares_lineage(col2). [ticket:1491]
* Added in Examples into the test suite so they get exercised regularly. ↵Michael Trier2009-07-2720-3/+14
| | | | Cleaned up some deprecation warnings in the examples.
* Cleaned up the deprecation problems with the examples.Michael Trier2009-04-135-7/+7
|
* Lots of fixes to the code examples to specify imports explicitly.Michael Trier2009-03-3124-133/+147
| | | | | | | Explicit imports make it easier for users to understand the examples. Additionally a lot of the examples were fixed to work with the changes in the 0.5.x code base. One small correction to the Case expression. Thanks a bunch to Adam Lowry! Fixes #717.
* - Added "post_configure_attribute" method to InstrumentationManager,Mike Bayer2009-02-111-2/+1
| | | | | so that the "listen_for_events.py" example works again. [ticket:1314]
* - sqlalchemy.sql.expression.Function is now a publicMike Bayer2009-01-021-43/+118
| | | | | | | class. It can be subclassed to provide user-defined SQL functions in an imperative style, including with pre-established behaviors. The postgis.py example illustrates one usage of this.
* - Custom comparator classes used in conjunction withMike Bayer2009-01-021-10/+3
| | | | | | | | | | column_property(), relation() etc. can define new comparison methods on the Comparator, which will become available via __getattr__() on the InstrumentedAttribute. In the case of synonym() or comparable_property(), attributes are resolved first on the user-defined descriptor, then on the user-defined comparator.
* - added an extremely basic illustration of a PostGISMike Bayer2008-12-301-0/+230
| | | | integration to the examples folder.
* - Improved the behavior of aliased() objects such that they moreMike Bayer2008-11-031-3/+2
| | | | | | | | | | | accurately adapt the expressions generated, which helps particularly with self-referential comparisons. [ticket:1171] - Fixed bug involving primaryjoin/secondaryjoin conditions constructed from class-bound attributes (as often occurs when using declarative), which later would be inappropriately aliased by Query, particularly with the various EXISTS based comparators.
* remove erroneous commentsMike Bayer2008-10-242-4/+0
|
* two more cache examplesMike Bayer2008-10-243-3/+145
|
* "nested sets" example. needs work.Mike Bayer2008-09-181-0/+104
|
* synchronize inherited does not need to be called for the full mapper hierarchyMike Bayer2008-09-051-5/+6
|
* - column_property(), composite_property(), and relation() nowMike Bayer2008-09-022-118/+2
| | | | | | | | | | accept a single or list of AttributeExtensions using the "extension" keyword argument. - Added a Validator AttributeExtension, as well as a @validates decorator which is used in a similar fashion as @reconstructor, and marks a method as validating one or more mapped attributes. - removed validate_attributes example, the new methodology replaces it
* - AttributeListener has been refined such that the eventMike Bayer2008-09-022-2/+121
| | | | | | | | | | | | is fired before the mutation actually occurs. Addtionally, the append() and set() methods must now return the given value, which is used as the value to be used in the mutation operation. This allows creation of validating AttributeListeners which raise before the action actually occurs, and which can change the given value into something else before its used. A new example "validate_attributes.py" shows one such recipe for doing this. AttributeListener helper functions are also on the way.
* - add an example illustrating attribute event reception.Mike Bayer2008-08-291-0/+83
|
* Applied .append(x, **kw) removal patch from [ticket:1124] and general cleanup.Jason Kirtland2008-08-151-49/+36
|
* removing this example until further notice (append_result() not an easy road ↵Mike Bayer2008-08-151-244/+0
| | | | to travel)
* fix adjacency list examplesMike Bayer2008-07-142-4/+4
|
* typoGaëtan de Menten2008-07-111-1/+1
|
* update poly_assoc examples for 0.4+ syntaxGaëtan de Menten2008-07-033-50/+50
|
* - fixed up vertical.pyMike Bayer2008-06-281-107/+133
| | | | | | - Fixed query.join() when used in conjunction with a columns-only clause and an SQL-expression ON clause in the join.
* - Query.UpdateDeleteTest.test_delete_fallback fails on mysql due to subquery ↵Mike Bayer2008-06-091-9/+1
| | | | | | | | | | | | | | | | | in DELETE; not sure how to do this exact operation in MySQL - added query_cls keyword argument to sessionmaker(); allows user-defined Query subclasses to be generated by query(). - added @attributes.on_reconstitute decorator, MapperExtension.on_reconstitute, both receieve 'on_load' attribute event allowing non-__init__ dependent instance initialization routines. - push memusage to the top to avoid pointless heisenbugs - renamed '_foostate'/'_fooclass_manager' to '_sa_instance_state'/'_sa_class_manager' - removed legacy instance ORM state accessors - query._get() will use _remove_newly_deleted instead of expunge() on ObjectDeleted, so that transaction rollback restores the previous state - removed MapperExtension.get(); replaced by a user-defined Query subclass - removed needless **kwargs from query.get() - removed Session.get(cls, id); this is redundant against Session.query(cls).get(id) - removed Query.load() and Session.load(); the use case for this method has never been clear, and the same functionality is available in more explicit ways
* make Query._clone() class-agnosticMike Bayer2008-06-021-7/+0
|
* illustrates a simple Query "hook" to implement query caching.Mike Bayer2008-06-021-0/+87
|
* r4695 merged to trunk; trunk now becomes 0.5.Mike Bayer2008-05-092-7/+197
| | | | 0.4 development continues at /sqlalchemy/branches/rel_0_4
* - added an example dynamic_dict/dynamic_dict.py, illustratingMike Bayer2008-05-071-0/+83
| | | | | a simple way to place dictionary behavior on top of a dynamic_loader.
* - Added comparable_property(), adds query Comparator behavior to regular, ↵Jason Kirtland2008-03-171-22/+1
| | | | | | | unmanaged Python properties - Some aspects of MapperProperty initialization are streteched pretty thin now and need a refactor; will proceed with these on the user_defined_state branch
* - Added two new vertical dict mapping examples.Jason Kirtland2008-02-122-0/+533
|
* oof...unicode object still needs to return the value if it just warned...Mike Bayer2007-12-143-24/+24
|
* oof, history on collections were wrong. fixed byroot_tree test as wellMike Bayer2007-12-141-2/+2
|
* - fixed wrong varname in session exception throwMike Bayer2007-12-051-5/+4
| | | | - fixed vertical example to just use a scoped session
* Removed some distractions, ala r3770.Jason Kirtland2007-11-141-64/+87
|
* Removed some distractions.Jason Kirtland2007-11-141-21/+18
|
* - fixes to ShardedSession to work with deferred columns [ticket:771].Mike Bayer2007-09-081-1/+2
| | | | | | | - user-defined shard_chooser() function must accept "clause=None" argument; this is the ClauseElement passed to session.execute(statement) and can be used to determine correct shard id (since execute() doesn't take an instance)
* - got all examples workingMike Bayer2007-09-015-13/+29
| | | | | | | - inline default execution occurs for *all* non-PK columns unconditionally - preexecute only for non-executemany PK cols on PG, Oracle, etc. - new default docs
* Association example updates, round two.Jason Kirtland2007-08-221-10/+15
|
* basic 0.4 updateJason Kirtland2007-08-221-28/+26
|
* Updated adjencytree examplesJason Kirtland2007-08-212-5/+5
|
* - modified SQL operator functions to be module-level operators, allowingMike Bayer2007-08-181-4/+4
| | | | | | | SQL expressions to be pickleable [ticket:735] - small adjustment to mapper class.__init__ to allow for Py2.6 object.__init__() behavior
* needed orm importMike Bayer2007-08-161-0/+1
|
* #725 add query arg to id_chooser()Mike Bayer2007-08-101-1/+1
|
* - added hooks for alternate session classes into sessionmakerMike Bayer2007-08-031-7/+12
| | | | - moved shard example/unittest over to sessionmaker
* small fix for filter() aliasing, upgraded elementtree examples to use 0.4 ↵Mike Bayer2007-08-032-37/+29
| | | | style queries
* Added EXT_CONTINUE and EXT_STOP for MapperExtensions; EXT_PASS is a synonym ↵Jason Kirtland2007-08-011-3/+4
| | | | | | for EXT_CONTINUE. Repointed docs and examples to EXT_CONTINUE
* - merged ants' derived attributes example from 0.4 branchMike Bayer2007-07-271-0/+127
| | | | - disabled PG schema test for now (want to see the buildbot succeed)
* merging 0.4 branch to trunk. see CHANGES for details. 0.3 moves to ↵Mike Bayer2007-07-2719-105/+777
| | | | maintenance branch in branches/rel_0_3.
* - Deprecated DynamicMetaData- use ThreadLocalMetaData or MetaData insteadJason Kirtland2007-07-0614-16/+16
| | | | | - Deprecated BoundMetaData- use MetaData instead - Removed DMD and BMD from documentation