aws-0.24.1: Amazon Web Services (AWS) for Haskell
CopyrightSoostone Inc Chris Allen
LicenseBSD3
MaintainerOzgun Ataman <ozgun.ataman@soostone.com>
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

Aws.DynamoDb.Core

Description

Shared types and utilities for DyanmoDb functionality.

Synopsis

Configuration and Regions

data Region #

Constructors

Region 

Instances

Instances details
Read Region # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

readsPrec :: Int -> ReadS Region

readList :: ReadS [Region]

readPrec :: ReadPrec Region

readListPrec :: ReadPrec [Region]

Show Region # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

showsPrec :: Int -> Region -> ShowS #

show :: Region -> String #

showList :: [Region] -> ShowS #

Eq Region # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

(==) :: Region -> Region -> Bool #

(/=) :: Region -> Region -> Bool #

ddbLocal :: Region #

DynamoDb local connection (for development)

data DdbConfiguration qt #

Constructors

DdbConfiguration 

Fields

DynamoDB values

data DValue #

Value types natively recognized by DynamoDb. We pretty much exactly reflect the AWS API onto Haskell types.

Constructors

DNull 
DNum Scientific 
DString Text 
DBinary ByteString

Binary data will automatically be base64 marshalled.

DNumSet (Set Scientific) 
DStringSet (Set Text) 
DBinSet (Set ByteString)

Binary data will automatically be base64 marshalled.

DBool Bool 
DBoolSet (Set Bool)

Composite data

DList (Vector DValue) 
DMap (Map Text DValue) 

Instances

Instances details
FromJSON DValue # 
Instance details

Defined in Aws.DynamoDb.Core

ToJSON DValue # 
Instance details

Defined in Aws.DynamoDb.Core

DynData DValue # 
Instance details

Defined in Aws.DynamoDb.Core

DynSize DValue # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

dynSize :: DValue -> Int #

DynSize Item # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

dynSize :: Item -> Int #

DynVal DValue # 
Instance details

Defined in Aws.DynamoDb.Core

Associated Types

type DynRep DValue #

FromDynItem Item # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

parseItem :: Item -> Parser Item #

ToDynItem Item # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

toItem :: Item -> Item #

IsString DValue # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

fromString :: String -> DValue #

Read DValue # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

readsPrec :: Int -> ReadS DValue

readList :: ReadS [DValue]

readPrec :: ReadPrec DValue

readListPrec :: ReadPrec [DValue]

Show DValue # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

showsPrec :: Int -> DValue -> ShowS #

show :: DValue -> String #

showList :: [DValue] -> ShowS #

Eq DValue # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

(==) :: DValue -> DValue -> Bool #

(/=) :: DValue -> DValue -> Bool #

Ord DValue # 
Instance details

Defined in Aws.DynamoDb.Core

ListResponse QueryResponse Item # 
Instance details

Defined in Aws.DynamoDb.Commands.Query

ListResponse ScanResponse Item # 
Instance details

Defined in Aws.DynamoDb.Commands.Scan

type DynRep DValue # 
Instance details

Defined in Aws.DynamoDb.Core

Converting to/from DValue

class DynData (DynRep a) => DynVal a where #

Class of Haskell types that can be represented as DynamoDb values.

This is the conversion layer; instantiate this class for your own types and then use the toValue and fromValue combinators to convert in application code.

Each Haskell type instantiated with this class will map to a DynamoDb-supported type that most naturally represents it.

Associated Types

type DynRep a #

Which of the DynData instances does this data type directly map to?

Methods

toRep :: a -> DynRep a #

Convert to representation

fromRep :: DynRep a -> Maybe a #

Convert from representation

Instances

Instances details
DynVal DValue # 
Instance details

Defined in Aws.DynamoDb.Core

Associated Types

type DynRep DValue #

DynVal OldBool # 
Instance details

Defined in Aws.DynamoDb.Core

Associated Types

type DynRep OldBool #

DynVal Int16 # 
Instance details

Defined in Aws.DynamoDb.Core

Associated Types

type DynRep Int16 #

DynVal Int32 # 
Instance details

Defined in Aws.DynamoDb.Core

Associated Types

type DynRep Int32 #

DynVal Int64 # 
Instance details

Defined in Aws.DynamoDb.Core

Associated Types

type DynRep Int64 #

DynVal Int8 # 
Instance details

Defined in Aws.DynamoDb.Core

Associated Types

type DynRep Int8 #

DynVal Word16 # 
Instance details

Defined in Aws.DynamoDb.Core

Associated Types

type DynRep Word16 #

DynVal Word32 # 
Instance details

Defined in Aws.DynamoDb.Core

Associated Types

type DynRep Word32 #

DynVal Word64 # 
Instance details

Defined in Aws.DynamoDb.Core

Associated Types

type DynRep Word64 #

DynVal Word8 # 
Instance details

Defined in Aws.DynamoDb.Core

Associated Types

type DynRep Word8 #

DynVal ByteString # 
Instance details

Defined in Aws.DynamoDb.Core

Associated Types

type DynRep ByteString #

DynVal Text # 
Instance details

Defined in Aws.DynamoDb.Core

Associated Types

type DynRep Text #

Methods

toRep :: Text -> DynRep Text #

fromRep :: DynRep Text -> Maybe Text #

DynVal Day #

Encoded as number of days

Instance details

Defined in Aws.DynamoDb.Core

Associated Types

type DynRep Day #

DynVal UTCTime #

Losslessly encoded via Integer picoseconds

Instance details

Defined in Aws.DynamoDb.Core

Associated Types

type DynRep UTCTime #

DynVal Integer # 
Instance details

Defined in Aws.DynamoDb.Core

Associated Types

type DynRep Integer #

DynVal Bool # 
Instance details

Defined in Aws.DynamoDb.Core

Associated Types

type DynRep Bool #

DynVal Double # 
Instance details

Defined in Aws.DynamoDb.Core

Associated Types

type DynRep Double #

DynVal Int # 
Instance details

Defined in Aws.DynamoDb.Core

Associated Types

type DynRep Int #

Serialize a => DynVal (Bin a) # 
Instance details

Defined in Aws.DynamoDb.Core

Associated Types

type DynRep (Bin a) #

Methods

toRep :: Bin a -> DynRep (Bin a) #

fromRep :: DynRep (Bin a) -> Maybe (Bin a) #

(DynData (DynRep (Set a)), DynVal a, Ord a) => DynVal (Set a) #

Any singular DynVal can be upgraded to a Set.

Instance details

Defined in Aws.DynamoDb.Core

Associated Types

type DynRep (Set a) #

Methods

toRep :: Set a -> DynRep (Set a) #

fromRep :: DynRep (Set a) -> Maybe (Set a) #

(DynData (DynRep [a]), DynVal a) => DynVal [a] #

Any singular DynVal can be upgraded to a list.

Instance details

Defined in Aws.DynamoDb.Core

Associated Types

type DynRep [a] #

Methods

toRep :: [a] -> DynRep [a] #

fromRep :: DynRep [a] -> Maybe [a] #

toValue :: DynVal a => a -> DValue #

Encode a Haskell value.

fromValue :: DynVal a => DValue -> Maybe a #

Decode a Haskell value.

newtype Bin a #

Type wrapper for binary data to be written to DynamoDB. Wrap any Serialize instance in there and DynVal will know how to automatically handle conversions in binary form.

Constructors

Bin 

Fields

Instances

Instances details
Serialize a => DynVal (Bin a) # 
Instance details

Defined in Aws.DynamoDb.Core

Associated Types

type DynRep (Bin a) #

Methods

toRep :: Bin a -> DynRep (Bin a) #

fromRep :: DynRep (Bin a) -> Maybe (Bin a) #

Enum a => Enum (Bin a) # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

succ :: Bin a -> Bin a #

pred :: Bin a -> Bin a #

toEnum :: Int -> Bin a #

fromEnum :: Bin a -> Int #

enumFrom :: Bin a -> [Bin a] #

enumFromThen :: Bin a -> Bin a -> [Bin a] #

enumFromTo :: Bin a -> Bin a -> [Bin a] #

enumFromThenTo :: Bin a -> Bin a -> Bin a -> [Bin a] #

Read a => Read (Bin a) # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

readsPrec :: Int -> ReadS (Bin a)

readList :: ReadS [Bin a]

readPrec :: ReadPrec (Bin a)

readListPrec :: ReadPrec [Bin a]

Show a => Show (Bin a) # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

showsPrec :: Int -> Bin a -> ShowS #

show :: Bin a -> String #

showList :: [Bin a] -> ShowS #

Eq a => Eq (Bin a) # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

(==) :: Bin a -> Bin a -> Bool #

(/=) :: Bin a -> Bin a -> Bool #

Ord a => Ord (Bin a) # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

compare :: Bin a -> Bin a -> Ordering #

(<) :: Bin a -> Bin a -> Bool #

(<=) :: Bin a -> Bin a -> Bool #

(>) :: Bin a -> Bin a -> Bool #

(>=) :: Bin a -> Bin a -> Bool #

max :: Bin a -> Bin a -> Bin a #

min :: Bin a -> Bin a -> Bin a #

type DynRep (Bin a) # 
Instance details

Defined in Aws.DynamoDb.Core

type DynRep (Bin a) = DynBinary

newtype OldBool #

Constructors

OldBool Bool 

Instances

Instances details
DynVal OldBool # 
Instance details

Defined in Aws.DynamoDb.Core

Associated Types

type DynRep OldBool #

type DynRep OldBool # 
Instance details

Defined in Aws.DynamoDb.Core

Defining new DynVal instances

class Ord a => DynData a where #

An internally used closed typeclass for values that have direct DynamoDb representations. Based on AWS API, this is basically numbers, strings and binary blobs.

This is here so that any DynVal haskell value can automatically be lifted to a list or a Set without any instance code duplication.

Do not try to create your own instances.

Methods

fromData :: a -> DValue #

toData :: DValue -> Maybe a #

Instances

Instances details
DynData DValue # 
Instance details

Defined in Aws.DynamoDb.Core

DynData DynBinary # 
Instance details

Defined in Aws.DynamoDb.Core

DynData DynBool # 
Instance details

Defined in Aws.DynamoDb.Core

DynData DynNumber # 
Instance details

Defined in Aws.DynamoDb.Core

DynData DynString # 
Instance details

Defined in Aws.DynamoDb.Core

DynData (Set DynBinary) # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

fromData :: Set DynBinary -> DValue #

toData :: DValue -> Maybe (Set DynBinary) #

DynData (Set DynBool) # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

fromData :: Set DynBool -> DValue #

toData :: DValue -> Maybe (Set DynBool) #

DynData (Set DynNumber) # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

fromData :: Set DynNumber -> DValue #

toData :: DValue -> Maybe (Set DynNumber) #

DynData (Set DynString) # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

fromData :: Set DynString -> DValue #

toData :: DValue -> Maybe (Set DynString) #

newtype DynBinary #

Binary values stored in DynamoDb. Only used in defining new DynVal instances.

Constructors

DynBinary 

Instances

Instances details
DynData DynBinary # 
Instance details

Defined in Aws.DynamoDb.Core

Read DynBinary # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

readsPrec :: Int -> ReadS DynBinary

readList :: ReadS [DynBinary]

readPrec :: ReadPrec DynBinary

readListPrec :: ReadPrec [DynBinary]

Show DynBinary # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

showsPrec :: Int -> DynBinary -> ShowS #

show :: DynBinary -> String #

showList :: [DynBinary] -> ShowS #

Eq DynBinary # 
Instance details

Defined in Aws.DynamoDb.Core

Ord DynBinary # 
Instance details

Defined in Aws.DynamoDb.Core

DynData (Set DynBinary) # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

fromData :: Set DynBinary -> DValue #

toData :: DValue -> Maybe (Set DynBinary) #

newtype DynNumber #

Numeric values stored in DynamoDb. Only used in defining new DynVal instances.

Constructors

DynNumber 

Instances

Instances details
DynData DynNumber # 
Instance details

Defined in Aws.DynamoDb.Core

Read DynNumber # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

readsPrec :: Int -> ReadS DynNumber

readList :: ReadS [DynNumber]

readPrec :: ReadPrec DynNumber

readListPrec :: ReadPrec [DynNumber]

Show DynNumber # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

showsPrec :: Int -> DynNumber -> ShowS #

show :: DynNumber -> String #

showList :: [DynNumber] -> ShowS #

Eq DynNumber # 
Instance details

Defined in Aws.DynamoDb.Core

Ord DynNumber # 
Instance details

Defined in Aws.DynamoDb.Core

DynData (Set DynNumber) # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

fromData :: Set DynNumber -> DValue #

