class Model_CompressPickle(IndexedRedisModel): FIELDS = [ IRField('name'), IRFieldChain( 'value', [IRPickleField(), IRCompressedField()]), IRFieldChain( 'value2', [IRPickleField(), IRCompressedField()], defaultValue=['a', 'b', 'c']) ] INDEXED_FIELDS = ['name'] KEY_NAME = 'TestIRFieldChain__ModelCompressPickle'
class TestCopyModel_CopyInstance(IndexedRedisModel): FIELDS = [ IRField('name'), IRPickleField('tags'), ] INDEXED_FIELDS = ['name'] KEY_NAME = 'IRTestCopyModel__CopyInstance'
class Model_DifferentFieldProperty1(IndexedRedisModel): FIELDS = [ IRField('name'), IRField('intVal', valueType=bool), IRPickleField('pickledData'), ] INDEXED_FIELDS = ['name'] KEY_NAME = 'TestDiffModels__Model_DifferentFieldProperty1'
class Model_SameFieldsGeneral(IndexedRedisModel): FIELDS = [ IRField('name'), IRField('intVal', valueType=int), IRPickleField('pickledData'), ] INDEXED_FIELDS = ['name'] KEY_NAME = 'TestDiffModels__Model_SameFieldsGeneral1'
class BadModel1(IndexedRedisModel): FIELDS = [ IRField('name'), IRFieldChain( 'value', [IRPickleField(), IRCompressedField()]) ] INDEXED_FIELDS = ['name', 'value'] KEY_NAME = 'TestIRFieldChain__BadModel1'
class MyPickleModel(IndexedRedisModel): FIELDS = [ \ IRField('name'), IRPickleField('timestamp'), ] INDEXED_FIELDS = [ \ 'name', # 'timestamp', ] KEY_NAME = 'MyPickleModel'
class SimpleIRFieldModel(IndexedRedisModel): FIELDS = [ IRField('name'), IRPickleField('data') ] INDEXED_FIELDS = ['name'] KEY_NAME = 'Test_SimpleIRPickleFieldModel'