Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix feature/dynamodb/expression/condition.go Or documentation #1702

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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