AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

KeyAnd

import "github.com/aws/aws-sdk-go/service/dynamodb/expression"

func KeyAnd(left, right KeyConditionBuilder) KeyConditionBuilder

KeyAnd returns a KeyConditionBuilder representing the logical AND clause of the two argument KeyConditionBuilders. The resulting KeyConditionBuilder can be used as an argument to the WithKeyCondition() method for the Builder struct.

Example:

// keyCondition represents the key condition where the partition key // "TeamName" is equal to value "Wildcats" and sort key "Number" is equal // to value 1 keyCondition := expression.KeyAnd(expression.Key("TeamName").Equal(expression.Value("Wildcats")), expression.Key("Number").Equal(expression.Value(1))) // Used to make an Builder builder := expression.NewBuilder().WithKeyCondition(keyCondition)

Expression Equivalent:

expression.KeyAnd(expression.Key("TeamName").Equal(expression.Value("Wildcats")), expression.Key("Number").Equal(expression.Value(1))) // Let #NUMBER, :teamName, and :one be ExpressionAttributeName and // ExpressionAttributeValues representing the item attribute "Number", // the value "Wildcats", and the value 1 "(TeamName = :teamName) AND (#NUMBER = :one)"

left

KeyConditionBuilder represents Key Condition Expressions in DynamoDB. KeyConditionBuilders are the building blocks of Expressions. More Information at: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Query.html#Query.KeyConditionExpressions

right

KeyConditionBuilder represents Key Condition Expressions in DynamoDB. KeyConditionBuilders are the building blocks of Expressions. More Information at: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Query.html#Query.KeyConditionExpressions

KeyConditionBuilder

KeyConditionBuilder represents Key Condition Expressions in DynamoDB. KeyConditionBuilders are the building blocks of Expressions. More Information at: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Query.html#Query.KeyConditionExpressions

On this page: