aws-0.24.4: Amazon Web Services (AWS) for Haskell

Copyright | Soostone Inc
License | BSD3
Maintainer | Ozgun Ataman <ozgun.ataman@soostone.com>
Stability | experimental
Safe Haskell | None
Language | Haskell2010

Aws.DynamoDb.Commands.Query

Description

Implementation of Amazon DynamoDb Query command.

See: `http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Query.html`

Synopsis

- data Query = Query {
  - qTableName :: Text
  - qKeyConditions :: Slice
  - qFilter :: Conditions
  - qStartKey :: Maybe [Attribute]
  - qLimit :: Maybe Int
  - qForwardScan :: Bool
  - qSelect :: QuerySelect
  - qRetCons :: ReturnConsumption
  - qIndex :: Maybe Text
  - qConsistent :: Bool
  }
- data Slice = Slice {
  - sliceHash :: Attribute
  - sliceCond :: Maybe Condition
  }
- query :: Text -> Slice -> Query
- data QueryResponse = QueryResponse {
  - qrItems :: Vector Item
  - qrLastKey :: Maybe [Attribute]
  - qrCount :: Int
  - qrScanned :: Int
  - qrConsumed :: Maybe ConsumedCapacity
  }

# Documentation

data Query #

A Query command that uses primary keys for an expedient scan.

Constructors

Query |
Fields qTableName :: Text Required. qKeyConditions :: Slice Required. Hash or hash-range main condition. qFilter :: Conditions Whether to filter results before returning to client qStartKey :: Maybe [Attribute] Exclusive start key to resume a previous query. qLimit :: Maybe Int Whether to limit result set size qForwardScan :: Bool Set to False for descending results qSelect :: QuerySelect What to return from `Query` qRetCons :: ReturnConsumption qIndex :: Maybe Text Whether to use a secondary/global index qConsistent :: Bool

#### Instances

Instances details

ToJSON Query # |
Instance details Defined in Aws.DynamoDb.Commands.Query Methods toJSON :: Query -> Value # toEncoding :: Query -> Encoding # toJSONList :: [Query] -> Value # toEncodingList :: [Query] -> Encoding # omitField :: Query -> Bool #
SignQuery Query # |
Instance details Defined in Aws.DynamoDb.Commands.Query Associated Types
type ServiceConfiguration Query |
Instance details Defined in Aws.DynamoDb.Commands.Query type ServiceConfiguration Query = DdbConfiguration
Methods signQuery :: Query -> ServiceConfiguration Query queryType -> SignatureData -> SignedQuery #
Read Query # |
Instance details Defined in Aws.DynamoDb.Commands.Query Methods readsPrec :: Int -> ReadS Query # readList :: ReadS [Query] # readPrec :: ReadPrec Query # readListPrec :: ReadPrec [Query] #
Show Query # |
Instance details Defined in Aws.DynamoDb.Commands.Query Methods showsPrec :: Int -> Query -> ShowS # show :: Query -> String # showList :: [Query] -> ShowS #
Eq Query # |
Instance details Defined in Aws.DynamoDb.Commands.Query Methods (==) :: Query -> Query -> Bool # (/=) :: Query -> Query -> Bool #
Ord Query # |
Instance details Defined in Aws.DynamoDb.Commands.Query Methods compare :: Query -> Query -> Ordering # (<) :: Query -> Query -> Bool # (<=) :: Query -> Query -> Bool # (>) :: Query -> Query -> Bool # (>=) :: Query -> Query -> Bool # max :: Query -> Query -> Query # min :: Query -> Query -> Query #
IteratedTransaction Query QueryResponse # |
Instance details Defined in Aws.DynamoDb.Commands.Query Methods nextIteratedRequest :: Query -> QueryResponse -> Maybe Query #
Transaction Query QueryResponse # |
Instance details Defined in Aws.DynamoDb.Commands.Query
type ServiceConfiguration Query # |
Instance details Defined in Aws.DynamoDb.Commands.Query type ServiceConfiguration Query = DdbConfiguration

data Slice #

`Slice` is the primary constraint in a `Query` command, per AWS requirements.

All `Query` commands must specify a hash attribute via `DEq` and optionally provide a secondary range attribute.

Constructors

Slice |
Fields sliceHash :: Attribute Hash value of the primary key or index being used sliceCond :: Maybe Condition An optional condition specified on the range component, if present, of the primary key or index being used.

#### Instances

Instances details

