henhal / dynamodb-expressions

Helpers for creating DynamoDB expressions
MIT License
0 stars 0 forks source link

Breaking change: Move Condition.and/or to ConditionSet namespace #1

Closed henhal closed 1 year ago

henhal commented 1 year ago

Change of methods for consistency:

{
  a: 1
  b: Condition.or(2, 3)
  c: Condition.or(4, 5)
}
  => "a = 1 AND (b = 2 OR b = 3) AND (c = 4 OR c = 5)"

The previous use of Condition.or for OR:ing two different condition sets would be

ConditionSet.or({a: 1, b: 2}, {a: 3, b: 4})
  => "(a = 1 AND b = 2) OR (a = 3 AND b = 4)"