Skip to content

Support "omit empty" #28

@lietu

Description

@lietu

Golang firestore library supports the ability to tag fields as omitempty meaning they will not get stored in the DB when not set. This could be done via e.g. combining Optional with a Config option like

class Model(AsyncModel):
  field: Optional[str]
  another: Optional[List[int]]
  # ...
  
  class Config:
    omitempty = "*"
    # or
    omitempty = ["field", "another"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions