Documentation
¶
Index ¶
- func ConvertFromAttributeValue(av types.AttributeValue, target any) error
- func ConvertToAttributeValue(value any) (types.AttributeValue, error)
- type Builder
- func (b *Builder) AddAdvancedFunction(function string, field string, args ...any) (string, error)
- func (b *Builder) AddConditionExpression(field string, operator string, value any) error
- func (b *Builder) AddFilterCondition(logicalOp, field, operator string, value any) error
- func (b *Builder) AddGroupFilter(logicalOp string, components ExpressionComponents)
- func (b *Builder) AddKeyCondition(field string, operator string, value any) error
- func (b *Builder) AddProjection(fields ...string)
- func (b *Builder) AddUpdateAdd(field string, value any)
- func (b *Builder) AddUpdateDelete(field string, value any)
- func (b *Builder) AddUpdateFunction(field string, function string, args ...any) error
- func (b *Builder) AddUpdateRemove(field string)
- func (b *Builder) AddUpdateSet(field string, value any)
- func (b *Builder) Build() ExpressionComponents
- type ExpressionComponents
- type Marshaler
- type Unmarshaler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertFromAttributeValue ¶
func ConvertFromAttributeValue(av types.AttributeValue, target any) error
ConvertFromAttributeValue converts a DynamoDB AttributeValue to a Go value
func ConvertToAttributeValue ¶
func ConvertToAttributeValue(value any) (types.AttributeValue, error)
ConvertToAttributeValue converts a Go value to a DynamoDB AttributeValue
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder compiles expressions for DynamoDB operations
func (*Builder) AddAdvancedFunction ¶
AddAdvancedFunction adds support for DynamoDB functions
func (*Builder) AddConditionExpression ¶
AddConditionExpression adds a condition for conditional updates
func (*Builder) AddFilterCondition ¶
AddFilterCondition adds a filter condition expression
func (*Builder) AddGroupFilter ¶
func (b *Builder) AddGroupFilter(logicalOp string, components ExpressionComponents)
AddGroupFilter adds a grouped filter expression
func (*Builder) AddKeyCondition ¶
AddKeyCondition adds a key condition expression
func (*Builder) AddProjection ¶
AddProjection adds fields to the projection expression
func (*Builder) AddUpdateAdd ¶
AddUpdateAdd adds an ADD update expression (for numeric increment)
func (*Builder) AddUpdateDelete ¶
AddUpdateDelete adds a DELETE update expression (for removing elements from a set)
func (*Builder) AddUpdateFunction ¶
AddUpdateFunction adds a function-based update expression (e.g., list_append)
func (*Builder) AddUpdateRemove ¶
AddUpdateRemove adds a REMOVE update expression
func (*Builder) AddUpdateSet ¶
AddUpdateSet adds a SET update expression
func (*Builder) Build ¶
func (b *Builder) Build() ExpressionComponents
Build compiles all expressions and returns the final components
type ExpressionComponents ¶
type ExpressionComponents struct {
KeyConditionExpression string
FilterExpression string
ProjectionExpression string
UpdateExpression string
ConditionExpression string
ExpressionAttributeNames map[string]string
ExpressionAttributeValues map[string]types.AttributeValue
}
ExpressionComponents holds all expression components
type Marshaler ¶
type Marshaler interface {
MarshalDynamoDBAttributeValue() (types.AttributeValue, error)
}
Marshaler interface for custom marshaling
type Unmarshaler ¶
type Unmarshaler interface {
UnmarshalDynamoDBAttributeValue(av types.AttributeValue) error
}
Unmarshaler interface for custom unmarshaling