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.

SizeBuilder

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

type SizeBuilder struct { }

SizeBuilder represents the output of the function size ("someName"), which evaluates to the size of the item attribute defined by "someName". Since SizeBuilder represents an operand, SizeBuilder implements the OperandBuilder interface. Methods and functions in the package take SizeBuilder as an argument and establishes relationships between operands. SizeBuilder should only be initialized using the function Size().

Example:

// Create a SizeBuilder representing the size of the item attribute // "aName" sizeBuilder := expression.Name("aName").Size()

Method

Between

func (sb SizeBuilder) Between(lower, upper OperandBuilder) ConditionBuilder

Between returns a ConditionBuilder representing the result of the BETWEEN function in DynamoDB Condition Expressions. The resulting ConditionBuilder can be used as a part of other Condition Expressions or as an argument to the WithCondition() method for the Builder struct.

Example:

// condition represents the condition where the size of the item // attribute "InviteList" is between values 5 and 10 condition := expression.Size(expression.Name("InviteList")).Between(expression.Value(5), expression.Value(10)) // Used in another Condition Expression anotherCondition := expression.Not(condition) // Used to make an Builder builder := expression.NewBuilder().WithCondition(condition)

Expression Equivalent:

expression.Size(expression.Name("InviteList")).Between(expression.Value(5), expression.Value(10)) // Let :five and :ten be ExpressionAttributeValues representing the value // 5 and the value 10 "size (InviteList) BETWEEN :five AND :ten"

BuildOperand

func (sb SizeBuilder) BuildOperand() (Operand, error)

BuildOperand creates an Operand struct which are building blocks to DynamoDB Expressions. Package methods and functions can establish relationships between operands, representing DynamoDB Expressions. The method BuildOperand() is called recursively when the Build() method on the type Builder is called. BuildOperand() should never be called externally. BuildOperand() aliases all strings to avoid stepping over DynamoDB's reserved words. More information on reserved words at https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html

Equal

func (sb SizeBuilder) Equal(right OperandBuilder) ConditionBuilder

Equal returns a ConditionBuilder representing the equality clause of the two argument OperandBuilders. The resulting ConditionBuilder can be used as a part of other Condition Expressions or as an argument to the WithCondition() method for the Builder struct.

Example:

// condition represents the equal clause of the size of the item // attribute "foo" and the value 5 condition := expression.Size(expression.Name("foo")).Equal(expression.Value(5)) // Used in another Condition Expression anotherCondition := expression.Not(condition) // Used to make an Builder builder := expression.NewBuilder().WithCondition(condition)

Expression Equivalent:

expression.Size(expression.Name("foo")).Equal(expression.Value(5)) // Let :five be an ExpressionAttributeValue representing the value 5 "size (foo) = :five"

GreaterThan

func (sb SizeBuilder) GreaterThan(right OperandBuilder) ConditionBuilder

GreaterThan returns a ConditionBuilder representing the greater than clause of the two argument OperandBuilders. The resulting ConditionBuilder can be used as a part of other Condition Expressions or as an argument to the WithCondition() method for the Builder struct.

Example:

// condition represents the greater than clause of the size of the item // attribute "foo" and the value 5 condition := expression.Size(expression.Name("foo")).GreaterThan(expression.Value(5)) // Used in another Condition Expression anotherCondition := expression.Not(condition) // Used to make an Builder builder := expression.NewBuilder().WithCondition(condition)

Expression Equivalent:

expression.Size(expression.Name("foo")).GreaterThan(expression.Value(5)) // Let :five be an ExpressionAttributeValue representing the value 5 "size (foo) > :five"

GreaterThanEqual

func (sb SizeBuilder) GreaterThanEqual(right OperandBuilder) ConditionBuilder

GreaterThanEqual returns a ConditionBuilder representing the greater than equal to clause of the two argument OperandBuilders. The resulting ConditionBuilder can be used as a part of other Condition Expressions or as an argument to the WithCondition() method for the Builder struct.

Example:

