query

package
Version: v0.0.0-...-1f046af Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2015 License: BSD-2-Clause Imports: 12 Imported by: 0

Documentation

Overview

Support for the DynamoDB Query endpoint.

example use:

tests/query-livestest.go

Index

Constants

View Source
const (
	ENDPOINT_NAME  = "Query"
	QUERY_ENDPOINT = aws_const.ENDPOINT_PREFIX + ENDPOINT_NAME
	OP_EQ          = aws_strings.OP_EQ
	OP_LE          = aws_strings.OP_LE
	OP_LT          = aws_strings.OP_LT
	OP_GE          = aws_strings.OP_GE
	OP_GT          = aws_strings.OP_GT
	OP_BEGINS_WITH = aws_strings.OP_BEGINS_WITH
	OP_BETWEEN     = aws_strings.OP_BETWEEN
	LIMIT          = 10000 // limit of query unless set
)

Variables

This section is empty.

Functions

func ValidOp

func ValidOp(op string) bool

ValidOp determines if an operation is in the approved list.

Types

type ComparisonOperator

type ComparisonOperator string

type KeyCondition

type KeyCondition condition.Condition

type KeyConditions

type KeyConditions condition.Conditions

These are here for backward compatibility

type Query

type Query struct {
	AttributesToGet           attributestoget.AttributesToGet                   `json:",omitempty"`
	ConditionalOperator       string                                            `json:",omitempty"`
	ConsistentRead            bool                                              // false is sane default
	ExclusiveStartKey         attributevalue.AttributeValueMap                  `json:",omitempty"`
	ExpressionAttributeNames  expressionattributenames.ExpressionAttributeNames `json:",omitempty"`
	ExpressionAttributeValues attributevalue.AttributeValueMap                  `json:",omitempty"`
	FilterExpression          string                                            `json:",omitempty"`
	IndexName                 string                                            `json:",omitempty"`
	KeyConditions             condition.Conditions
	Limit                     uint64               `json:",omitempty"`
	ProjectionExpression      string               `json:",omitempty"`
	QueryFilter               condition.Conditions `json:",omitempty"`
	ReturnConsumedCapacity    string               `json:",omitempty"`
	ScanIndexForward          *bool                `json:",omitempty"`
	Select                    string               `json:",omitempty"`
	TableName                 string
}

func NewQuery

func NewQuery() *Query

NewQuery returns a pointer to an instantiation of the Query struct.

func (*Query) EndpointReq

func (query *Query) EndpointReq() ([]byte, int, error)

func (*Query) EndpointReqWithConf

func (query *Query) EndpointReqWithConf(c *conf.AWS_Conf) ([]byte, int, error)

type Request

type Request Query

func (*Request) EndpointReq

func (req *Request) EndpointReq() ([]byte, int, error)

func (*Request) EndpointReqWithConf

func (req *Request) EndpointReqWithConf(c *conf.AWS_Conf) ([]byte, int, error)

type Response

type Response struct {
	ConsumedCapacity *capacity.ConsumedCapacity `json:",omitempty"`
	Count            uint64
	Items            []item.Item                      `json:",omitempty"`
	LastEvaluatedKey attributevalue.AttributeValueMap `json:",omitempty"`
	ScannedCount     uint64                           `json:",omitempty"`
}

func NewResponse

func NewResponse() *Response

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL