summaryrefslogtreecommitdiff
path: root/examples/custom_attributes
Commit message (Collapse)AuthorAgeFilesLines
* Add an init_scalar event for attributesMike Bayer2016-06-022-1/+109
| | | | | | | | | This allows us to build default-setting recipes such as one that allows us to actively read column-level defaults. An example suite is also added. Change-Id: I7b022d52cc89526132d5bc4201ac27fea4cf088d Fixes: #1311
* - add a new sphinx extension "viewsource". takes advantage of part of the ↵Mike Bayer2013-11-091-13/+1
| | | | | | | | | viewcode extension to allow ad-hoc display of the source of any file, as well as a "directory listing" structure. - reorganize examples/ to take advantage of new extension. in particular, keep moving all the descriptive text for files etc. into module docstrings, taking more advantage of self-documentation.
* - the raw 2to3 runMike Bayer2013-04-271-1/+1
| | | | - went through examples/ and cleaned out excess list() calls
* modernize some more examplesMike Bayer2013-04-272-5/+6
|
* fixing InstrumentationManager linksDiana Clarke2012-12-071-3/+14
|
* -whitespace bonanza, contdMike Bayer2012-07-281-7/+7
|
* - [moved] The InstrumentationManager interfaceMike Bayer2012-06-241-108/+11
| | | | | | | | | | | | | 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.
* fix a usage issue hereMike Bayer2012-01-281-0/+3
|
* - whitespace removal bonanzaMike Bayer2011-01-022-9/+9
|
* - removes the "on_" prefix.Mike Bayer2010-12-301-4/+4
|
* new calling style: event.listen(target, identifier, fn)Mike Bayer2010-12-011-4/+4
|
* - merge tipMike Bayer2010-11-061-25/+35
|\
| * - remove remaining create_session() calls from examples, replace with SessionMike Bayer2010-10-241-25/+35
| | | | | | | | - replace all flush()/expunge_all() with commit()
* | - add instrumentation eventsMike Bayer2010-10-021-33/+17
| | | | | | | | | | | | | | | | | | - simplify listen_for_events example with new system - add "propagate", "retval", "raw" flags to attribute events. this solves the "return value" issue as well as the "subclass" issue. - begin thinking about event removal. Each listen() method will have a corresponding remove(). Custom listen() methods will have to package all the info onto the event function that is needed to remove its state.
* | - reorganizationMike Bayer2010-09-141-1/+2
|/ | | | | | | - attrbutes.py splits into attribtes.py and instrumentation.py - all the various Event subclasses go into events.py modules - some ideas for orm events - move *Extension out to deprecated_interfaces
* Python-tidy test/engine and test/aaa_profiling, 80% auto + 20% manual ↵Mike Bayer2010-07-111-1/+2
| | | | intervention
* typoChris Withers2010-07-081-1/+1
|
* fix some examplesMike Bayer2010-03-281-3/+3
|
* - The official name for the relation() function is nowMike Bayer2010-03-172-4/+4
| | | | | | relationship(), to eliminate confusion over the relational algebra term. relation() however will remain available in equal capacity for the foreseeable future. [ticket:1740]
* - mega example cleanupMike Bayer2010-01-192-0/+9
| | | | | | - added READMEs to all examples in each __init__.py and added to sphinx documentation - added versioning example - removed vertical/vertical.py, the dictlikes are more straightforward
* Added in Examples into the test suite so they get exercised regularly. ↵Michael Trier2009-07-271-0/+0
| | | | Cleaned up some deprecation warnings in the examples.
* Lots of fixes to the code examples to specify imports explicitly.Michael Trier2009-03-312-8/+10
| | | | | | | 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]
* - 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
|
* r4695 merged to trunk; trunk now becomes 0.5.Mike Bayer2008-05-091-0/+190
0.4 development continues at /sqlalchemy/branches/rel_0_4