Skip to content

Commit

Permalink
fix feature/dynamodb/expression/condition.go Or documentation (#1702)
Browse files Browse the repository at this point in the history
Fix the documentation to Or function.
  • Loading branch information
yeehenchen committed May 16, 2022
1 parent a34da05 commit 2fc2c1d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions feature/dynamodb/expression/condition.go
Expand Up @@ -791,8 +791,8 @@ func (cb ConditionBuilder) And(right ConditionBuilder, other ...ConditionBuilder
// Example:
//
// // condition represents the condition where the item attribute "Price" is
// // less than the value 100 OR the item attribute "Rating" is greater than
// // the value 8
// // equal to the value 100 OR the item attribute "Rating" is less than the
// // value 8
// condition := expression.Or(expression.Name("Price").Equal(expression.Value(100)), expression.Name("Rating").LessThan(expression.Value(8)))
//
// // Used in another Condition Expression
Expand All @@ -805,7 +805,7 @@ func (cb ConditionBuilder) And(right ConditionBuilder, other ...ConditionBuilder
// expression.Or(expression.Name("Price").Equal(expression.Value(100)), expression.Name("Rating").LessThan(expression.Value(8)))
// // Let :price and :rating be ExpressionAttributeValues representing the
// // the value 100 and value 8 respectively
// "(Price < :price) OR (Rating > :rating)"
// "(Price = :price) OR (Rating < :rating)"
func Or(left, right ConditionBuilder, other ...ConditionBuilder) ConditionBuilder {
other = append([]ConditionBuilder{left, right}, other...)
return ConditionBuilder{
Expand All @@ -823,8 +823,8 @@ func Or(left, right ConditionBuilder, other ...ConditionBuilder) ConditionBuilde
// Example:
//
// // condition represents the condition where the item attribute "Price" is
// // less than the value 100 OR the item attribute "Rating" is greater than
// // the value 8
// // equal to the value 100 OR the item attribute "Rating" is less than the
// // value 8
// condition := expression.Name("Price").Equal(expression.Value(100)).Or(expression.Name("Rating").LessThan(expression.Value(8)))
//
// // Used in another Condition Expression
Expand All @@ -837,7 +837,7 @@ func Or(left, right ConditionBuilder, other ...ConditionBuilder) ConditionBuilde
// expression.Name("Price").Equal(expression.Value(100)).Or(expression.Name("Rating").LessThan(expression.Value(8)))
// // Let :price and :rating be ExpressionAttributeValues representing the
// // the value 100 and value 8 respectively
// "(Price < :price) OR (Rating > :rating)"
// "(Price = :price) OR (Rating < :rating)"
func (cb ConditionBuilder) Or(right ConditionBuilder, other ...ConditionBuilder) ConditionBuilder {
return Or(cb, right, other...)
}
Expand Down

0 comments on commit 2fc2c1d

Please sign in to comment.