databrary-1: Databrary

Safe HaskellNone
LanguageHaskell2010

Model.Id.Types

Synopsis

Documentation

type family IdType a Source #

This defines a way to make a ID type specific to a specific record type. IdType takes a containing type as a parameter (e.g. Asset, Volume), and defines an alias for the containing types actual ID type. IdType Volume = String would mean Volume's use String for their identifiers

newtype Id a Source #

This builds a new type around the container specific type. See tests for examples.

Constructors

Id 

Fields

Instances

(PGParameter t (IdType a), PGColumn t (IdType a), PGRep t (IdType a), PGType t) => PGRep t (Id a) Source # 
(PGParameter t (IdType a), PGType t) => PGParameter t (Id a) Source # 

Methods

pgEncode :: PGTypeName t -> Id a -> PGTextValue #

pgLiteral :: PGTypeName t -> Id a -> ByteString #

pgEncodeValue :: PGTypeEnv -> PGTypeName t -> Id a -> PGValue #

(PGColumn t (IdType a), PGType t) => PGColumn t (Id a) Source # 

Methods

pgDecode :: PGTypeName t -> PGTextValue -> Id a #

pgDecodeBinary :: PGTypeEnv -> PGTypeName t -> PGBinaryValue -> Id a #

pgDecodeValue :: PGTypeEnv -> PGTypeName t -> PGValue -> Id a #

Deform f (IdType a) => Deform f (Id a) Source # 

Methods

deform :: Monad m => DeformT f m (Id a) Source #

Bounded (IdType a) => Bounded (Id a) Source # 

Methods

minBound :: Id a #

maxBound :: Id a #

Enum (IdType a) => Enum (Id a) Source # 

Methods

succ :: Id a -> Id a #

pred :: Id a -> Id a #

toEnum :: Int -> Id a #

fromEnum :: Id a -> Int #

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

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

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

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

Eq (IdType a) => Eq (Id a) Source # 

Methods

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

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

Ord (IdType a) => Ord (Id a) Source # 

Methods

compare :: Id a -> Id a -> Ordering #

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

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

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

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

max :: Id a -> Id a -> Id a #

min :: Id a -> Id a -> Id a #

Read (IdType a) => Read (Id a) Source # 
Show (IdType a) => Show (Id a) Source # 

Methods

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

show :: Id a -> String #

showList :: [Id a] -> ShowS #

Lift (IdType a) => Lift (Id a) Source # 

Methods

lift :: Id a -> Q Exp #

Hashable (IdType a) => Hashable (Id a) Source # 

Methods

hashWithSalt :: Int -> Id a -> Int #

hash :: Id a -> Int #

ToJSON (IdType a) => ToJSON (Id a) Source # 

Methods

toJSON :: Id a -> Value #

toEncoding :: Id a -> Encoding #

toJSONList :: [Id a] -> Value #

toEncodingList :: [Id a] -> Encoding #

FromJSON (IdType a) => FromJSON (Id a) Source # 

Methods

parseJSON :: Value -> Parser (Id a) #

parseJSONList :: Value -> Parser [Id a] #

Has (Maybe (Id Container)) AssetSlot Source # 
Has (Id Category) Record Source # 

Methods

view :: Record -> Id Category Source #

Has (Id Category) RecordSlot Source # 
Has (Id Format) Asset Source # 

Methods

view :: Asset -> Id Format Source #

Has (Id Format) AssetRow Source # 

Methods

view :: AssetRow -> Id Format Source #

Has (Id Format) AssetSlot Source # 
Has (Id Format) AssetSegment Source # 
Has (Id Party) SiteAuth Source # 

Methods

view :: SiteAuth -> Id Party Source #

Has (Id Party) Account Source # 

Methods

view :: Account -> Id Party Source #

Has (Id Party) Party Source # 

Methods

view :: Party -> Id Party Source #

Has (Id Party) Session Source # 

Methods

view :: Session -> Id Party Source #

Has (Id Party) AccountToken Source # 
Has (Id Party) Identity Source # 

Methods

view :: Identity -> Id Party Source #

Has (Id Party) SolrIndexingContext Source # 
Has (Id Party) BackgroundContext Source # 
Has (Id Token) Upload Source # 

Methods

view :: Upload -> Id Token Source #

Has (Id Token) Session Source # 

Methods

view :: Session -> Id Token Source #

Has (Id Token) LoginToken Source # 
Has (Id Token) AccountToken Source # 
Has (Id Token) Token Source # 

Methods

view :: Token -> Id Token Source #

Has (Id Volume) Asset Source # 

Methods

view :: Asset -> Id Volume Source #

Has (Id Volume) AssetSlot Source # 
Has (Id Volume) AssetSegment Source # 
Has (Id Volume) TagUse Source # 

Methods

view :: TagUse -> Id Volume Source #

Has (Id Asset) Asset Source # 

Methods

view :: Asset -> Id Asset Source #

Has (Id Asset) AssetRow Source # 

Methods

view :: AssetRow -> Id Asset Source #

Has (Id Asset) AssetSlot Source # 

Methods

view :: AssetSlot -> Id Asset Source #

Has (Id Asset) Excerpt Source # 

Methods

view :: Excerpt -> Id Asset Source #

Has (Id Asset) AssetSegment Source # 
Has (Id Container) Container Source # 
Has (Id Container) ContainerRow Source # 
Has (Id Container) Slot Source # 

Methods

view :: Slot -> Id Container Source #

Has (Id Container) Excerpt Source # 
Has (Id Container) AssetSegment Source # 
Has (Id Container) RecordSlot Source # 
Has (Id Container) TagUse Source # 
Has (Id Record) Record Source # 

