Skip to content

0.16.0 - S, SS and Expressions

Compare
Choose a tag to compare
@VianneyMI VianneyMI released this 29 Aug 21:04
· 158 commits to main since this release

New Features

  • Created S object (represents $ sign since it is not a valid variable name in python) to store all MongoDB operators and to create references to fields
  • Created SS object (represents $$) to store aggregation variables and referenes to user variables
  • Interfaced a chunk of new operators(add, divide, multiply, pow, substract, cond, if_null, switch, millisecond, date_from_string, date_to_string, type_)
  • Integrated new operators in Expressions class

Refactoring

  • Redefined Expressions completely. Simplified and clarified how they can be used when using this package.
  • Removed index module that was at the root of the package (monggregate.index.py -> ø)
  • Removed expressions subpackage (monggregate.expression -> ø)
  • Moved expressions fields module to the root of the package (monggregate.expressions.fields.py -> monggregate.fields.py)
  • Removed expressions aggregation_variables module (monggregate.expression.aggregation_variables.py -> ø)
  • Moved the enums that were defined in index to a more relevant place. Ex OperatorEnum is now in monggregate.operators.py

Breaking Changes

  • Operators now return python objects rather than expressions/statements.
    NOTE: The wording might change for clarification purposes.
    statement might be renamed expression and resolve might renamed express
    To do so, some arguments might need to be renamed in the operators
  • Expressions subpackage has been exploded and some parts have been deleted

Documentation

  • Updated readme to reflect changes in the packge. Readme now focuses on the recommended way to use the package and clarifies how to use MongoDB operators.