toData :: DValue -> Maybe (Set DynNumber) #

newtype DynString #

String values stored in DynamoDb. Only used in defining new DynVal instances.

Constructors

DynString 

Fields

Instances

Instances details
DynData DynString # 
Instance details

Defined in Aws.DynamoDb.Core

Read DynString # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

readsPrec :: Int -> ReadS DynString

readList :: ReadS [DynString]

readPrec :: ReadPrec DynString

readListPrec :: ReadPrec [DynString]

Show DynString # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

showsPrec :: Int -> DynString -> ShowS #

show :: DynString -> String #

showList :: [DynString] -> ShowS #

Eq DynString # 
Instance details

Defined in Aws.DynamoDb.Core

Ord DynString # 
Instance details

Defined in Aws.DynamoDb.Core

DynData (Set DynString) # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

fromData :: Set DynString -> DValue #

toData :: DValue -> Maybe (Set DynString) #

newtype DynBool #

Boolean values stored in DynamoDb. Only used in defining new DynVal instances.

Constructors

DynBool 

Fields

Instances

Instances details
DynData DynBool # 
Instance details

Defined in Aws.DynamoDb.Core

Read DynBool # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

readsPrec :: Int -> ReadS DynBool

readList :: ReadS [DynBool]

readPrec :: ReadPrec DynBool

readListPrec :: ReadPrec [DynBool]

Show DynBool # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

showsPrec :: Int -> DynBool -> ShowS #

show :: DynBool -> String #

showList :: [DynBool] -> ShowS #

Eq DynBool # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

(==) :: DynBool -> DynBool -> Bool #

(/=) :: DynBool -> DynBool -> Bool #

Ord DynBool # 
Instance details

Defined in Aws.DynamoDb.Core

DynData (Set DynBool) # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

fromData :: Set DynBool -> DValue #

toData :: DValue -> Maybe (Set DynBool) #

Working with key/value pairs

data Attribute #

A key-value pair

Constructors

Attribute 

Fields

Instances

Instances details
ToJSON Attribute # 
Instance details

Defined in Aws.DynamoDb.Core

DynSize Attribute # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

dynSize :: Attribute -> Int #

Read Attribute # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

readsPrec :: Int -> ReadS Attribute

readList :: ReadS [Attribute]

readPrec :: ReadPrec Attribute

readListPrec :: ReadPrec [Attribute]

Show Attribute # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

showsPrec :: Int -> Attribute -> ShowS #

show :: Attribute -> String #

showList :: [Attribute] -> ShowS #

Eq Attribute # 
Instance details

Defined in Aws.DynamoDb.Core

Ord Attribute # 
Instance details

Defined in Aws.DynamoDb.Core

parseAttributeJson :: Value -> Parser [Attribute] #

Parse a JSON object that contains attributes

attributeJson :: Attribute -> Pair #

Convert into JSON pair

attributesJson :: [Attribute] -> Value #

Convert into JSON object for AWS.

attrTuple :: Attribute -> (Text, DValue) #

Convert attribute to a tuple representation

attr :: DynVal a => Text -> a -> Attribute #

Convenience function for constructing key-value pairs

attrAs :: DynVal a => Proxy a -> Text -> a -> Attribute #

attr with type witness to help with cases where you're manually supplying values in code.

> item [ attrAs text "name" "john" ]

text :: Proxy Text #

Type witness for Text. See attrAs.

int :: Proxy Integer #

Type witness for Integer. See attrAs.

double :: Proxy Double #

Type witness for Double. See attrAs.

data PrimaryKey #

Primary keys consist of either just a Hash key (mandatory) or a hash key and a range key (optional).

Constructors

PrimaryKey 

Instances

Instances details
FromJSON PrimaryKey # 
Instance details

Defined in Aws.DynamoDb.Core

ToJSON PrimaryKey # 
Instance details

Defined in Aws.DynamoDb.Core

Read PrimaryKey # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

readsPrec :: Int -> ReadS PrimaryKey

readList :: ReadS [PrimaryKey]

readPrec :: ReadPrec PrimaryKey

readListPrec :: ReadPrec [PrimaryKey]

Show PrimaryKey # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

showsPrec :: Int -> PrimaryKey -> ShowS #

show :: PrimaryKey -> String #

showList :: [PrimaryKey] -> ShowS #

Eq PrimaryKey # 
Instance details