Methods

view :: Record -> Id Record Source #

Has (Id Record) RecordSlot Source # 

data Int32 :: * #

32-bit signed integer type

Instances

Bounded Int32 
Enum Int32 
Eq Int32 

Methods

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

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

Integral Int32 
Num Int32 
Ord Int32 

Methods

compare :: Int32 -> Int32 -> Ordering #

(<) :: Int32 -> Int32 -> Bool #

(<=) :: Int32 -> Int32 -> Bool #

(>) :: Int32 -> Int32 -> Bool #

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

max :: Int32 -> Int32 -> Int32 #

min :: Int32 -> Int32 -> Int32 #

Read Int32 
Real Int32 

Methods

toRational :: Int32 -> Rational #

Show Int32 

Methods

showsPrec :: Int -> Int32 -> ShowS #

show :: Int32 -> String #

showList :: [Int32] -> ShowS #

Ix Int32 
Lift Int32 

Methods

lift :: Int32 -> Q Exp #

Hashable Int32 

Methods

hashWithSalt :: Int -> Int32 -> Int #

hash :: Int32 -> Int #

ToJSON Int32 
ToJSONKey Int32 
FromJSON Int32 
FromJSONKey Int32 
Storable Int32 

Methods

sizeOf :: Int32 -> Int #

alignment :: Int32 -> Int #

peekElemOff :: Ptr Int32 -> Int -> IO Int32 #

pokeElemOff :: Ptr Int32 -> Int -> Int32 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int32 #

pokeByteOff :: Ptr b -> Int -> Int32 -> IO () #

peek :: Ptr Int32 -> IO Int32 #

poke :: Ptr Int32 -> Int32 -> IO () #

Bits Int32 
FiniteBits Int32 
PrimType Int32 
PrimMemoryComparable Int32 
Subtractive Int32 

Associated Types

type Difference Int32 :: * #

Methods

(-) :: Int32 -> Int32 -> Difference Int32 #

ToValue Int32 
ToMarkup Int32 
FromField Int32

Accepts a signed decimal number. Ignores whitespace.

ToField Int32

Uses decimal encoding with optional sign.

Methods

toField :: Int32 -> Field #

Default Int32 

Methods

def :: Int32 #

BinaryWord Int32 
DoubleWord Int32 
EndianSensitive Int32 

Methods

swapEndian :: Int32 -> Int32 #

Deserializable Int32 

Methods

get :: Deserializer μ => μ Int32 #

Serializable Int32 

Methods

put :: Serializer s => Int32 -> s #

SizedSerializable Int32 

Methods

size :: Proxy * Int32 -> Int #

ToFormKey Int32 

Methods

toFormKey :: Int32 -> Text #

FromFormKey Int32 
ToHttpApiData Int32 
FromHttpApiData Int32 
Prim Int32 
Unbox Int32 
Variate Int32 

Methods

uniform :: PrimMonad m => Gen (PrimState m) -> m Int32 #

uniformR :: PrimMonad m => (Int32, Int32) -> Gen (PrimState m) -> m Int32 #

IArray UArray Int32 

Methods

bounds :: Ix i => UArray i Int32 -> (i, i) #

numElements :: Ix i => UArray i Int32 -> Int

unsafeArray :: Ix i => (i, i) -> [(Int, Int32)] -> UArray i Int32

unsafeAt :: Ix i => UArray i Int32 -> Int -> Int32

unsafeReplace :: Ix i => UArray i Int32 -> [(Int, Int32)] -> UArray i Int32

unsafeAccum :: Ix i => (Int32 -> e' -> Int32) -> UArray i Int32 -> [(Int, e')] -> UArray i Int32

unsafeAccumArray :: Ix i => (Int32 -> e' -> Int32) -> Int32 -> (i, i) -> [(Int, e')] -> UArray i Int32

Vector Vector Int32 
PGRep "integer" Int32 
PGParameter "integer" Int32 

Methods

pgEncode :: PGTypeName "integer" -> Int32 -> PGTextValue #

pgLiteral :: PGTypeName "integer" -> Int32 -> ByteString #

pgEncodeValue :: PGTypeEnv -> PGTypeName "integer" -> Int32 -> PGValue #

PGColumn "integer" Int32 

Methods

pgDecode :: PGTypeName "integer" -> PGTextValue -> Int32 #

pgDecodeBinary :: PGTypeEnv -> PGTypeName "integer" -> PGBinaryValue -> Int32 #

pgDecodeValue :: PGTypeEnv -> PGTypeName "integer" -> PGValue -> Int32 #

MVector MVector Int32 
RouteString s => Parameter s Int32 
Parameter Text Int32 
Deform f Int32 Source # 

Methods

deform :: Monad m => DeformT f m Int32 Source #

MArray (STUArray s) Int32 (ST s) 

Methods

getBounds :: Ix i => STUArray s i Int32 -> ST s (i, i) #

getNumElements :: Ix i => STUArray s i Int32 -> ST s Int

newArray :: Ix i => (i, i) -> Int32 -> ST s (STUArray s i Int32) #

newArray_ :: Ix i => (i, i) -> ST s (STUArray s i Int32) #

unsafeNewArray_ :: Ix i => (i, i) -> ST s (STUArray s i Int32)

unsafeRead :: Ix i => STUArray s i Int32 -> Int -> ST s Int32

unsafeWrite :: Ix i => STUArray s i Int32 -> Int -> Int32 -> ST s ()

type Difference Int32 
type SignedWord Int32 
type UnsignedWord Int32 
type HiWord Int32 
type LoWord Int32 
data Vector Int32 
type Unsigned Int32 
type Unsigned Int32 = Word32
data MVector s Int32