示例#1
0
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)
示例#2
0
class DeserializationTestModel(Vertex):
    count = properties.Integer()
    text = properties.Text()

    gremlin_path = 'deserialize.groovy'

    get_maps = gremlin.GremlinValue()
    get_list = gremlin.GremlinMethod()
示例#3
0
def integer():
    return properties.Integer()
示例#4
0
class YetAnotherTestEdge(Edge):
    test_val = properties.Integer(default=2)
示例#5
0
class OtherTestEdge(Edge):
    test_val = properties.Integer(default=1)
示例#6
0
class TestEnumVertexModel2(with_metaclass(EnumVertexBaseMeta, Vertex)):
    name = properties.String(default='test text')
    test_val = properties.Integer(default=0)
示例#7
0
class AliasedTestModel(Vertex):
    name = properties.Text()
    test_val = properties.Integer(db_field='how_many')
示例#8
0
class OtherTestModel(Vertex):
    name = properties.Text(default='test_text')
    test_val = properties.Integer(default=3)
示例#9
0
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")
示例#11
0
class EnrolledIn(Edge):
    date_enrolled = properties.DateTime()
    enthusiasm = properties.Integer(default=5)  # medium, 1-10, 5 by default
示例#12
0
class Person(Vertex):
    name = properties.String()
    age = properties.Integer()
class Person(Vertex):
    name = properties.Text()
    age = properties.Integer()