Commit Graph

19 Commits

Author SHA1 Message Date
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 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
Mike Bayer cb15ab5775 try to clarify intent some more 2010-02-14 18:39:39 +00:00
Mike Bayer a2a3b701c7 - Changed the beaker cache example a bit to have a separate
RelationCache option for lazyload caching.  This object
does a lookup among any number of potential attributes
more efficiently by grouping several into a common structure.
Both FromCache and RelationCache are simpler individually.
2010-02-12 21:43:19 +00:00
Mike Bayer bf6c88fe23 use issubclass here, allows lazy loads from a subclass to hit a loader that was configured on base 2010-01-21 17:40:41 +00:00
Mike Bayer 40f8aadd58 - mega example cleanup
- 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
2010-01-19 00:53:12 +00:00
Mike Bayer 6e6b13b945 local session caching example 2010-01-13 20:42:09 +00:00
Mike Bayer 2d65e9772d add more examples, start basic 2010-01-13 20:00:25 +00:00
Mike Bayer fccc377417 OK, you can't merge NamedTuples and such. Fine. New query method. 2010-01-12 20:27:32 +00:00
Mike Bayer d309827c75 yes you can even set_value(). I'm using it to prepopulate individual "by_id" elements
from a multiple-row SELECT.
2010-01-12 17:51:28 +00:00
Mike Bayer 7fedc9298a have paths represented as their actual mapper, not the base mapper, allowing
more information for custom mapper opts to see what's going on.  add a new _reduce_path()
function to apply to the path as stored in dictionaries, adds a slight cost overhead.
2010-01-11 20:26:34 +00:00
Mike Bayer 513b350ccc add option to hardcode a cache key 2010-01-11 17:16:59 +00:00
Mike Bayer 7b1631fea1 compare class in the given path with our own class using issubclass, since paths
are always against the base class
2010-01-11 17:12:04 +00:00
Mike Bayer 79e5c5087a memcached wants this 2010-01-11 16:59:16 +00:00
Mike Bayer 01e9a49613 ensure criterion is not None 2010-01-11 16:10:11 +00:00
Mike Bayer f4b143685c - cut down on a few hundred method calls 2010-01-11 03:16:10 +00:00
Mike Bayer b729503a3e - merge() will not issue a needless merge of attributes if the
given instance is the same instance which is already present.

- merge() now also merges the "options" associated with a given
state, i.e. those passed through query.options() which follow
along with an instance, such as options to eagerly- or
lazyily- load various attributes.   This is essential for
the construction of highly integrated caching schemes.  This
is a subtle behavioral change vs. 0.5.

- A bug was fixed regarding the serialization of the "loader
path" present on an instance's state, which is also necessary
when combining the usage of merge() with serialized state
and associated options that should be preserved.

- The "query_cache" examples have been removed, and are replaced
with a fully comprehensive approach that combines the usage of
Beaker with SQLAlchemy.  New query options are used to indicate
the caching characteristics of a particular Query, which
can also be invoked deep within an object graph when lazily
loading related objects.  See /examples/beaker_caching/README.
2010-01-10 21:21:45 +00:00