Read Slice # |
Instance details Defined in Aws.DynamoDb.Commands.Query Methods readsPrec :: Int -> ReadS Slice # readList :: ReadS [Slice] # readPrec :: ReadPrec Slice # readListPrec :: ReadPrec [Slice] #
Show Slice # |
Instance details Defined in Aws.DynamoDb.Commands.Query Methods showsPrec :: Int -> Slice -> ShowS # show :: Slice -> String # showList :: [Slice] -> ShowS #
Eq Slice # |
Instance details Defined in Aws.DynamoDb.Commands.Query Methods (==) :: Slice -> Slice -> Bool # (/=) :: Slice -> Slice -> Bool #
Ord Slice # |
Instance details Defined in Aws.DynamoDb.Commands.Query Methods compare :: Slice -> Slice -> Ordering # (<) :: Slice -> Slice -> Bool # (<=) :: Slice -> Slice -> Bool # (>) :: Slice -> Slice -> Bool # (>=) :: Slice -> Slice -> Bool # max :: Slice -> Slice -> Slice # min :: Slice -> Slice -> Slice #

query #

Arguments

:: Text | Table name
-> Slice | Primary key slice for query
-> Query |

Construct a minimal `Query` request.

data QueryResponse #

Response to a `Query` query.

Constructors

QueryResponse |
Fields qrItems :: Vector Item qrLastKey :: Maybe [Attribute] qrCount :: Int qrScanned :: Int qrConsumed :: Maybe ConsumedCapacity

#### Instances

Instances details

FromJSON QueryResponse # |
Instance details Defined in Aws.DynamoDb.Commands.Query Methods parseJSON :: Value -> Parser QueryResponse # parseJSONList :: Value -> Parser [QueryResponse] # omittedField :: Maybe QueryResponse #
AsMemoryResponse QueryResponse # |
Instance details Defined in Aws.DynamoDb.Commands.Query Associated Types
type MemoryResponse QueryResponse |
Instance details Defined in Aws.DynamoDb.Commands.Query type MemoryResponse QueryResponse = QueryResponse
Methods loadToMemory :: QueryResponse -> ResourceT IO (MemoryResponse QueryResponse) #
Read QueryResponse # |
Instance details Defined in Aws.DynamoDb.Commands.Query Methods readsPrec :: Int -> ReadS QueryResponse # readList :: ReadS [QueryResponse] # readPrec :: ReadPrec QueryResponse # readListPrec :: ReadPrec [QueryResponse] #
Show QueryResponse # |
Instance details Defined in Aws.DynamoDb.Commands.Query Methods showsPrec :: Int -> QueryResponse -> ShowS # show :: QueryResponse -> String # showList :: [QueryResponse] -> ShowS #
Eq QueryResponse # |
Instance details Defined in Aws.DynamoDb.Commands.Query Methods (==) :: QueryResponse -> QueryResponse -> Bool # (/=) :: QueryResponse -> QueryResponse -> Bool #
Ord QueryResponse # |
Instance details Defined in Aws.DynamoDb.Commands.Query Methods compare :: QueryResponse -> QueryResponse -> Ordering # (<) :: QueryResponse -> QueryResponse -> Bool # (<=) :: QueryResponse -> QueryResponse -> Bool # (>) :: QueryResponse -> QueryResponse -> Bool # (>=) :: QueryResponse -> QueryResponse -> Bool # max :: QueryResponse -> QueryResponse -> QueryResponse # min :: QueryResponse -> QueryResponse -> QueryResponse #
IteratedTransaction Query QueryResponse # |
Instance details Defined in Aws.DynamoDb.Commands.Query Methods nextIteratedRequest :: Query -> QueryResponse -> Maybe Query #
ListResponse QueryResponse Item # |
Instance details Defined in Aws.DynamoDb.Commands.Query Methods listResponse :: QueryResponse -> [Item] #
ResponseConsumer r QueryResponse # |
Instance details Defined in Aws.DynamoDb.Commands.Query Associated Types
type ResponseMetadata QueryResponse |
Instance details Defined in Aws.DynamoDb.Commands.Query type ResponseMetadata QueryResponse = DdbResponse
Methods responseConsumer :: Request -> r -> IORef (ResponseMetadata QueryResponse) -> HTTPResponseConsumer QueryResponse #
Transaction Query QueryResponse # |
Instance details Defined in Aws.DynamoDb.Commands.Query
type MemoryResponse QueryResponse # |
Instance details Defined in Aws.DynamoDb.Commands.Query type MemoryResponse QueryResponse = QueryResponse
type ResponseMetadata QueryResponse # |
Instance details Defined in Aws.DynamoDb.Commands.Query type ResponseMetadata QueryResponse = DdbResponse