INNER CODE UNIT · Python

BaseField

Scille/umongo · src/umongo/abstract.py:74

class BaseField(ma.fields.Field):
    """All fields used in umongo should inherit from this base field.

    ==============================   ===============
    Enabled flags                    resulting index
    ==============================   ===============
    <no flags>
    allow_none
    required
    required, allow_none
    required, unique, allow_none     unique
    unique                           unique, sparse
    unique, required                 unique
    unique, allow_none               unique, sparse
    ==============================   ===============

    .. note:: Even with allow_none flag, the unique flag will refuse duplicated
        `null` value. Consider unsetting the field with `del` instead.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…