Beispiel #1
0
class Node2(Serializable, BaseWithKey):
    a = ListField('a', ValueType.list(ValueType.string))
    _key = StringField('key')
    _id = StringField('id')
    _name = UnicodeField('name')
    data = ListField('data', ValueType.int32)

    @classmethod
    def cls(cls, provider):
        if provider.type == ProviderType.protobuf:
            from mars.serialize.tests.testser_pb2 import Node2Def
            return Node2Def
        return super(Node2, cls).cls(provider)
Beispiel #2
0
class Node5(AttributeAsDict):
    a = StringField('a')
Beispiel #3
0
class Node5(AttributeAsDict):
    a = StringField('a')
    b = SliceField('b')