예제 #1
0
class Doc(Document):
    __collection__ = 'testdoc'
    e = fields.SimpleEmbeddedDocumentField({
        'i':
        fields.IntegerField(),
        's':
        fields.StringField(default='default value'),
    })
예제 #2
0
class Doc(Document):
    __collection__ = 'testdocs'

    i = fields.IntegerField()
    s = fields.StringField()
    e = fields.EmbeddedDocumentField(EDoc)

    extra_class_value = 'value'
예제 #3
0
class EDoc(EmbeddedDocument):
    i = fields.IntegerField()
    s = fields.StringField()
예제 #4
0
파일: test_queryset.py 프로젝트: nndii/yadm
class Doc(Document):
    __collection__ = 'testdocs'
    i = fields.IntegerField()
    s = fields.StringField()
예제 #5
0
class Doc(Document):
    __collection__ = 'testdocs'
    b = fields.BooleanField()
    i = fields.IntegerField()
    l = fields.ListField(fields.IntegerField())
예제 #6
0
class Doc(Document):
    __collection__ = 'testdoc'
    li = fields.ListField(fields.IntegerField())
예제 #7
0
class Doc(Document):
    __collection__ = 'testdoc'
    s = fields.SetField(fields.IntegerField())
예제 #8
0
 class ETD(EmbeddedDocument):
     i = fields.IntegerField()
예제 #9
0
class Doc(Document):
    __collection__ = 'testdocs'
    i = fields.IntegerField()
    ref = fields.ReferenceField(DocRef)
예제 #10
0
class Doc(Document):
    __collection__ = 'docs'
    i = fields.IntegerField()
예제 #11
0
 class Doc(Document):
     i = fields.IntegerField(smart_null=True)
     s = fields.StringField()
예제 #12
0
 class DocNotObjectIdRef(Document):
     __collection__ = 'testdocs_ref'
     _id = fields.IntegerField()
예제 #13
0
class Doc(Document):
    __collection__ = 'testdoc'
    map = fields.MapField(fields.IntegerField())
예제 #14
0
 class RefDoc(Document):
     __collection__ = 'refs'
     i = fields.IntegerField()
예제 #15
0
class DocCustom(Document):
    __collection__ = 'testdoc'
    map = fields.MapCustomKeysField(fields.IntegerField(), ObjectId)
예제 #16
0
class Doc(Document):
    __collection__ = 'testdocs'
    i = fields.IntegerField()
    b = fields.BooleanField()
예제 #17
0
class RDoc(Document):
    __collection__ = 'testrdocs'
    i = fields.IntegerField()
예제 #18
0
class EDocOne(EmbeddedDocument):
    type = fields.StringField(default='one')
    i = fields.IntegerField()
예제 #19
0
class DocRef(Document):
    __collection__ = 'testdocs_ref'
    i = fields.IntegerField()
예제 #20
0
 class Doc(Document):
     __collection__ = 'testdoc'
     li = fields.ListField(fields.IntegerField(), auto_create=False)
예제 #21
0
class EDoc(EmbeddedDocument):
    id = fields.ObjectIdField(default_gen=True)
    i = fields.IntegerField()
    s = fields.StringField(default='default')
    e = fields.EmbeddedDocumentField('self')
예제 #22
0
 class TestEDoc(EmbeddedDocument):
     i = fields.IntegerField()