[CalendarServer-changes] [8661] CalendarServer/branches/users/glyph/table-alias

source_changes at macosforge.org source_changes at macosforge.org
Mon Feb 13 10:03:55 PST 2012


Revision: 8661
          http://trac.macosforge.org/projects/calendarserver/changeset/8661
Author:   glyph at apple.com
Date:     2012-02-13 10:03:55 -0800 (Mon, 13 Feb 2012)
Log Message:
-----------
Docstring for alias() method.

Modified Paths:
--------------
    CalendarServer/branches/users/glyph/table-alias/twext/enterprise/dal/syntax.py

Property Changed:
----------------
    CalendarServer/branches/users/glyph/table-alias/

Modified: CalendarServer/branches/users/glyph/table-alias/twext/enterprise/dal/syntax.py
===================================================================
--- CalendarServer/branches/users/glyph/table-alias/twext/enterprise/dal/syntax.py	2012-02-13 18:03:52 UTC (rev 8660)
+++ CalendarServer/branches/users/glyph/table-alias/twext/enterprise/dal/syntax.py	2012-02-13 18:03:55 UTC (rev 8661)
@@ -463,6 +463,14 @@
     modelType = Table
 
     def alias(self):
+        """
+        Return an alias for this L{TableSyntax} so that it might be joined
+        against itself.
+
+        As in SQL, C{someTable.join(someTable)} is an error; you can't join a
+        table against itself.  However, C{t = someTable.alias();
+        someTable.join(t)} is usable as a 'from' clause.
+        """
         return TableAlias(self.model)
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120213/9fe2bdb1/attachment.html>


More information about the calendarserver-changes mailing list