annotate doc/ZPL.txt @ 3682:193f316dbbe9

More transitive-property support. - Implemented transitive properties in sort and group specs. Sort/group specs can now be lists of specs. - All regression tests except for one metakit backend test related to metakit having no representation of NULL pass - Fixed more PEP 8 whitespace peeves (and probably introduced some new ones :-) - Moved Proptree from support.py to hyperdb.py due to circular import - Moved some proptree-specific methods from Class to Proptree - Added a test for sorting by ids -> should be numeric sort (which now really works for all backends) - Added "required" attribute to all property classes in hyperdb (e.g., String, Link,...), see Feature Requests [SF#539081] -> factored common stuff to _Type. Note that I also converted to a new-style class when I was at it. Bad: The repr changes for new-style classes which made some SQL backends break (!) because the repr of Multilink is used in the schema storage. Fixed the repr to be independent of the class type. - Added get_required_props to Class. Todo: should also automagically make the key property required... - Add a sort_repr method to property classes. This defines the sort-order. Individual backends may use diffent routines if the outcome is the same. This one has a special case for id properties to make the sorting numeric. Using these methods isn't mandatory in backends as long as the sort-order is correct. - Multilink sorting takes orderprop into account. It used to sort by ids. You can restore the old behaviour by specifying id as the orderprop of the Multilink if you really need that. - If somebody specified a Link or Multilink as orderprop, we sort by labelprop of that class -- not transitively by orderprop. I've resited the tempation to implement recursive orderprop here: There could even be loops if several classes specify a Link or Multilink as the orderprop... - Fixed a bug in Metakit-Backend: When sorting by Links, the backend would do a natural join to the Link class. It would rename the "id" attribute before joining but *not* all the other attributes of the joined class. So in one test-case we had a name-clash with priority.name and status.name when sorting *and* grouping by these attributes. Depending on the order of joining this would produce a name-clash with broken sort-results (and broken display if the original class has an attribute that clashes). I'm now doing the sorting of Links in the generic filter method for the metakit backend. I've left the dead code in the metakit-backend since correctly implementing this in the backend will probably be more efficient. - updated doc/design.html with the new docstring of filter.
author Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
date Mon, 21 Aug 2006 12:19:48 +0000
parents c08b3820edd1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1071
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
1 Zope Public License (ZPL) Version 2.0
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
2 -----------------------------------------------
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
3
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
4 This software is Copyright (c) Zope Corporation (tm) and
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
5 Contributors. All rights reserved.
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
6
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
7 This license has been certified as open source. It has also
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
8 been designated as GPL compatible by the Free Software
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
9 Foundation (FSF).
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
10
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
11 Redistribution and use in source and binary forms, with or
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
12 without modification, are permitted provided that the
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
13 following conditions are met:
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
14
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
15 1. Redistributions in source code must retain the above
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
16 copyright notice, this list of conditions, and the following
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
17 disclaimer.
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
18
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
19 2. Redistributions in binary form must reproduce the above
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
20 copyright notice, this list of conditions, and the following
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
21 disclaimer in the documentation and/or other materials
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
22 provided with the distribution.
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
23
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
24 3. The name Zope Corporation (tm) must not be used to
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
25 endorse or promote products derived from this software
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
26 without prior written permission from Zope Corporation.
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
27
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
28 4. The right to distribute this software or to use it for
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
29 any purpose does not give you the right to use Servicemarks
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
30 (sm) or Trademarks (tm) of Zope Corporation. Use of them is
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
31 covered in a separate agreement (see
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
32 http://www.zope.com/Marks).
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
33
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
34 5. If any files are modified, you must cause the modified
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
35 files to carry prominent notices stating that you changed
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
36 the files and the date of any change.
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
37
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
38 Disclaimer
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
39
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
40 THIS SOFTWARE IS PROVIDED BY ZOPE CORPORATION ``AS IS''
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
41 AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
42 NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
43 AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
44 NO EVENT SHALL ZOPE CORPORATION OR ITS CONTRIBUTORS BE
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
45 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
46 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
47 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
48 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
49 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
50 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
51 OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
52 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
53 DAMAGE.
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
54
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
55
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
56 This software consists of contributions made by Zope
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
57 Corporation and many individuals on behalf of Zope
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
58 Corporation. Specific attributions are listed in the
c08b3820edd1 Adhering to ZPL
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
59 accompanying credits file.

Roundup Issue Tracker: http://roundup-tracker.org/