Пример #1
0
class GroovyTestModel2(Vertex):

    element_type = 'groovy_test_model2'

    text = properties.Text()

    get_table_of_models = gremlin.GremlinTable(path='groovy_test_model.groovy', classmethod=True, defaults={'element_type': 'groovy_test_model2'})
Пример #2
0
class DeserializationTestModel(Vertex):
    count = properties.Integer()
    text = properties.Text()

    gremlin_path = 'deserialize.groovy'

    get_map = gremlin.GremlinValue()
    get_list = gremlin.GremlinMethod()
Пример #3
0
class GroovyTestModel(Vertex):
    text = properties.Text()
    get_self = gremlin.GremlinMethod()
    cm_get_self = gremlin.GremlinMethod(method_name='get_self',
                                        classmethod=True)

    return_default = gremlin.GremlinValue(method_name='return_value',
                                          defaults={'val': lambda: 5000})
    return_list = gremlin.GremlinValue(property=1)
    return_value = gremlin.GremlinValue()

    arg_test1 = gremlin.GremlinValue()
    arg_test2 = gremlin.GremlinValue()
Пример #4
0
class TaughtBy(Edge):
    overall_mood = properties.Text(default='Grumpy')
Пример #5
0
class Course(Vertex):
    name = properties.Text()
    credits = properties.Decimal()
Пример #6
0
class Person(Vertex):
    name = properties.Text()
    age = properties.Integer()
Пример #7
0
class BaseAbstractVertex(Vertex):
    __abstract__ = True
    data = properties.Text()
Пример #8
0
 class BadNames(Vertex):
     words = properties.Text()
     content = properties.Text(db_field='words')
Пример #9
0
class AliasedTestModel(Vertex):
    name = properties.Text()
    test_val = properties.Integer(db_field='how_many')
Пример #10
0
class OtherTestModel(Vertex):
    name = properties.Text(default='test_text')
    test_val = properties.Integer(default=3)