From 31a1e1435014854a9f855fd5bd60ba689a25bf79 Mon Sep 17 00:00:00 2001 From: bsimpson63 Date: Thu, 4 Apr 2013 22:10:41 -0400 Subject: [PATCH] Update docstring for view_of. --- r2/r2/lib/db/tdb_cassandra.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/r2/r2/lib/db/tdb_cassandra.py b/r2/r2/lib/db/tdb_cassandra.py index e7408994a..6f2bc9203 100644 --- a/r2/r2/lib/db/tdb_cassandra.py +++ b/r2/r2/lib/db/tdb_cassandra.py @@ -831,13 +831,10 @@ class UuidThing(ThingBase): def view_of(cls): """Register a class as a view of a Thing. - Views are expected to implement two methods: - - create - called on relationship creation. takes a thing1, a list - of thing2s and opaque, extra data passed from above. - - delete - called on relationship destruction. takes a thing1, a list - of things2 and opaque. + When a Thing is created or destroyed the appropriate View method must be + called to update the View. This can be done using Thing._on_create() for + general Thing classes or create()/destroy() for DenormalizedRelation + classes. """ def view_of_decorator(view_cls):