cassandra-util-0.16.5: Cassandra Utilities
Safe HaskellSafe-Inferred
LanguageGHC2021

Cassandra.Settings

Description

This module exports types and functions from Database.CQL.IO, while adding a few wire specific functions.

Synopsis

Documentation

data S Source #

Type tag for schema queries, i.e. 'QueryString S a b'.

data R Source #

Type tag for read queries, i.e. 'QueryString R a b'.

newtype Identity a #

Identity functor and monad. (a non-strict monad)

Since: base-4.8.0.0

Constructors

Identity 

Fields

Instances

Instances details
Representable Identity 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep Identity Source #

Methods

tabulate :: (Rep Identity -> a) -> Identity a Source #

index :: Identity a -> Rep Identity -> a Source #

FromJSON1 Identity 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (Identity a) Source #

liftParseJSONList :: (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [Identity a] Source #

ToJSON1 Identity 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Value) -> ([a] -> Value) -> Identity a -> Value Source #

liftToJSONList :: (a -> Value) -> ([a] -> Value) -> [Identity a] -> Value Source #

liftToEncoding :: (a -> Encoding) -> ([a] -> Encoding) -> Identity a -> Encoding Source #

liftToEncodingList :: (a -> Encoding) -> ([a] -> Encoding) -> [Identity a] -> Encoding Source #

MonadFix Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

mfix :: (a -> Identity a) -> Identity a #

Foldable Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

fold :: Monoid m => Identity m -> m #

foldMap :: Monoid m => (a -> m) -> Identity a -> m #

foldMap' :: Monoid m => (a -> m) -> Identity a -> m #

foldr :: (a -> b -> b) -> b -> Identity a -> b #

foldr' :: (a -> b -> b) -> b -> Identity a -> b #

foldl :: (b -> a -> b) -> b -> Identity a -> b #

foldl' :: (b -> a -> b) -> b -> Identity a -> b #

foldr1 :: (a -> a -> a) -> Identity a -> a #

foldl1 :: (a -> a -> a) -> Identity a -> a #

toList :: Identity a -> [a] #

null :: Identity a -> Bool #

length :: Identity a -> Int #

elem :: Eq a => a -> Identity a -> Bool #

maximum :: Ord a => Identity a -> a #

minimum :: Ord a => Identity a -> a #

sum :: Num a => Identity a -> a #

product :: Num a => Identity a -> a #

Traversable Identity

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Identity a -> f (Identity b) #

sequenceA :: Applicative f => Identity (f a) -> f (Identity a) #

mapM :: Monad m => (a -> m b) -> Identity a -> m (Identity b) #

sequence :: Monad m => Identity (m a) -> m (Identity a) #

Applicative Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

pure :: a -> Identity a #

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

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

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

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

Functor Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

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

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

Monad Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

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

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

return :: a -> Identity a #

Comonad Identity 
Instance details

Defined in Control.Comonad

ComonadApply Identity 
Instance details

Defined in Control.Comonad

Methods

(<@>) :: Identity (a -> b) -> Identity a -> Identity b Source #

(@>) :: Identity a -> Identity b -> Identity b Source #

(<@) :: Identity a -> Identity b -> Identity a Source #

NFData1 Identity

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Identity a -> () #

Distributive Identity 
Instance details

Defined in Data.Distributive

Methods

distribute :: Functor f => f (Identity a) -> Identity (f a) Source #

collect :: Functor f => (a -> Identity b) -> f a -> Identity (f b) Source #

distributeM :: Monad m => m (Identity a) -> Identity (m a) Source #

collectM :: Monad m => (a -> Identity b) -> m a -> Identity (m b) Source #

Hashable1 Identity 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Identity a -> Int Source #

Settable Identity

So you can pass our Setter into combinators from other lens libraries.

Instance details

Defined in Control.Lens.Internal.Setter

Methods

untainted :: Identity a -> a Source #

untaintedDot :: Profunctor p => p a (Identity b) -> p a b Source #

taintedDot :: Profunctor p => p a b -> p a (Identity b) Source #

Traversable1 Identity 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f => (a -> f b) -> Identity a -> f (Identity b) Source #

sequence1 :: Apply f => Identity (f b) -> f (Identity b) Source #

Generic1 Identity 
Instance details

