keyed-vals-0.2.0.0: An abstract Handle for accessing collections in stores like Redis
Copyright(c) 2022 Tim Emiola
LicenseBSD3
MaintainerTim Emiola <adetokunbo@emio.la>
Safe HaskellSafe-Inferred
LanguageHaskell2010

KeyedVals.Handle.Internal

Description

Declares the abstract Handle

Synopsis

types used in the Handle functions

data HandleErr Source #

Represents the errors that might arise in Handle functions

data Glob Source #

Represents a redis glob use to select keys

Instances

Instances details
Show Glob Source # 
Instance details

Defined in KeyedVals.Handle.Internal

Methods

showsPrec :: Int -> Glob -> ShowS #

show :: Glob -> String #

showList :: [Glob] -> ShowS #

Eq Glob Source # 
Instance details

Defined in KeyedVals.Handle.Internal

Methods

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

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

mkGlob :: ByteString -> Maybe Glob Source #

constructor for a Glob

returns Nothing if the pattern is invalid

isIn :: ByteString -> Selection -> Bool Source #

tests if a ByteString matches a Selection

data Selection Source #

Represents ways of restricting the keys used in a ValsByKey

Constructors

Match !Glob

any keys that match the glob pattern

AllOf !(NonEmpty Key)

any of the specified keys

Instances

Instances details
Show Selection Source # 
Instance details

Defined in KeyedVals.Handle.Internal

Eq Selection Source # 
Instance details

Defined in KeyedVals.Handle.Internal

the abstract Handle

data Handle m Source #

A handle for accessing the ValsByKey store.

Constructors

Handle 

Fields

aliases used in the Handle functions

type Key = ByteString Source #

Represents a key used to store a Val.

type Val = ByteString Source #

Represents a value stored in the service.

type ValsByKey = Map Key Val Source #

Represents a related group of Vals stored by Key.