Commit Graph

70 Commits

Author SHA1 Message Date
Mike Bayer 4c19f98651 update example to work with new collections class 2007-06-28 19:26:24 +00:00
Mike Bayer 47c3ce38aa - merged trunk 2629-2730
- fixes to is_select() which is now an important method
- mysql unit tests fixes
2007-06-14 18:37:20 +00:00
Mike Bayer eb3ee48990 added test for testing against "outerjoin" 2007-06-08 15:08:30 +00:00
Mike Bayer 4c13759a95 - added 'fetchmode' capability to deferred polymorphic loading.
can load immediately via second select or via deferred columns.
needs work to reduce complexity and possibly to improve upon unnecessary work
performed by ColumnLoader objects hitting lots of non-existent columns
- would like to add post_exec() step to MapperProperty...but need to devise some way
such that MapperProperty instances can register themselves in the SelectContext as
requiring post_exec....otherwise we add huge method call overhead (and there is too
much already)
- fix to deferred loading so that the attributes loaded by "group" deferred loading
get proper CommittedState
- some refactoring to attributes to support setting attributes as committed
2007-05-23 00:12:01 +00:00
Mike Bayer 8d7a271b86 docs/examples for new with_parent() feature 2007-04-17 18:15:58 +00:00
Mike Bayer dc2d085a75 - Query has add_entity() and add_column() generative methods. these
will add the given mapper/class or ColumnElement to the query at compile
time, and apply them to the instances method.  the user is responsible
for constructing reasonable join conditions (otherwise you can get
full cartesian products).  result set is the list of tuples, non-uniqued.
- fixed multi-mapper instances() to pad out shorter results with None so
zip() gets everything
2007-03-10 03:41:55 +00:00
Mike Bayer 99924c8645 docs: [ticket:345], [ticket:356], [ticket:48], [ticket:403], [ticket:394],
cleanup/completion of keyword arg documentation for create_engine(), mapper(), and
relation()
2007-01-21 00:09:25 +00:00
Mike Bayer ee99f8d58c new collections example 2006-12-12 21:42:13 +00:00
Mike Bayer 226baafe60 pickle example for dmiller 2006-12-09 00:09:14 +00:00
Mike Bayer 6d5786c1c2 docs/examples/unittests for remote_side 2006-12-08 20:50:48 +00:00
Mike Bayer 527626a19a patched **kwargs enhancement for [ticket:361] 2006-11-10 17:17:08 +00:00
Mike Bayer 695f65db85 - added an assertion within the "cascade" step of ORM relationships to check
that the class of object attached to a parent object is appropriate
(i.e. if A.items stores B objects, raise an error if a C is appended to A.items)
- new extension sqlalchemy.ext.associationproxy, provides transparent "association object"
mappings.  new example examples/association/proxied_association.py illustrates.
- some example cleanup
2006-11-03 01:17:28 +00:00
Mike Bayer 266f9f1ebe some example cleanup 2006-11-01 17:14:50 +00:00
Mike Bayer 256cdba4a0 added graphing example 2006-11-01 16:51:46 +00:00
Mike Bayer bc240be3f8 - attributes module and test suite moves underneath 'orm' package
- fixed table comparison example in metadata.txt
- docstrings all over the place
- renamed mapper _getattrbycolumn/_setattrbycolumn to get_attr_by_column,set_attr_by_column
- removed frommapper parameter from populate_instance().  the two operations can be performed separately
- fix to examples/adjacencytree/byroot_tree.py to fire off lazy loaders upon load, to reduce query calling
- added get(), get_by(), load() to MapperExtension
- re-implemented ExtensionOption (called by extension() function)
- redid _ExtensionCarrier to function dynamically based on __getattribute__
- added logging to attributes package, indicating the execution of a lazy callable
- going to close [ticket:329]
2006-10-22 00:24:26 +00:00
Mike Bayer 431149d542 tweak for Table.create() not having a return value 2006-10-21 22:38:40 +00:00
Mike Bayer 6f1eb443a3 - "custom list classes" is now implemented via the "collection_class"
keyword argument to relation().  the old way still works but is
    deprecated [ticket:212]
2006-10-03 23:38:48 +00:00
Mike Bayer d117a15020 - internal refactoring to mapper instances() method to use a
SelectionContext object to track state during the operation.
SLIGHT API BREAKAGE: the append_result() and populate_instances()
methods on MapperExtension have a slightly different method signature
now as a result of the change; hoping that these methods are not
in widespread use as of yet.
2006-09-30 04:40:15 +00:00
Mike Bayer c48177f0fe - unit-of-work does a better check for "orphaned" objects that are
part of a "delete-orphan" cascade, for certain conditions where the
parent isnt available to cascade from.
- it is now invalid to declare a self-referential relationship with
"delete-orphan" (as the abovementioned check would make them impossible
to save)
- improved the check for objects being part of a session when the
unit of work seeks to flush() them as part of a relationship..
2006-08-18 17:21:01 +00:00
Mike Bayer 8f2dddc171 echo=True 2006-07-18 15:13:32 +00:00
Mike Bayer 8005c15159 late compilation of mappers. now you can create mappers in any order, and they will compile their internal state when first used in a query or flush operation (or their props or 'c'/'columns' attributes are used). includes various cleanups and fixes in support of the change, including some unit test changes, additional unit tests. 2006-06-08 16:58:14 +00:00
Mike Bayer f8314ef9ff improvements/fixes to session cascade iteration,
fixes to entity_name propigation
2006-06-05 02:31:53 +00:00
Mike Bayer bb79e2e871 merged 0.2 branch into trunk; 0.1 now in sqlalchemy/branches/rel_0_1 2006-05-25 14:20:23 +00:00
Mike Bayer dbf936c30b added explicit "session" argument to get(), select_whereclause in mapper, as well as throughout the call-chain for those. lazy loader honors the "session" of the parent object, + added simple unit test 2006-04-06 19:01:14 +00:00
Mike Bayer 787484945c put proper return type 2006-04-03 22:48:28 +00:00
Mike Bayer fcace31b88 improved translation of rows when proxying rows from one mapper to another. 2006-03-26 07:21:28 +00:00
Mike Bayer 69246aec95 a cool example that illustrates vertical table storage, and objects that automatically configure themselves for this type of storage 2006-03-26 06:30:21 +00:00
Mike Bayer 34d961cde0 got some support for mapping to a select that only selects some of the columns of an underlying table 2006-03-25 02:25:59 +00:00
Mike Bayer b1deaf1fb7 some more tweaks to get more advanced polymorphic stuff to work 2006-03-24 06:28:27 +00:00
Mike Bayer 865e2aaa19 a few tweaks and the polymorph example can also use eager loading 2006-03-20 01:16:16 +00:00
Mike Bayer 6bb1f8e701 got dilbert to be properly modified.... 2006-03-19 21:12:10 +00:00
Mike Bayer b5060e88ff added 'noninherited table' prop to mapper indicating the "lead" table, in the case of
inheritance.  relations now create priamry/secondary joins against that lead table.  if you want to create it against
an inherited table, use explicit join conditions.
added 'correlate' argument to CompoundSelect to get polymorph example working again.
2006-03-09 00:24:15 +00:00
Mike Bayer 55ad2dc22a added backref() function, allows the creation of a backref where you also send keyword arguments that will be placed on the relation 2006-03-07 03:14:08 +00:00
Mike Bayer 1644a44628 a mapper with inheritance will place itself as "dependent" on the inherited mapper; even though this is not usually needed, it allows certain exotic combinations of mapper setups to work (i.e. the one in the polymorph example) 2006-03-06 03:10:46 +00:00
Mike Bayer a0079b6831 added new 'polymorphic' example. still trying to understand it :) .
fixes to relation to enable it to locate "direction" more consistently with inheritance relationships
more tweaks to parenthesizing subqueries, unions, etc.
2006-03-06 02:27:13 +00:00
Mike Bayer 3227aefc71 deprecated relation(class, table)
changed unit tests/examples to not do it
2006-02-02 23:28:23 +00:00
Mike Bayer 8d7c9349b2 moved tables into examples so basic_tree could be simplified 2006-01-03 00:30:37 +00:00
Mike Bayer b769988c9c column.label is now a function; fix byroot example, add 'default_label' accessor to columnimpl 2006-01-02 05:45:37 +00:00
Mike Bayer 9b93554cc0 updates for assignmapper, inherit_condition not required 2005-12-29 00:42:47 +00:00
Mike Bayer 9ebac6151a added 'deferred' keyword, allowing deferred loading of a particular column 2005-12-21 03:44:46 +00:00
Mike Bayer c02e113df3 fixed tree examples import scheme, tweak to properties import 2005-12-03 06:18:55 +00:00
Mike Bayer 1c26c02a9c mysql engine comment.. 2005-11-27 05:44:20 +00:00
Mike Bayer 3214302aa7 new calling style for sqlite engine 2005-11-12 01:18:17 +00:00
Mike Bayer 51366310ee 2005-10-30 16:54:51 +00:00
Mike Bayer 503ad85018 2005-10-23 18:47:54 +00:00
Mike Bayer cd1ae96e6b 2005-10-23 17:57:28 +00:00
Mike Bayer fcc033fb27 2005-10-23 17:35:16 +00:00
Mike Bayer a1c320a344 2005-10-23 17:31:32 +00:00
Mike Bayer b26158a1c2 2005-10-23 17:12:57 +00:00
Mike Bayer 722f97a826 2005-10-23 03:46:20 +00:00