Defined in Aws.DynamoDb.Core

Ord PrimaryKey # 
Instance details

Defined in Aws.DynamoDb.Core

hk :: Text -> DValue -> PrimaryKey #

Construct a hash-only primary key.

>>> hk "user-id" "ABCD"
>>> hk "user-id" (mkVal 23)

hrk #

Arguments

:: Text

Hash key name

-> DValue

Hash key value

-> Text

Range key name

-> DValue

Range key value

-> PrimaryKey 

Construct a hash-and-range primary key.

Working with objects (attribute collections)

type Item = Map Text DValue #

A DynamoDb object is simply a key-value dictionary.

item :: [Attribute] -> Item #

Pack a list of attributes into an Item.

attributes :: Map Text DValue -> [Attribute] #

Unpack an Item into a list of attributes.

class ToDynItem a where #

Types convertible to DynamoDb Item collections.

Use attr and attrAs combinators to conveniently define instances.

Methods

toItem :: a -> Item #

Instances

Instances details
ToDynItem Item # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

toItem :: Item -> Item #

DynVal a => ToDynItem [(Text, a)] # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

toItem :: [(Text, a)] -> Item #

DynVal a => ToDynItem (Map Text a) # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

toItem :: Map Text a -> Item #

class FromDynItem a where #

Types parseable from DynamoDb Item collections.

User getAttr family of functions to applicatively or monadically parse into your custom types.

Methods

parseItem :: Item -> Parser a #

Instances

Instances details
FromDynItem Item # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

parseItem :: Item -> Parser Item #

(Typeable a, DynVal a) => FromDynItem [(Text, a)] # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

parseItem :: Item -> Parser [(Text, a)] #

(Typeable a, DynVal a) => FromDynItem (Map Text a) # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

parseItem :: Item -> Parser (Map Text a) #

fromItem :: FromDynItem a => Item -> Either String a #

Parse an Item into target type using the FromDynItem instance.

newtype Parser a #

A continuation-based parser type.

Constructors

Parser 

Fields

  • runParser :: forall f r. Failure f r -> Success a f r -> f r
     

Instances

Instances details
MonadFail Parser # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

fail :: String -> Parser a

Alternative Parser # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

empty :: Parser a

(<|>) :: Parser a -> Parser a -> Parser a #

some :: Parser a -> Parser [a] #

many :: Parser a -> Parser [a] #

Applicative Parser # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

pure :: a -> Parser a #

(<*>) :: Parser (a -> b) -> Parser a -> Parser b #

liftA2 :: (a -> b -> c) -> Parser a -> Parser b -> Parser c #

(*>) :: Parser a -> Parser b -> Parser b #

(<*) :: Parser a -> Parser b -> Parser a #

Functor Parser # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

fmap :: (a -> b) -> Parser a -> Parser b #

(<$) :: a -> Parser b -> Parser a #

Monad Parser # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

(>>=) :: Parser a -> (a -> Parser b) -> Parser b #

(>>) :: Parser a -> Parser b -> Parser b #

return :: a -> Parser a #

MonadPlus Parser # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

mzero :: Parser a

mplus :: Parser a -> Parser a -> Parser a

Monoid (Parser a) # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

mempty :: Parser a #

mappend :: Parser a -> Parser a -> Parser a #

mconcat :: [Parser a] -> Parser a #

Semigroup (Parser a) # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

(<>) :: Parser a -> Parser a -> Parser a #

sconcat :: NonEmpty (Parser a) -> Parser a #

stimes :: Integral b => b -> Parser a -> Parser a #

getAttr #

Arguments

:: forall a. (Typeable a, DynVal a) 
=> Text

Attribute name

-> Item

Item from DynamoDb

-> Parser a 

Convenience combinator for parsing fields from an Item returned by DynamoDb.

getAttr' #

Arguments

:: forall a. DynVal a 
=> Text

Attribute name

-> Item

Item from DynamoDb

-> Parser (Maybe a) 

Parse attribute if it's present in the Item. Fail if attribute is present but conversion fails.

parseAttr #

Arguments

:: FromDynItem a 
=> Text

Attribute name

-> Item

Item from DynamoDb

-> Parser a 

Combinator for parsing an attribute into a FromDynItem.

Common types used by operations

data Conditions #

Conditions used by mutation operations (PutItem, UpdateItem, etc.). The default def instance is empty (no condition).

