scan

package
v0.0.0-...-9d7f9ab Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2014 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Overview

Support for the DynamoDB Scan endpoint.

example use:

tests/scan-livestest.go

Index

Constants

View Source
const (
	ENDPOINT_NAME   = "Scan"
	SCAN_ENDPOINT   = aws_const.ENDPOINT_PREFIX + ENDPOINT_NAME
	OP_EQ           = "EQ"
	OP_NE           = "NE"
	OP_LE           = "LE"
	OP_LT           = "LT"
	OP_GE           = "GE"
	OP_GT           = "GT"
	OP_NULL         = "NULL"
	OP_NOT_NULL     = "NOT_NULL"
	OP_CONTAINS     = "CONTAINS"
	OP_NOT_CONTAINS = "NOT_CONTAINS"
	OP_BEGINS_WITH  = "BEGINS_WITH"
	OP_IN           = "IN"
	OP_BETWEEN      = "BETWEEN"
	LIMIT           = 10000 // limit of scan 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

func (ComparisonOperator) MarshalJSON

func (c ComparisonOperator) MarshalJSON() ([]byte, error)

type Request

type Request Scan

func (Request) EndpointReq

func (req Request) EndpointReq() (string, int, error)

EndpointReq implements the Endpoint interface on the local Request type.

func (Request) MarshalJSON

func (r Request) MarshalJSON() ([]byte, error)

type Response

type Response struct {
	Count            uint64
	Items            []ep.Item
	LastEvaluatedKey ep.Item
	ConsumedCapacity ep.ConsumedCapacity
	ScannedCount     uint64
}

func NewResponse

func NewResponse() *Response

NewResponse will return a pointer to an initialized Response struct.

type Scan

type Scan struct {
	AttributesToGet        ep.AttributesToGet
	ExclusiveStartKey      ep.Item
	ReturnConsumedCapacity ep.ReturnConsumedCapacity
	Limit                  ep.NullableUInt64
	ScanFilter             ScanFilters
	Select                 ep.Select
	Segment                ep.NullableUInt64
	TableName              string
	TotalSegments          ep.NullableUInt64
}

func NewScan

func NewScan() *Scan

NewScan returns a pointer to an instantiation of the Scan struct.

func (Scan) EndpointReq

func (s Scan) EndpointReq() (string, int, error)

EndpointReq implements the Endpoint interface.

func (Scan) MarshalJSON

func (s Scan) MarshalJSON() ([]byte, error)

MarshalJSON for Scan types will test the TotalSegments and if they are nonzero, allow the Segment field to be set to zero instead of being null'd, which is the default behavior of both Segment and TotalSegments are defaulted to zero

type ScanFilter

type ScanFilter struct {
	AttributeValueList []ep.AttributeValue
	ComparisonOperator ComparisonOperator
}

type ScanFilters

type ScanFilters map[string]ScanFilter

func (ScanFilters) MarshalJSON

func (s ScanFilters) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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