Commit Graph

191 Commits

Author SHA1 Message Date
Mike Bayer 3be8746527 add example usage for shard_id in context feature [ticket:2031] 2011-01-23 17:08:57 -05:00
Mike Bayer c9ebe3b723 - rename hybrid.property_, hybrid.method to hybrid_property, hybrid_method. more typing
on the import but this is just clearer.
- adapt dictlike-polymorphic.py to use hybrid.
2011-01-12 15:35:20 -05:00
Mike Bayer 350aed3fdb - whitespace removal bonanza 2011-01-02 14:23:42 -05:00
Mike Bayer 426c4356eb - removes the "on_" prefix. 2010-12-30 14:22:43 -05:00
Mike Bayer b1c90de449 - mutable examples now move into sqlalchemy.ext.mutable
- 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]
2010-12-29 15:04:35 -05:00
Mike Bayer 3b41b66981 - restore mapper.get_property() to use the _props dict. at the moment
synonyms for relationships might just be taken out altogether, since they aren't
documented and are of little use.   a plain proxying descriptor, combined with
attribute-based usage with Query (as opposted to naming it by string)
 can do the same thing more simply.
- add event support to composites, change the model around so that the composite
is generated at the point of load.
- add a recipe for tracking mutations on composites.  will probably make both
of these mutations examples into extensions since they're intricate, should
have a lot of test coverage, and what they need to do is fairly straightforward.
Will use metaclasses so that no extra userland step is needed beyond usage
of the type.
2010-12-28 22:23:13 -05:00
Mike Bayer bfbc0a08f6 - link to the events we use 2010-12-26 17:32:41 -05:00
Mike Bayer 2e58059cbb - docs for mutable events example 2010-12-26 17:28:56 -05:00
Mike Bayer 9c7b004559 - add a new "on mapper configured" event - handy ! 2010-12-25 13:22:12 -05:00
Mike Bayer 6cd730541f - restore declarative support for "composite"
- add an example of mutable scalars with events
2010-12-23 15:27:47 -05:00
Mike Bayer 993af53204 - fix beaker caching example to use new ".callable" param on bind 2010-12-22 11:37:07 -05:00
Mike Bayer 09534eaf9a - merge versioning example fix from 0.6 2010-12-20 10:51:24 -05:00
Mike Bayer 1c67cf5caf - gently push users towards entity name for simple cases 2010-12-07 23:11:47 -05:00
Mike Bayer d30678d18d new calling style: event.listen(target, identifier, fn) 2010-12-01 14:10:11 -05:00
Mike Bayer 61840abbce - NullPool is now used by default for SQLite file-
based databases.  :memory: databases will continue
 to select SingletonThreadPool by default.
 [ticket:1921]
2010-11-28 12:00:01 -05:00
Mike Bayer f1e4718f79 - merge mapper simpler compile branch, [ticket:1966] 2010-11-26 16:28:41 -05:00
Mike Bayer c5442b3adb - merge hybrid attributes branch, [ticket:1903] 2010-11-20 12:55:46 -05:00
Mike Bayer 20ad3b16e8 [ticket:1966] implementation 2010-11-15 19:05:23 -05:00
Mike Bayer f252af2b21 merge tip 2010-11-14 17:54:47 -05:00
Mike Bayer 4e2c0f10cd - merge tip 2010-11-06 11:49:45 -04:00
Mike Bayer bfc0977063 - remove remaining create_session() calls from examples, replace with Session
- replace all flush()/expunge_all() with commit()
2010-10-24 12:42:47 -04:00
Mike Bayer d46985d699 - add instrumentation events
- 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.
2010-10-02 13:31:07 -04:00
Mike Bayer 25c08f6def merge tip 2010-10-02 11:00:22 -04:00
Mike Bayer 25a04d87c3 - optimized_al doesn't need mapper extension
- convert to non-bound metadata, Session, session.commit()
2010-09-24 11:11:12 -04:00
Mike Bayer 3d389b19b7 - reorganization
- 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
2010-09-14 20:43:48 -04:00
Mike Bayer 9d7158a2c3 merge tip 2010-09-14 17:46:54 -04:00
Mike Bayer bc26030e6f - the versioning example works correctly now
if versioning on a col that was formerly
    NULL.
2010-09-05 14:51:00 -04:00
Mike Bayer 7217711f46 - mapper _get_col_to_prop private method used
by the versioning example is deprecated;
now use mapper.get_property_by_column() which
will remain the public method for this.
- turned TODO in the history example into an assertion
with a descriptive reason
2010-09-05 11:28:43 -04:00
Mike Bayer 904466a293 merge latest tip 2010-09-03 18:01:59 -04:00
Mike Bayer 3d439e1801 - a large hill to climb. Added declarative examples to all the
"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 ?!
2010-08-30 20:10:03 -04:00
Mike Bayer 89d43fb86b merge tip 2010-08-27 12:32:20 -04:00
Mike Bayer e104dfff86 add a note 2010-08-25 11:00:35 -04:00
Mike Bayer 7ab906e258 merge from tip 2010-08-24 13:30:51 -04:00
Mike Bayer 42eb686644 - the history_meta versioning recipe sets "unique=False"
when copying columns, so that the versioning
table handles multiple rows with repeating values.
[ticket:1887]
2010-08-23 18:17:31 -04:00
Mike Bayer fb15c61cc0 merge tip 2010-08-14 20:55:47 -04:00
Mike Bayer c14a3651a4 - modernizing examples 2010-08-08 20:58:05 -04:00
Mike Bayer 0daf6e174d modernized the directed graph example 2010-08-08 20:33:32 -04:00
Mike Bayer c2700941f7 - add hybrid extension
- mapper begins to lose awareness of SynonynmProperty, ComparableProperty
2010-08-06 14:29:21 -04:00
Mike Bayer 5b91f627a4 etc 2010-07-21 17:20:41 -04:00
Mike Bayer c6c8a39b87 this would help, right 2010-07-21 16:51:23 -04:00
Mike Bayer 5ab558004c - The beaker_caching example has been reorgnized
such that the Session, cache manager,
declarative_base are part of environment, and
custom cache code is portable and now within
"caching_query.py".  This allows the example to
be easier to "drop in" to existing projects.
2010-07-21 16:19:08 -04:00
Mike Bayer a6b62cc3fe Python-tidy test/engine and test/aaa_profiling, 80% auto + 20% manual intervention 2010-07-11 13:15:51 -04:00
Chris Withers 1114793046 typo 2010-07-08 12:02:20 +01:00
Mike Bayer df1b86bc17 - Updated attribute_shard.py example to use a more robust
method of searching a Query for binary expressions which
compare columns against literal values.
2010-04-02 13:10:55 -04:00
Mike Bayer 51fd344737 - The sqlalchemy.orm.shard module now becomes an extension,
sqlalchemy.ext.horizontal_shard.   The old import
works with a deprecation warning.
2010-03-28 13:12:38 -04:00
Mike Bayer fb766e69bd fix some examples 2010-03-28 12:22:40 -04:00
Mike Bayer c6bceb7775 - converted all lazy=True|False|None to 'select'|'joined'|'noload'
- converted all eager to joined in examples
- fixed beaker/advanced.py to reference RelationshipCache
2010-03-24 19:19:03 -04:00
Mike Bayer 065fcbd9d2 - The official name for the relation() function is now
relationship(), to eliminate confusion over the relational
algebra term.  relation() however will remain available
in equal capacity for the foreseeable future.  [ticket:1740]
2010-03-17 17:48:29 -04:00
Michael Trier 6f1425d04a Cleaned up some long lines to test the commit hooks. 2010-03-07 10:56:11 -05:00
Mike Bayer cb15ab5775 try to clarify intent some more 2010-02-14 18:39:39 +00:00