Instances

Instances details
Read Conditions # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

readsPrec :: Int -> ReadS Conditions

readList :: ReadS [Conditions]

readPrec :: ReadPrec Conditions

readListPrec :: ReadPrec [Conditions]

Show Conditions # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

showsPrec :: Int -> Conditions -> ShowS #

show :: Conditions -> String #

showList :: [Conditions] -> ShowS #

Default Conditions # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

def :: Conditions #

Eq Conditions # 
Instance details

Defined in Aws.DynamoDb.Core

Ord Conditions # 
Instance details

Defined in Aws.DynamoDb.Core

conditionsJson :: Text -> Conditions -> [Pair] #

JSON encoding of conditions parameter in various contexts.

data Condition #

A condition used by mutation operations (PutItem, UpdateItem, etc.).

Constructors

Condition 

Fields

  • condAttr :: Text

    Attribute to use as the basis for this conditional

  • condOp :: CondOp

    Operation on the selected attribute

Instances

Instances details
Read Condition # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

readsPrec :: Int -> ReadS Condition

readList :: ReadS [Condition]

readPrec :: ReadPrec Condition

readListPrec :: ReadPrec [Condition]

Show Condition # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

showsPrec :: Int -> Condition -> ShowS #

show :: Condition -> String #

showList :: [Condition] -> ShowS #

Eq Condition # 
Instance details

Defined in Aws.DynamoDb.Core

Ord Condition # 
Instance details

Defined in Aws.DynamoDb.Core

data CondOp #

Conditional operation to perform on a field.

Instances

Instances details
ToJSON CondOp # 
Instance details

Defined in Aws.DynamoDb.Core

Read CondOp # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

readsPrec :: Int -> ReadS CondOp

readList :: ReadS [CondOp]

readPrec :: ReadPrec CondOp

readListPrec :: ReadPrec [CondOp]

Show CondOp # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

showsPrec :: Int -> CondOp -> ShowS #

show :: CondOp -> String #

showList :: [CondOp] -> ShowS #

Eq CondOp # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

(==) :: CondOp -> CondOp -> Bool #

(/=) :: CondOp -> CondOp -> Bool #

Ord CondOp # 
Instance details

Defined in Aws.DynamoDb.Core

data CondMerge #

How to merge multiple conditions.

Constructors

CondAnd 
CondOr 

Instances

Instances details
Read CondMerge # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

readsPrec :: Int -> ReadS CondMerge

readList :: ReadS [CondMerge]

readPrec :: ReadPrec CondMerge

readListPrec :: ReadPrec [CondMerge]

Show CondMerge # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

showsPrec :: Int -> CondMerge -> ShowS #

show :: CondMerge -> String #

showList :: [CondMerge] -> ShowS #

Eq CondMerge # 
Instance details

Defined in Aws.DynamoDb.Core

Ord CondMerge # 
Instance details

Defined in Aws.DynamoDb.Core

data ConsumedCapacity #

The standard response metrics on capacity consumption.

data ReturnConsumption #

Constructors

RCIndexes 
RCTotal 
RCNone 

Instances

Instances details
ToJSON ReturnConsumption # 
Instance details

Defined in Aws.DynamoDb.Core

Read ReturnConsumption # 
Instance details

Defined in Aws.DynamoDb.Core

Show ReturnConsumption # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

showsPrec :: Int -> ReturnConsumption -> ShowS #

show :: ReturnConsumption -> String #

showList :: [ReturnConsumption] -> ShowS #

Default ReturnConsumption # 
Instance details

Defined in Aws.DynamoDb.Core

Eq ReturnConsumption # 
Instance details

Defined in Aws.DynamoDb.Core

Ord ReturnConsumption # 
Instance details

Defined in Aws.DynamoDb.Core

data ItemCollectionMetrics #

Constructors

ItemCollectionMetrics 

Fields

Instances

Instances details
FromJSON ItemCollectionMetrics # 
Instance details

Defined in Aws.DynamoDb.Core

Read ItemCollectionMetrics # 
Instance details

Defined in Aws.DynamoDb.Core

Show ItemCollectionMetrics # 
Instance details

Defined in Aws.DynamoDb.Core

Eq ItemCollectionMetrics # 
Instance details

Defined in Aws.DynamoDb.Core