// condition represents the greater than equal to clause of the size of // the item attribute "foo" and the value 5 condition := expression.Size(expression.Name("foo")).GreaterThanEqual(expression.Value(5)) // Used in another Condition Expression anotherCondition := expression.Not(condition) // Used to make an Builder builder := expression.NewBuilder().WithCondition(condition)

Expression Equivalent:

expression.Size(expression.Name("foo")).GreaterThanEqual(expression.Value(5)) // Let :five be an ExpressionAttributeValue representing the value 5 "size (foo) >= :five"

In

func (sb SizeBuilder) In(right OperandBuilder, other ...OperandBuilder) ConditionBuilder

In returns a ConditionBuilder representing the result of the IN function in DynamoDB Condition Expressions. The resulting ConditionBuilder can be used as a part of other Condition Expressions or as an argument to the WithCondition() method for the Builder struct.

Example:

// condition represents the condition where the size of the item // attribute "Donuts" is checked against the list of numbers 12, 24, and // 36. condition := expression.Size(expression.Name("Donuts")).In(expression.Value(12), expression.Value(24), expression.Value(36)) // Used in another Condition Expression anotherCondition := expression.Not(condition) // Used to make an Builder builder := expression.NewBuilder().WithCondition(condition)

Expression Equivalent:

expression.Size(expression.Name("Donuts")).In(expression.Value(12), expression.Value(24), expression.Value(36)) // Let :dozen, :twoDozen, :threeDozen be ExpressionAttributeValues // representing the values 12, 24, and 36 respectively "size (Donuts) IN (12, 24, 36)"

LessThan

func (sb SizeBuilder) LessThan(right OperandBuilder) ConditionBuilder

LessThan returns a ConditionBuilder representing the less than clause of the two argument OperandBuilders. The resulting ConditionBuilder can be used as a part of other Condition Expressions or as an argument to the WithCondition() method for the Builder struct.

Example:

// condition represents the less than clause of the size of the item // attribute "foo" and the value 5 condition := expression.Size(expression.Name("foo")).LessThan(expression.Value(5)) // Used in another Condition Expression anotherCondition := expression.Not(condition) // Used to make an Builder builder := expression.NewBuilder().WithCondition(condition)

Expression Equivalent:

expression.Size(expression.Name("foo")).LessThan(expression.Value(5)) // Let :five be an ExpressionAttributeValue representing the value 5 "size (foo) < :five"

LessThanEqual

func (sb SizeBuilder) LessThanEqual(right OperandBuilder) ConditionBuilder

LessThanEqual returns a ConditionBuilder representing the less than equal to clause of the two argument OperandBuilders. The resulting ConditionBuilder can be used as a part of other Condition Expressions or as an argument to the WithCondition() method for the Builder struct.

Example:

// condition represents the less than equal to clause of the size of the // item attribute "foo" and the value 5 condition := expression.Size(expression.Name("foo")).LessThanEqual(expression.Value(5)) // Used in another Condition Expression anotherCondition := expression.Not(condition) // Used to make an Builder builder := expression.NewBuilder().WithCondition(condition)

Expression Equivalent:

expression.Size(expression.Name("foo")).LessThanEqual(expression.Value(5)) // Let :five be an ExpressionAttributeValue representing the value 5 "size (foo) <= :five"

NotEqual

func (sb SizeBuilder) NotEqual(right OperandBuilder) ConditionBuilder

NotEqual returns a ConditionBuilder representing the not equal clause of the two argument OperandBuilders. The resulting ConditionBuilder can be used as a part of other Condition Expressions or as an argument to the WithCondition() method for the Builder struct.

Example:

// condition represents the not equal clause of the size of the item // attribute "foo" and the value 5 condition := expression.Size(expression.Name("foo")).NotEqual(expression.Value(5)) // Used in another Condition Expression anotherCondition := expression.Not(condition) // Used to make an Builder builder := expression.NewBuilder().WithCondition(condition)

Expression Equivalent:

expression.Size(expression.Name("foo")).NotEqual(expression.Value(5)) // Let :five be an ExpressionAttributeValue representing the value 5 "size (foo) <> :five"

On this page: