Add Cassandra thing _date property for use by JSON templates.

Cassandra things name their date property "date", while tdb_sql things
name it "_date". This property alias allows the existing JSON template
code to access the timestamp without caring about what type of thing it
is.
This commit is contained in:
Max Goodman
2013-03-09 00:21:28 -08:00
parent 0c42fa96c6
commit 59d8c68e94

View File

@@ -790,6 +790,11 @@ class ThingBase(object):
class Thing(ThingBase):
_timestamp_prop = 'date'
# alias _date property for consistency with tdb_sql things.
@property
def _date(self):
return self.date
class UuidThing(ThingBase):
_timestamp_prop = 'date'
_extra_schema_creation_args = {