Ord ItemCollectionMetrics # 
Instance details

Defined in Aws.DynamoDb.Core

data ReturnItemCollectionMetrics #

Constructors

RICMSize 
RICMNone 

Instances

Instances details
ToJSON ReturnItemCollectionMetrics # 
Instance details

Defined in Aws.DynamoDb.Core

Read ReturnItemCollectionMetrics # 
Instance details

Defined in Aws.DynamoDb.Core

Show ReturnItemCollectionMetrics # 
Instance details

Defined in Aws.DynamoDb.Core

Default ReturnItemCollectionMetrics # 
Instance details

Defined in Aws.DynamoDb.Core

Eq ReturnItemCollectionMetrics # 
Instance details

Defined in Aws.DynamoDb.Core

Ord ReturnItemCollectionMetrics # 
Instance details

Defined in Aws.DynamoDb.Core

data UpdateReturn #

What to return from the current update operation

Constructors

URNone

Return nothing

URAllOld

Return old values

URUpdatedOld

Return old values with a newer replacement

URAllNew

Return new values

URUpdatedNew

Return new values that were replacements

data QuerySelect #

What to return from a Query or Scan query.

Constructors

SelectSpecific [Text]

Only return selected attributes

SelectCount

Return counts instead of attributes

SelectProjected

Return index-projected attributes

SelectAll

Default. Return everything.

Instances

Instances details
Read QuerySelect # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

readsPrec :: Int -> ReadS QuerySelect

readList :: ReadS [QuerySelect]

readPrec :: ReadPrec QuerySelect

readListPrec :: ReadPrec [QuerySelect]

Show QuerySelect # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

showsPrec :: Int -> QuerySelect -> ShowS #

show :: QuerySelect -> String #

showList :: [QuerySelect] -> ShowS #

Default QuerySelect # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

def :: QuerySelect #

Eq QuerySelect # 
Instance details

Defined in Aws.DynamoDb.Core

Ord QuerySelect # 
Instance details

Defined in Aws.DynamoDb.Core

Size estimation

class DynSize a where #

A class to help predict DynamoDb size of values, attributes and entire items. The result is given in number of bytes.

Methods

dynSize :: a -> Int #

Instances

Instances details
DynSize AttributeUpdate # 
Instance details

Defined in Aws.DynamoDb.Commands.UpdateItem

DynSize Attribute # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

dynSize :: Attribute -> Int #

DynSize DValue # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

dynSize :: DValue -> Int #

DynSize Item # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

dynSize :: Item -> Int #

DynSize a => DynSize (Maybe a) # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

dynSize :: Maybe a -> Int #

DynSize a => DynSize [a] # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

dynSize :: [a] -> Int #

(DynSize a, DynSize b) => DynSize (Either a b) # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

dynSize :: Either a b -> Int #

nullAttr :: Attribute -> Bool #

Will an attribute be considered empty by DynamoDb?

A PutItem (or similar) with empty attributes will be rejected with a ValidationException.

Responses & Errors

data DdbResponse #

Response metadata that is present in every DynamoDB response.

Constructors

DdbResponse 

Fields

Instances

Instances details
Loggable DdbResponse # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

toLogText :: DdbResponse -> Text #

Monoid DdbResponse # 
Instance details

Defined in Aws.DynamoDb.Core

Semigroup DdbResponse # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

(<>) :: DdbResponse -> DdbResponse -> DdbResponse #

sconcat :: NonEmpty DdbResponse -> DdbResponse #

stimes :: Integral b => b -> DdbResponse -> DdbResponse #

shouldRetry :: DdbErrCode -> Bool #

Whether the action should be retried based on the received error.

data DdbError #

Potential errors raised by DynamoDB

Constructors

DdbError 

Fields

Instances

Instances details
Exception DdbError # 
Instance details

Defined in Aws.DynamoDb.Core

Show DdbError # 
Instance details

Defined in Aws.DynamoDb.Core

Methods

showsPrec :: Int -> DdbError -> ShowS #

show :: DdbError -> String #

showList :: [DdbError] -> ShowS #

Eq DdbError # 
Instance details

Defined in Aws.DynamoDb.Core

Internal Helpers

data AmazonError #

Constructors

AmazonError 

Fields

Instances

Instances details
FromJSON AmazonError # 
Instance details

Defined in Aws.DynamoDb.Core