Revision: 6494 http://trac.macosforge.org/projects/calendarserver/changeset/6494 Author: glyph@apple.com Date: 2010-11-01 14:12:34 -0700 (Mon, 01 Nov 2010) Log Message: ----------- Better docstrings for IAsyncTransaction Modified Paths: -------------- CalendarServer/branches/users/glyph/sharedpool/txdav/idav.py Modified: CalendarServer/branches/users/glyph/sharedpool/txdav/idav.py =================================================================== --- CalendarServer/branches/users/glyph/sharedpool/txdav/idav.py 2010-11-01 21:12:20 UTC (rev 6493) +++ CalendarServer/branches/users/glyph/sharedpool/txdav/idav.py 2010-11-01 21:12:34 UTC (rev 6494) @@ -180,21 +180,41 @@ it is assumed to have been started. """ - def execSQL(sql, args): + def execSQL(sql, args, raiseOnZeroRowCount=None): """ Execute some SQL. + @param sql: an SQL string. + + @type sql: C{str} + + @param args: C{list} of arguments to interpolate into C{sql}. + + @param raiseOnZeroRowCount: a 0-argument callable which returns an + exception to raise if the executed SQL does not affect any rows. + @return: L{Deferred} which fires C{list} of C{tuple} + + @raise: C{raiseOnZeroRowCount} if it was specified and no rows were + affected. """ def commit(): """ + Commit changes caused by this transaction. + + @return: L{Deferred} which fires with C{None} upon successful + completion of this transaction. """ def abort(): """ + Roll back changes caused by this transaction. + + @return: L{Deferred} which fires with C{None} upon successful + rollback of this transaction. """
participants (1)
-
source_changes@macosforge.org