Пример #1
0
class MultiListParent(tests.UUIDAutoModel):
    children = sheraf.LargeListAttribute(
        sheraf.ModelAttribute("MultiListChild")).index()
Пример #2
0
 class Model(sheraf.Model):
     table = "model_table"
     dummy_attribute = sheraf.ModelAttribute(DummyModel).index(
         unique=True, values=lambda x: {x.val}
     )
Пример #3
0
class Model3k(sheraf.Model):
    table = "model3k_table"
    simple = sheraf.SimpleAttribute(lazy=False)
    obj_indexed = sheraf.ModelAttribute(DummyModel, lazy=False).index(
        unique=True, key="obj", values=lambda x: {x.v})
Пример #4
0
 class Model(tests.UUIDAutoModel):
     models = sheraf.SetAttribute(sheraf.ModelAttribute(AModel))
Пример #5
0
 class Model(tests.UUIDAutoModel):
     submodels = sheraf.ListAttribute(
         sheraf.ModelAttribute(Submodel),
         persistent_type=persistent_type,
     ).index()
Пример #6
0
 class AnotherModel(tests.UUIDAutoModel):
     a_set_for_test = sheraf.SetAttribute(sheraf.ModelAttribute(model))
Пример #7
0
 class Model(tests.UUIDAutoModel):
     submodel = sheraf.ModelAttribute(Submodel1)
Пример #8
0
class SupmodelModule(tests.UUIDAutoModel):
    submodel = sheraf.ModelAttribute("SubmodelModule")
Пример #9
0
 class Model(tests.UUIDAutoModel):
     submodel = sheraf.ModelAttribute((Submodel1, Submodel2)).index()
Пример #10
0
 class _AnotherModel(tests.UUIDAutoModel):
     a_dict_for_test = sheraf.LargeDictAttribute(sheraf.ModelAttribute(AModel))