Beispiel #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)
class GroovyTestModel2(Vertex):

    element_type = 'groovy_test_model2'

    text = properties.String()

    get_table_of_models = gremlin.GremlinTable(
        path='groovy_test_model.groovy',
        classmethod=True,
        defaults={'element_type': 'groovy_test_model2'})
Beispiel #3
0
class TestEnumVertexModel2(with_metaclass(EnumVertexBaseMeta, Vertex)):
    name = properties.String(default='test text')
    test_val = properties.Integer(default=0)
Beispiel #4
0
class TestVertexModel2(Vertex):
    name = properties.String(default='test_text')
    test_val = properties.Integer()
Beispiel #5
0
class Course(Vertex):
    name = properties.String()
    credits = properties.Double()
Beispiel #6
0
class BlueprintsWrapperVertex(Vertex):
    element_type = 'blueprints_wrapper_vertex'
    name = properties.String(required=True, max_length=128)
Beispiel #7
0
class BlueprintsWrapperEdge(Edge):
    element_type = 'blueprints_wrapper_edge'
    name = properties.String(required=True, max_length=128)
Beispiel #8
0
class Person(Vertex):
    name = properties.String()
    email = properties.Email()
    url = properties.URL()
    works_for = Relationship(WorksFor, Organization)
    member_of = Relationship(MemberOf, Department)
 class BadNames(Vertex):
     words = properties.String()
     content = properties.String(db_field='words')
class BaseAbstractVertex(Vertex):
    __abstract__ = True
    data = properties.String()
class WildDBNames(Vertex):
    name = properties.String(db_field="words_and_whatnot")
    test_val = properties.Integer(db_field="integers_etc")
Beispiel #12
0
class TaughtBy(Edge):
    overall_mood = properties.String(default='Grumpy')
Beispiel #13
0
class ResearchGroup(Vertex):
    name = properties.String()
Beispiel #14
0
class Organization(Vertex):
    name = properties.String()
    email = properties.Email()
    url = properties.URL()
Beispiel #15
0
class TestFactoryVertex(Vertex):
    element_type = 'test_factory_vertex'

    name = properties.String(required=True, max_length=128)
Beispiel #16
0
class Department(Vertex):
    name = properties.String()
    email = properties.Email()
    url = properties.URL()
    belongs_to = Relationship(BelongsTo, Organization)
Beispiel #17
0
class TestFactoryEdge(Edge):
    label = 'test_factory_edge'

    name = properties.String(required=True, max_length=128)
Beispiel #18
0
def string():
    return properties.String()
Beispiel #19
0
class Person(Vertex):
    name = properties.String()
    age = properties.Integer()