class TestEnumVertexModel(with_metaclass(EnumVertexBaseMeta, Vertex)): __enum_id_only__ = False name = properties.String(default='test text') test_val = properties.Integer(default=0) def enum_generator(self): return '%s_%s' % (self.name.replace(' ', '_').upper(), self.test_val)
class DeserializationTestModel(Vertex): count = properties.Integer() text = properties.Text() gremlin_path = 'deserialize.groovy' get_maps = gremlin.GremlinValue() get_list = gremlin.GremlinMethod()
def integer(): return properties.Integer()
class YetAnotherTestEdge(Edge): test_val = properties.Integer(default=2)
class OtherTestEdge(Edge): test_val = properties.Integer(default=1)
class TestEnumVertexModel2(with_metaclass(EnumVertexBaseMeta, Vertex)): name = properties.String(default='test text') test_val = properties.Integer(default=0)
class AliasedTestModel(Vertex): name = properties.Text() test_val = properties.Integer(db_field='how_many')
class OtherTestModel(Vertex): name = properties.Text(default='test_text') test_val = properties.Integer(default=3)
class TestVertexModel2(Vertex): name = properties.String(default='test_text') test_val = properties.Integer()
class WildDBNames(Vertex): name = properties.String(db_field="words_and_whatnot") test_val = properties.Integer(db_field="integers_etc")
class EnrolledIn(Edge): date_enrolled = properties.DateTime() enthusiasm = properties.Integer(default=5) # medium, 1-10, 5 by default
class Person(Vertex): name = properties.String() age = properties.Integer()
class Person(Vertex): name = properties.Text() age = properties.Integer()