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.

KeyLessThan

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

func KeyLessThan(keyBuilder KeyBuilder, valueBuilder ValueBuilder) KeyConditionBuilder

KeyLessThan returns a KeyConditionBuilder representing the less than clause of the two argument OperandBuilders. The resulting KeyConditionBuilder can be used as a part of other Key Condition Expressions.

Example:

// keyCondition represents the less than clause of the key "foo" and the // value 5 keyCondition := expression.KeyLessThan(expression.Key("foo"), expression.Value(5)) // Used in another Key Condition Expression anotherKeyCondition := expression.Key("partitionKey").Equal(expression.Value("aValue")).And(keyCondition)

Expression Equivalent:

expression.KeyLessThan(expression.Key("foo"), expression.Value(5)) // Let :five be an ExpressionAttributeValue representing the value 5 "foo < :five"

keyBuilder

KeyBuilder represents either the partition key or the sort key, both of which are top level attributes to some item in DynamoDB. Since KeyBuilder represents an operand, KeyBuilder implements the OperandBuilder interface. Methods and functions in the package take KeyBuilder as an argument and establishes relationships between operands. However, KeyBuilder should only be used to describe Key Condition Expressions. KeyBuilder should only be initialized using the function Key().

Example:

// Create a KeyBuilder representing the item key "aKey" keyBuilder := expression.Key("aKey")
valueBuilder

ValueBuilder represents an item attribute value operand and implements the OperandBuilder interface. Methods and functions in the package take ValueBuilder as an argument and establishes relationships between operands. ValueBuilder should only be initialized using the function Value().

Example:

// Create a ValueBuilder representing the string "aValue" valueBuilder := expression.Value("aValue")

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: