コード例 #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
ファイル: __init__.py プロジェクト: yaal-fr/sheraf
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
ファイル: test_model_set.py プロジェクト: yaal-fr/sheraf
 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
ファイル: test_model_set.py プロジェクト: yaal-fr/sheraf
 class AnotherModel(tests.UUIDAutoModel):
     a_set_for_test = sheraf.SetAttribute(sheraf.ModelAttribute(model))
コード例 #7
0
ファイル: test_model.py プロジェクト: yaal-fr/sheraf
 class Model(tests.UUIDAutoModel):
     submodel = sheraf.ModelAttribute(Submodel1)
コード例 #8
0
ファイル: test_model.py プロジェクト: yaal-fr/sheraf
class SupmodelModule(tests.UUIDAutoModel):
    submodel = sheraf.ModelAttribute("SubmodelModule")
コード例 #9
0
ファイル: test_model.py プロジェクト: yaal-fr/sheraf
 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))