Defined in Data.Functor.Identity

Associated Types

type Rep1 Identity :: k -> Type #

Methods

from1 :: forall (a :: k). Identity a -> Rep1 Identity a #

to1 :: forall (a :: k). Rep1 Identity a -> Identity a #

FoldableWithIndex () Identity 
Instance details

Defined in WithIndex

Methods

ifoldMap :: Monoid m => (() -> a -> m) -> Identity a -> m Source #

ifoldMap' :: Monoid m => (() -> a -> m) -> Identity a -> m Source #

ifoldr :: (() -> a -> b -> b) -> b -> Identity a -> b Source #

ifoldl :: (() -> b -> a -> b) -> b -> Identity a -> b Source #

ifoldr' :: (() -> a -> b -> b) -> b -> Identity a -> b Source #

ifoldl' :: (() -> b -> a -> b) -> b -> Identity a -> b Source #

FunctorWithIndex () Identity 
Instance details

Defined in WithIndex

Methods

imap :: (() -> a -> b) -> Identity a -> Identity b Source #

TraversableWithIndex () Identity 
Instance details

Defined in WithIndex

Methods

itraverse :: Applicative f => (() -> a -> f b) -> Identity a -> f (Identity b) Source #

Cosieve ReifiedGetter Identity 
Instance details

Defined in Control.Lens.Reified

Methods

cosieve :: ReifiedGetter a b -> Identity a -> b Source #

Sieve ReifiedGetter Identity 
Instance details

Defined in Control.Lens.Reified

Methods

sieve :: ReifiedGetter a b -> a -> Identity b Source #

Unbox a => Vector Vector (Identity a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => MVector MVector (Identity a) 
Instance details

Defined in Data.Vector.Unboxed.Base

FromJSON a => FromJSON (Identity a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey a => FromJSONKey (Identity a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON a => ToJSON (Identity a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey a => ToJSONKey (Identity a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

IsString a => IsString (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.String

Methods

fromString :: String -> Identity a #

Storable a => Storable (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

sizeOf :: Identity a -> Int #

alignment :: Identity a -> Int #

peekElemOff :: Ptr (Identity a) -> Int -> IO (Identity a) #

pokeElemOff :: Ptr (Identity a) -> Int -> Identity a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Identity a) #

pokeByteOff :: Ptr b -> Int -> Identity a -> IO () #

peek :: Ptr (Identity a) -> IO (Identity a) #

poke :: Ptr (Identity a) -> Identity a -> IO () #

Monoid a => Monoid (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

mempty :: Identity a #

mappend :: Identity a -> Identity a -> Identity a #

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

Semigroup a => Semigroup (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

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

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

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

Bits a => Bits (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

FiniteBits a => FiniteBits (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Bounded a => Bounded (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Enum a => Enum (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Floating a => Floating (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

RealFloat a => RealFloat (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Generic (Identity a) 
Instance details

Defined in Data.Functor.Identity

Associated Types

type Rep (Identity a) :: Type -> Type #

Methods

from :: Identity a -> Rep (Identity a) x #

to :: Rep (Identity a) x -> Identity a #

Ix a => Ix (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Num a => Num (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Read a => Read (Identity a)

This instance would be equivalent to the derived instances of the Identity newtype if the runIdentity field were removed

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Fractional a => Fractional (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Integral a => Integral (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Real a => Real (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

toRational :: Identity a -> Rational #

RealFrac a => RealFrac (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

properFraction :: Integral b => Identity a -> (b, Identity a) #

truncate :: Integral b => Identity a -> b #

round :: Integral b => Identity a -> b #

ceiling :: Integral b => Identity a -> b #

floor :: Integral b => Identity a -> b #

Show a => Show (Identity a)

This instance would be equivalent to the derived instances of the Identity newtype if the runIdentity field were removed

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

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

show :: Identity a -> String #

showList :: [Identity a] -> ShowS #

Cql a => PrivateTuple (Identity a) 
Instance details

Defined in Database.CQL.Protocol.Tuple

Cql a => Tuple (Identity a) 
Instance details

Defined in Database.CQL.Protocol.Tuple

NFData a => NFData (Identity a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Identity a -> () #

Eq a => Eq (Identity a)

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

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

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

Ord a => Ord (Identity a)

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

compare :: Identity a -> Identity a -> Ordering #

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

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

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

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

max :: Identity a -> Identity a -> Identity a #

min :: Identity a -> Identity a -> Identity a #

Hashable a => Hashable (Identity a) 
Instance details

Defined in Data.Hashable.Class

Ixed (Identity a) 
Instance details

Defined in Control.Lens.At

Wrapped (Identity a) 
Instance details

Defined in Control.Lens.Wrapped

Associated Types

type Unwrapped (Identity a) Source #

Pretty a => Pretty (Identity a)
>>> pretty (Identity 1)
1
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Identity a -> Doc ann Source #

prettyList :: [Identity a] -> Doc ann Source #

Unbox a => Unbox (Identity a) 
Instance details

Defined in Data.Vector.Unboxed.Base

t ~ Identity b => Rewrapped (Identity a) t 
Instance details

Defined in Control.Lens.Wrapped

Each (Identity a) (Identity b) a b
each :: Traversal (Identity a) (Identity b) a b
Instance details

Defined in Control.Lens.Each

Methods

each :: Traversal (Identity a) (Identity b) a b Source #

Field1 (Identity a) (Identity b) a b 
Instance details

Defined in Control.Lens.Tuple

Methods

_1 :: Lens (Identity a) (Identity b) a b Source #

Cosieve (->) Identity 
Instance details

Defined in Data.Profunctor.Sieve

Methods

cosieve :: (a -> b) -> Identity a -> b Source #

Sieve (->) Identity 
Instance details

Defined in Data.Profunctor.Sieve

Methods

sieve :: (a -> b) -> a -> Identity b Source #

type Rep Identity 
Instance details

Defined in Data.Functor.Rep

type Rep Identity = ()
type Rep1 Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

type Rep1 Identity = D1 ('MetaData "Identity" "Data.Functor.Identity" "base" 'True) (C1 ('MetaCons "Identity" 'PrefixI 'True) (S1 ('MetaSel ('Just "runIdentity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))
newtype MVector s (Identity a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s (Identity a) = MV_Identity (MVector s a)
type Rep (Identity a)

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

type Rep (Identity a) = D1 ('MetaData "Identity" "Data.Functor.Identity" "base" 'True) (C1 ('MetaCons "Identity" 'PrefixI 'True) (S1 ('MetaSel ('Just "runIdentity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
type Index (Identity a) 
Instance details

Defined in Control.Lens.At

type Index (Identity a) = ()
type IxValue (Identity a) 
Instance details

Defined in Control.Lens.At

type IxValue (Identity a) = a
type Unwrapped (Identity a) 
Instance details

Defined in Control.Lens.Wrapped

type Unwrapped (Identity a) = a
newtype Vector (Identity a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector (Identity a) = V_Identity (Vector a)

data W Source #

Type tag for write queries, i.e. 'QueryString W a b'.

data Consistency Source #

Consistency level.

See: Consistency

Constructors

Any 
One 
LocalOne 
Two 
Three 
Quorum 
LocalQuorum 
All 
EachQuorum

Only for write queries.

Serial

Only for read queries.

LocalSerial

Only for read queries.

Instances

Instances details
Show Consistency 
Instance details

Defined in Database.CQL.Protocol.Types

Eq Consistency 
Instance details

Defined in Database.CQL.Protocol.Types

newtype QueryString k a b Source #

Constructors

QueryString 

Fields

Instances

Instances details
RunQ QueryString 
Instance details

Defined in Database.CQL.IO

Methods

runQ :: (MonadClient m, Tuple a, Tuple b) => QueryString k a b -> QueryParams a -> m (HostResponse k a b) Source #

IsString (QueryString k a b) 
Instance details

Defined in Database.CQL.Protocol.Types

Methods

fromString :: String -> QueryString k a b #

Show (QueryString k a b) 
Instance details

Defined in Database.CQL.Protocol.Types

Methods

showsPrec :: Int -> QueryString k a b -> ShowS #

show :: QueryString k a b -> String #

showList :: [QueryString k a b] -> ShowS #

Eq (QueryString k a b) 
Instance details

Defined in Database.CQL.Protocol.Types

Methods

(==) :: QueryString k a b -> QueryString k a b -> Bool #

(/=) :: QueryString k a b -> QueryString k a b -> Bool #

data Row Source #

A row is a vector of Values.

Instances

Instances details
Show Row 
Instance details

Defined in Database.CQL.Protocol.Tuple

Methods

showsPrec :: Int -> Row -> ShowS #

show :: Row -> String #

showList :: [Row] -> ShowS #

PrivateTuple Row 
Instance details

Defined in Database.CQL.Protocol.Tuple

Tuple Row 
Instance details

Defined in Database.CQL.Protocol.Tuple

Eq Row 
Instance details

Defined in Database.CQL.Protocol.Tuple

Methods

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

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

data SerialConsistency Source #

Consistency level for the serial phase of conditional updates (aka "lightweight transactions").

See: SerialConsistency

Constructors

SerialConsistency

Default. Quorum-based linearizable consistency.

LocalSerialConsistency

Like SerialConsistency except confined to a single (logical) data center.

Instances

Instances details
Show SerialConsistency 
Instance details

Defined in Database.CQL.Protocol.Request

data QueryParams a Source #

Query parameters.

Instances

Instances details
Show a => Show (QueryParams a) 
Instance details

Defined in Database.CQL.Protocol.Request

newtype InetAddr #

Constructors

InetAddr 

Fields

Instances

Instances details
Show InetAddr 
Instance details

Defined in Database.CQL.IO.Cluster.Host

Eq InetAddr 
Instance details

Defined in Database.CQL.IO.Cluster.Host

Ord InetAddr 
Instance details

Defined in Database.CQL.IO.Cluster.Host

data HostResponse k a b #

Constructors

HostResponse 

Fields

Instances

Instances details
Show b => Show (HostResponse k a b) 
Instance details

Defined in Database.CQL.IO.Cluster.Host

Methods

showsPrec :: Int -> HostResponse k a b -> ShowS #

show :: HostResponse k a b -> String #

showList :: [HostResponse k a b] -> ShowS #

data Host #

Instances

Instances details
Show Host 
Instance details

Defined in Database.CQL.IO.Cluster.Host

Methods

showsPrec :: Int -> Host -> ShowS #

show :: Host -> String #

showList :: [Host] -> ShowS #

Eq Host 
Instance details

Defined in Database.CQL.IO.Cluster.Host

Methods

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

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

Ord Host 
Instance details

Defined in Database.CQL.IO.Cluster.Host

Methods

compare :: Host -> Host -> Ordering #

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

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

(>) :: Host -> Host -> Bool #

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

max :: Host -> Host -> Host #

min :: Host -> Host -> Host #

data Policy #

Constructors

Policy 

Fields

data ConnId #

Instances

Instances details
Eq ConnId 
Instance details

Defined in Database.CQL.IO.Connection.Settings

Methods

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

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

Ord ConnId 
Instance details

Defined in Database.CQL.IO.Connection.Settings

Hashable ConnId 
Instance details

Defined in Database.CQL.IO.Connection.Settings

newtype AuthPass #

Constructors

AuthPass Text 

newtype AuthUser #

Constructors

AuthUser Text 

data LogLevel #

Constructors

LogDebug 
LogInfo 
LogWarn 
LogError 

Instances

Instances details
Read LogLevel 
Instance details

Defined in Database.CQL.IO.Log

Show LogLevel 
Instance details

Defined in Database.CQL.IO.Log

Eq LogLevel 
Instance details

Defined in Database.CQL.IO.Log

Ord LogLevel 
Instance details

Defined in Database.CQL.IO.Log

data Logger #

Constructors

Logger 

Fields

data PrepQuery k a b #

Instances

Instances details
RunQ PrepQuery 
Instance details

Defined in Database.CQL.IO

Methods

runQ :: (MonadClient m, Tuple a, Tuple b) => PrepQuery k a b -> QueryParams a -> m (HostResponse k a b) Source #

IsString (PrepQuery k a b) 
Instance details

Defined in Database.CQL.IO.PrepQuery

Methods

fromString :: String -> PrepQuery k a b #

data Settings #

data ClientState #

Instances

Instances details
MonadReader ClientState Client 
Instance details

Defined in Database.CQL.IO.Client

data DebugInfo #

Constructors

DebugInfo 

Fields

Instances

Instances details
Show DebugInfo 
Instance details

Defined in Database.CQL.IO.Client

class (MonadIO m, MonadThrow m) => MonadClient (m :: Type -> Type) where #

Methods

liftClient :: Client a -> m a #

localState :: (ClientState -> ClientState) -> m a -> m a #

Instances

Instances details
MonadClient Client 
Instance details

Defined in Database.CQL.IO.Client

MonadClient m => MonadClient (ExceptT e m) 
Instance details

Defined in Database.CQL.IO.Client

Methods

liftClient :: Client a -> ExceptT e m a #

localState :: (ClientState -> ClientState) -> ExceptT e m a -> ExceptT e m a #

MonadClient m => MonadClient (ReaderT r m) 
Instance details

Defined in Database.CQL.IO.Client

Methods

liftClient :: Client a -> ReaderT r m a #

localState :: (ClientState -> ClientState) -> ReaderT r m a -> ReaderT r m a #

MonadClient m => MonadClient (StateT s m) 
Instance details

Defined in Database.CQL.IO.Client

Methods

liftClient :: Client a -> StateT s m a #

localState :: (ClientState -> ClientState) -> StateT s m a -> StateT s m a #

MonadClient m => MonadClient (StateT s m) 
Instance details

Defined in Database.CQL.IO.Client

Methods

liftClient :: Client a -> StateT s m a #

localState :: (ClientState -> ClientState) -> StateT s m a -> StateT s m a #

data Client a #

Instances

Instances details
MonadIO Client 
Instance details

Defined in Database.CQL.IO.Client

Methods

liftIO :: IO a -> Client a #

Applicative Client 
Instance details

Defined in Database.CQL.IO.Client

Methods

pure :: a -> Client a #

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

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

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

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

Functor Client 
Instance details

Defined in Database.CQL.IO.Client

Methods

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

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

Monad Client 
Instance details

Defined in Database.CQL.IO.Client

Methods

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

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

return :: a -> Client a #

MonadClient Client 
Instance details

Defined in Database.CQL.IO.Client

MonadCatch Client 
Instance details

Defined in Database.CQL.IO.Client

Methods

catch :: (HasCallStack, Exception e) => Client a -> (e -> Client a) -> Client a #

MonadMask Client 
Instance details

Defined in Database.CQL.IO.Client

Methods

mask :: HasCallStack => ((forall a. Client a -> Client a) -> Client b) -> Client b #

uninterruptibleMask :: HasCallStack => ((forall a. Client a -> Client a) -> Client b) -> Client b #

generalBracket :: HasCallStack => Client a -> (a -> ExitCase b -> Client c) -> (a -> Client b) -> Client (b, c) #

MonadThrow Client 
Instance details

Defined in Database.CQL.IO.Client

Methods

throwM :: (HasCallStack, Exception e) => e -> Client a #

MonadUnliftIO Client 
Instance details

Defined in Database.CQL.IO.Client

Methods

withRunInIO :: ((forall a. Client a -> IO a) -> IO b) -> Client b Source #

MonadReader ClientState Client 
Instance details

Defined in Database.CQL.IO.Client

data BatchM a #

Instances

Instances details
Applicative BatchM 
Instance details

Defined in Database.CQL.IO.Batch

Methods

pure :: a -> BatchM a #

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

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

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

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

Functor BatchM 
Instance details

Defined in Database.CQL.IO.Batch

Methods

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

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

Monad BatchM 
Instance details

Defined in Database.CQL.IO.Batch

Methods

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

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

return :: a -> BatchM a #

data Page a Source #

Return value of paginate. Contains the actual result values as well as an indication of whether there is more data available and the actual action to fetch the next page.

Constructors

Page 

Fields

Instances

Instances details
Functor Page 
Instance details

Defined in Database.CQL.IO

Methods

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

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

class RunQ (q :: Type -> Type -> Type -> Type) where Source #

A type which can be run as a query.

Methods

runQ :: (MonadClient m, Tuple a, Tuple b) => q k a b -> QueryParams a -> m (HostResponse k a b) Source #

Instances

Instances details
RunQ QueryString 
Instance details

Defined in Database.CQL.IO

Methods

runQ :: (MonadClient m, Tuple a, Tuple b) => QueryString k a b -> QueryParams a -> m (HostResponse k a b) Source #

RunQ PrepQuery 
Instance details

Defined in Database.CQL.IO

Methods

runQ :: (MonadClient m, Tuple a, Tuple b) => PrepQuery k a b -> QueryParams a -> m (HostResponse k a b) Source #

retry :: MonadClient m => RetrySettings -> m a -> m a #

write :: (MonadClient m, Tuple a, RunQ q) => q W a () -> QueryParams a -> m () Source #

Run a CQL write-only query (e.g. insert/update/delete), returning no result.

/Note: If the write operation is conditional, i.e. is in fact a "lightweight transaction" returning a result, trans must be used instead./

shutdown :: MonadIO m => ClientState -> m () #

once :: MonadClient m => m a -> m a #

trans :: (MonadClient m, Tuple a, RunQ q) => q W a Row -> QueryParams a -> m [Row] Source #

Run a CQL conditional write query (e.g. insert/update/delete) as a "lightweight transaction", returning the result Rows describing the outcome.

fromRow :: Cql a => Int -> Row -> Either String a Source #

Convert a row element.

prepared :: QueryString k a b -> PrepQuery k a b #

defRetryHandlers :: forall (m :: Type -> Type). Monad m => [RetryStatus -> Handler m Bool] #

eagerRetryHandlers :: forall (m :: Type -> Type). Monad m => [RetryStatus -> Handler m Bool] #

runClient :: MonadIO m => ClientState -> Client a -> m a #

request :: (MonadClient m, Tuple a, Tuple b) => Request k a b -> m (HostResponse k a b) #

getResult :: MonadThrow m => HostResponse k a b -> m (Result k a b) #

addQuery :: (Show a, Tuple a, Tuple b) => QueryString W a b -> a -> BatchM () #

addPrepQuery :: (Show a, Tuple a, Tuple b) => PrepQuery W a b -> a -> BatchM () #

query :: (MonadClient m, Tuple a, Tuple b, RunQ q) => q R a b -> QueryParams a -> m [b] Source #

Run a CQL read-only query returning a list of results.

query1 :: (MonadClient m, Tuple a, Tuple b, RunQ q) => q R a b -> QueryParams a -> m (Maybe b) Source #

Run a CQL read-only query returning a single result.

schema :: (MonadClient m, Tuple a, RunQ q) => q S a () -> QueryParams a -> m (Maybe SchemaChange) Source #

Run a CQL schema query, returning SchemaChange information, if any.

batch :: MonadClient m => BatchM () -> m () Source #

Run a batch query against a Cassandra node.

emptyPage :: Page a Source #

A page with an empty result list.

paginate :: (MonadClient m, Tuple a, Tuple b, RunQ q) => q R a b -> QueryParams a -> m (Page b) Source #

Run a CQL read-only query against a Cassandra node.

This function is like query, but limits the result size to 10000 (default) unless there is an explicit size restriction given in QueryParams. The returned Page can be used to continue the query.

Please note that -- as of Cassandra 2.1.0 -- if your requested page size is equal to the result size, hasMore might be true and a subsequent nextPage will return an empty list in result.

mkLogger :: Logger -> Logger Source #

Create a cql-io Logger that delegates log messages to the given tinylog Logger. Requests and responses are logged on Trace level.

initialContactsDisco :: MonadIO m => String -> String -> m (NonEmpty String) Source #

This function is likely only useful at Wire, as it is Wire-infra specific. Given a server name and a url returning a wire-custom "disco" json (AWS describe-instances-like json), e.g. { "roles" : { "server_name": [ {"privateIpAddress": "...", ...}, {...} ] } }, return a list of IP addresses.

initialContactsPlain :: MonadIO m => Text -> m (NonEmpty String) Source #

Puts the address into a list using the same signature as the other initialContacts

dcAwareRandomPolicy :: Text -> IO Policy Source #

Return hosts in random order for a given DC.

This is only useful during a cassandra datacentre migration.

dcFilterPolicyIfConfigured :: Logger -> Maybe Text -> IO Policy Source #

Use dcAwareRandomPolicy if config option filterNodesByDatacentre is set, otherwise use all available nodes with the default random policy.

This is only useful during a cassandra datacentre migration.