cql-4.0.3: Cassandra CQL binary protocol.
Safe HaskellNone
LanguageHaskell2010

Database.CQL.Protocol.Internal

Description

Like Database.CQL.Protocol but exports the whole encode/decode machinery for all types.

Synopsis

Cql type-class

class Cql a where Source #

A type that can be converted from and to some CQL Value.

This type-class is used to map custom types to Cassandra data-types. For example:

newtype MyType = MyType Int32

instance Cql MyType where
    ctype              = Tagged IntColumn
    toCql (MyType i)   = CqlInt i
    fromCql (CqlInt i) = Right (MyType i)
    fromCql _          = Left "Expected CqlInt"

Methods

ctype :: Tagged a ColumnType Source #

the column-type of a

toCql :: a -> Value Source #

map a to some CQL data-type

fromCql :: Value -> Either String a Source #

map a CQL value back to a

Instances

Instances details
Cql Bool Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Cql Double Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Cql Float Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Cql Int8 Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Cql Int16 Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Cql Int32 Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Cql Int64 Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Cql Integer Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Cql Decimal Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Cql IP Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Cql Text Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Cql UTCTime Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Cql UUID Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Cql TimeUuid Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Cql Counter Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Cql Blob Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Cql Ascii Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Cql a => Cql [a] Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Cql a => Cql (Maybe a) Source #

Please note that due to the fact that Cassandra internally represents empty collection type values (i.e. lists, maps and sets) as null, we can not distinguish Just [] from Nothing on response decoding.

Instance details

Defined in Database.CQL.Protocol.Class

Cql a => Cql (Set a) Source # 
Instance details

Defined in Database.CQL.Protocol.Class

(Cql a1, Cql a2) => Cql (a1, a2) Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Methods

ctype :: Tagged (a1, a2) ColumnType Source #

toCql :: (a1, a2) -> Value Source #

fromCql :: Value -> Either String (a1, a2) Source #

(Cql a, Cql b) => Cql (Map a b) Source # 
Instance details

Defined in Database.CQL.Protocol.Class

(Cql a1, Cql a2, Cql a3) => Cql (a1, a2, a3) Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Methods

ctype :: Tagged (a1, a2, a3) ColumnType Source #

toCql :: (a1, a2, a3) -> Value Source #

fromCql :: Value -> Either String (a1, a2, a3) Source #

(Cql a1, Cql a2, Cql a3, Cql a4) => Cql (a1, a2, a3, a4) Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Methods

ctype :: Tagged (a1, a2, a3, a4) ColumnType Source #

toCql :: (a1, a2, a3, a4) -> Value Source #

fromCql :: Value -> Either String (a1, a2, a3, a4) Source #

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5) => Cql (a1, a2, a3, a4, a5) Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Methods

ctype :: Tagged (a1, a2, a3, a4, a5) ColumnType Source #

toCql :: (a1, a2, a3, a4, a5) -> Value Source #

fromCql :: Value -> Either String (a1, a2, a3, a4, a5) Source #

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6) => Cql (a1, a2, a3, a4, a5, a6) Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Methods

ctype :: Tagged (a1, a2, a3, a4, a5, a6) ColumnType Source #

toCql :: (a1, a2, a3, a4, a5, a6) -> Value Source #

fromCql :: Value -> Either String (a1, a2, a3, a4, a5, a6) Source #

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7) => Cql (a1, a2, a3, a4, a5, a6, a7) Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Methods

ctype :: Tagged (a1, a2, a3, a4, a5, a6, a7) ColumnType Source #

toCql :: (a1, a2, a3, a4, a5, a6, a7) -> Value Source #

fromCql :: Value -> Either String (a1, a2, a3, a4, a5, a6, a7) Source #

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8) => Cql (a1, a2, a3, a4, a5, a6, a7, a8) Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Methods

ctype :: Tagged (a1, a2, a3, a4, a5, a6, a7, a8) ColumnType Source #

toCql :: (a1, a2, a3, a4, a5, a6, a7, a8) -> Value Source #

fromCql :: Value -> Either String (a1, a2, a3, a4, a5, a6, a7, a8) Source #

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9) => Cql (a1, a2, a3, a4, a5, a6, a7, a8, a9) Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Methods

ctype :: Tagged (a1, a2, a3, a4, a5, a6, a7, a8, a9) ColumnType Source #

toCql :: (a1, a2, a3, a4, a5, a6, a7, a8, a9) -> Value Source #

fromCql :: Value -> Either String (a1, a2, a3, a4, a5, a6, a7, a8, a9) Source #

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10) => Cql (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Methods

ctype :: Tagged (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) ColumnType Source #

toCql :: (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) -> Value Source #

fromCql :: Value -> Either String (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) Source #

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11) => Cql (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Methods

ctype :: Tagged (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) ColumnType Source #

toCql :: (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) -> Value Source #

fromCql :: Value -> Either String (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) Source #

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12) => Cql (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Methods

ctype :: Tagged (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) ColumnType Source #

toCql :: (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) -> Value Source #

fromCql :: Value -> Either String (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) Source #

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13) => Cql (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Methods

ctype :: Tagged (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) ColumnType Source #

toCql :: (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) -> Value Source #

fromCql :: Value -> Either String (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) Source #

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14) => Cql (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Methods

ctype :: Tagged (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) ColumnType Source #

toCql :: (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) -> Value Source #

fromCql :: Value -> Either String (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) Source #

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15) => Cql (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Methods

ctype :: Tagged (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) ColumnType Source #

toCql :: (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) -> Value Source #

fromCql :: Value -> Either String (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) Source #

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16) => Cql (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) Source # 
Instance details

Defined in Database.CQL.Protocol.Class

Methods

ctype :: Tagged (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) ColumnType Source #

toCql :: (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) -> Value Source #

fromCql :: Value -> Either String (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) Source #

Basic type definitions

newtype Keyspace Source #

Constructors

Keyspace 

Fields

Instances

Instances details
Eq Keyspace Source # 
Instance details

Defined in Database.CQL.Protocol.Types

Show Keyspace Source # 
Instance details

Defined in Database.CQL.Protocol.Types

newtype Table Source #

Constructors

Table 

Fields

Instances

Instances details
Eq Table Source # 
Instance details

Defined in Database.CQL.Protocol.Types

Methods

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

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

Show Table Source # 
Instance details

Defined in Database.CQL.Protocol.Types

Methods

showsPrec :: Int -> Table -> ShowS #

show :: Table -> String #

showList :: [Table] -> ShowS #

newtype PagingState Source #

Opaque token passed to the server to continue result paging.

Constructors

PagingState 

Instances

Instances details
Eq PagingState Source # 
Instance details

Defined in Database.CQL.Protocol.Types

Show PagingState Source # 
Instance details

Defined in Database.CQL.Protocol.Types

newtype QueryId k a b Source #

ID representing a prepared query.

Constructors

QueryId 

Instances

Instances details
Eq (QueryId k a b) Source # 
Instance details

Defined in Database.CQL.Protocol.Types

Methods

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

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

Show (QueryId k a b) Source # 
Instance details

Defined in Database.CQL.Protocol.Types

Methods

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

show :: QueryId k a b -> String #

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

newtype QueryString k a b Source #

Constructors

QueryString 

Fields

Instances

Instances details
Eq (QueryString k a b) Source # 
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 #

Show (QueryString k a b) Source # 
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 #

IsString (QueryString k a b) Source # 
Instance details

Defined in Database.CQL.Protocol.Types

Methods

fromString :: String -> QueryString k a b #

data Version Source #

CQL binary protocol version.

Constructors

V3

version 3

V4

version 4

Instances

Instances details
Eq Version Source # 
Instance details

Defined in Database.CQL.Protocol.Types

Methods

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

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

Ord Version Source # 
Instance details

Defined in Database.CQL.Protocol.Types

Show Version Source # 
Instance details

Defined in Database.CQL.Protocol.Types

data CqlVersion Source #

The CQL version (not the binary protocol version).

Constructors

Cqlv300 
CqlVersion !Text 

Instances

Instances details
Eq CqlVersion Source # 
Instance details

Defined in Database.CQL.Protocol.Types

Show CqlVersion Source # 
Instance details

Defined in Database.CQL.Protocol.Types

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
Eq Consistency Source # 
Instance details

Defined in Database.CQL.Protocol.Types

Show Consistency Source # 
Instance details

Defined in Database.CQL.Protocol.Types

data OpCode Source #

An opcode is a tag to distinguish protocol frame bodies.

Instances

Instances details
Eq OpCode Source # 
Instance details

Defined in Database.CQL.Protocol.Types

Methods

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

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

Show OpCode Source # 
Instance details

Defined in Database.CQL.Protocol.Types

newtype Ascii Source #

Constructors

Ascii 

Fields

Instances

Instances details
Eq Ascii Source # 
Instance details

Defined in Database.CQL.Protocol.Types

Methods

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

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

Ord Ascii Source # 
Instance details

Defined in Database.CQL.Protocol.Types

Methods

compare :: Ascii -> Ascii -> Ordering #

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

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

(>) :: Ascii -> Ascii -> Bool #

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

max :: Ascii -> Ascii -> Ascii #

min :: Ascii -> Ascii -> Ascii #

Show Ascii Source # 
Instance details

Defined in Database.CQL.Protocol.Types

Methods

showsPrec :: Int -> Ascii -> ShowS #

show :: Ascii -> String #

showList :: [Ascii] -> ShowS #

IsString Ascii Source # 
Instance details

Defined in Database.CQL.Protocol.Types

Methods

fromString :: String -> Ascii #

Cql Ascii Source # 
Instance details

Defined in Database.CQL.Protocol.Class

newtype Blob Source #

Constructors

Blob 

Fields

Instances

Instances details
Eq Blob Source # 
Instance details

Defined in Database.CQL.Protocol.Types

Methods

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

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

Ord Blob Source # 
Instance details

Defined in Database.CQL.Protocol.Types

Methods

compare :: Blob -> Blob -> Ordering #

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

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

(>) :: Blob -> Blob -> Bool #

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

max :: Blob -> Blob -> Blob #

min :: Blob -> Blob -> Blob #

Show Blob Source # 
Instance details

Defined in Database.CQL.Protocol.Types

Methods

showsPrec :: Int -> Blob -> ShowS #

show :: Blob -> String #

showList :: [Blob] -> ShowS #

Cql Blob Source # 
Instance details

Defined in Database.CQL.Protocol.Class

newtype Counter Source #

Constructors

Counter 

Fields

Instances

Instances details
Eq Counter Source # 
Instance details

Defined in Database.CQL.Protocol.Types

Methods

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

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

Ord Counter Source # 
Instance details

Defined in Database.CQL.Protocol.Types

Show Counter Source # 
Instance details

Defined in Database.CQL.Protocol.Types

Cql Counter Source # 
Instance details

Defined in Database.CQL.Protocol.Class

newtype Set a Source #

Constructors

Set 

Fields

Instances

Instances details
(Eq a, Ord a) => Eq (Set a) Source # 
Instance details

Defined in Database.CQL.Protocol.Types

Methods

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

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

Show a => Show (Set a) Source # 
Instance details

Defined in Database.CQL.Protocol.Types

Methods

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

show :: Set a -> String #

showList :: [Set a] -> ShowS #

Cql a => Cql (Set a) Source # 
Instance details

Defined in Database.CQL.Protocol.Class

newtype Map a b Source #

Constructors

Map 

Fields

Instances

Instances details
(Eq k, Eq v, Ord k) => Eq (Map k v) Source # 
Instance details

Defined in Database.CQL.Protocol.Types

Methods

(==) :: Map k v -> Map k v -> Bool #

(/=) :: Map k v -> Map k v -> Bool #

(Show a, Show b) => Show (Map a b) Source # 
Instance details

Defined in Database.CQL.Protocol.Types

Methods

showsPrec :: Int -> Map a b -> ShowS #

show :: Map a b -> String #

showList :: [Map a b] -> ShowS #

(Cql a, Cql b) => Cql (Map a b) Source # 
Instance details

Defined in Database.CQL.Protocol.Class

data Value Source #

A CQL value. The various constructors correspond to CQL data-types for individual columns in Cassandra.

Instances

Instances details
Eq Value Source # 
Instance details

Defined in Database.CQL.Protocol.Types

Methods

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

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

Show Value Source # 
Instance details

Defined in Database.CQL.Protocol.Types

Methods

showsPrec :: Int -> Value -> ShowS #

show :: Value -> String #

showList :: [Value] -> ShowS #

newtype Tagged a b Source #

Tag some value with a phantom type.

Constructors

Tagged 

Fields

retag :: Tagged a c -> Tagged b c Source #

data R Source #

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

data W Source #

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

data S Source #

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

Header

data Header Source #

Protocol frame header.

Instances

Instances details
Show Header Source # 
Instance details

Defined in Database.CQL.Protocol.Header

data HeaderType Source #

Constructors

RqHeader

A request frame header.

RsHeader

A response frame header.

Instances

Instances details
Show HeaderType Source # 
Instance details

Defined in Database.CQL.Protocol.Header

header :: Version -> ByteString -> Either String Header Source #

Deserialise a frame header using the version specific decoding format.

Length

newtype Length Source #

The type denoting a protocol frame length.

Constructors

Length 

Fields

Instances

Instances details
Eq Length Source # 
Instance details

Defined in Database.CQL.Protocol.Header

Methods

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

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

Show Length Source # 
Instance details

Defined in Database.CQL.Protocol.Header

StreamId

data StreamId Source #

Streams allow multiplexing of requests over a single communication channel. The StreamId correlates Requests with Responses.

Instances

Instances details
Eq StreamId Source # 
Instance details

Defined in Database.CQL.Protocol.Header

Show StreamId Source # 
Instance details

Defined in Database.CQL.Protocol.Header

mkStreamId :: Integral i => i -> StreamId Source #

Create a StreamId from the given integral value. In version 2, a StreamId is an Int8 and in version 3 an Int16.

fromStreamId :: StreamId -> Int Source #

Convert the stream ID to an integer.

Flags

data Flags Source #

Type representing header flags. Flags form a monoid and can be used as in compress <> tracing <> mempty.

Instances

Instances details
Eq Flags Source # 
Instance details

Defined in Database.CQL.Protocol.Header

Methods

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

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

Show Flags Source # 
Instance details

Defined in Database.CQL.Protocol.Header

Methods

showsPrec :: Int -> Flags -> ShowS #

show :: Flags -> String #

showList :: [Flags] -> ShowS #

Semigroup Flags Source # 
Instance details

Defined in Database.CQL.Protocol.Header

Methods

(<>) :: Flags -> Flags -> Flags #

sconcat :: NonEmpty Flags -> Flags #

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

Monoid Flags Source # 
Instance details

Defined in Database.CQL.Protocol.Header

Methods

mempty :: Flags #

mappend :: Flags -> Flags -> Flags #

mconcat :: [Flags] -> Flags #

compress :: Flags Source #

Compression flag. If set, the frame body is compressed.

tracing :: Flags Source #

Tracing flag. If a request support tracing and the tracing flag was set, the response to this request will have the tracing flag set and contain tracing information.

isSet :: Flags -> Flags -> Bool Source #

Check if a particular flag is present.

Request

data Request k a b Source #

The type corresponding to the protocol request frame.

The type parameter k denotes the kind of request. It is present to allow distinguishing read operations from write operations. Use R for read, W for write and S for schema related operations.

a represents the argument type and b the return type of this request.

Instances

Instances details
Show a => Show (Request k a b) Source # 
Instance details

Defined in Database.CQL.Protocol.Request

Methods

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

show :: Request k a b -> String #

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

pack Source #

Arguments

:: Tuple a 
=> Version

protocol version, which determines the encoding

-> Compression

compression to use

-> Bool

enable/disable tracing

-> StreamId

the stream Id to use

-> Request k a b

the actual request to serialise

-> Either String ByteString 

Serialise the given request, optionally using compression. The result is either an error description in case of failure or a binary protocol frame, including Header, Length and body.

getOpCode :: Request k a b -> OpCode Source #

Get the protocol OpCode corresponding to the given Request.

Options

data Options Source #

An options request, send prior to Startup to request the server's startup options.

Constructors

Options 

Instances

Instances details
Show Options Source # 
Instance details

Defined in Database.CQL.Protocol.Request

Startup

data Startup Source #

A startup request which is used when initialising a connection to the server. It specifies the CQL version to use and optionally the compression algorithm.

Instances

Instances details
Show Startup Source # 
Instance details

Defined in Database.CQL.Protocol.Request

Auth Response

newtype AuthResponse Source #

A request send in response to a previous authentication challenge.

Constructors

AuthResponse ByteString 

Instances

Instances details
Show AuthResponse Source # 
Instance details

Defined in Database.CQL.Protocol.Request

Register

newtype Register Source #

Register's the connection this request is made through, to receive server events.

Constructors

Register [EventType] 

Instances

Instances details
Show Register Source # 
Instance details

Defined in Database.CQL.Protocol.Request

data EventType Source #

Event types to register.

Constructors

TopologyChangeEvent

events related to change in the cluster topology

StatusChangeEvent

events related to change of node status

SchemaChangeEvent

events related to schema change

Instances

Instances details
Show EventType Source # 
Instance details

Defined in Database.CQL.Protocol.Request

Query

data Query k a b Source #

A CQL query (select, insert, etc.).

Constructors

Query !(QueryString k a b) !(QueryParams a) 

Instances

Instances details
Show a => Show (Query k a b) Source # 
Instance details

Defined in Database.CQL.Protocol.Request

Methods

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

show :: Query k a b -> String #

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

data QueryParams a Source #

Query parameters.

Constructors

QueryParams 

Fields

  • consistency :: !Consistency

    (Regular) consistency level to use.

  • skipMetaData :: !Bool

    Whether to omit the metadata in the Response of the query. This is an optimisation only relevant for use with prepared queries, for which the metadata obtained from the PreparedResult may be reused.

  • values :: a

    The bound parameters of the query.

  • pageSize :: Maybe Int32

    The desired maximum result set size.

  • queryPagingState :: Maybe PagingState

    The current paging state that determines the "offset" of the results to return for a read query.

  • serialConsistency :: Maybe SerialConsistency

    Serial consistency level to use for conditional updates (aka "lightweight transactions"). Irrelevant for any other queries.

  • enableTracing :: Maybe Bool

    Whether tracing should be enabled for the query, in which case the Response will carry a traceId.

Instances

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

Defined in Database.CQL.Protocol.Request

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.

Batch

data Batch Source #

Allows executing a list of queries (prepared or not) as a batch.

Instances

Instances details
Show Batch Source # 
Instance details

Defined in Database.CQL.Protocol.Request

Methods

showsPrec :: Int -> Batch -> ShowS #

show :: Batch -> String #

showList :: [Batch] -> ShowS #

data BatchQuery where Source #

A GADT to unify queries and prepared queries both of which can be used in batch requests.

Constructors

BatchQuery :: (Show a, Tuple a, Tuple b) => !(QueryString W a b) -> !a -> BatchQuery 
BatchPrepared :: (Show a, Tuple a, Tuple b) => !(QueryId W a b) -> !a -> BatchQuery 

Instances

Instances details
Show BatchQuery Source # 
Instance details

Defined in Database.CQL.Protocol.Request

data BatchType Source #

Constructors

BatchLogged

default, uses a batch log for atomic application

BatchUnLogged

skip the batch log

BatchCounter

used for batched counter updates

Instances

Instances details
Show BatchType Source # 
Instance details

Defined in Database.CQL.Protocol.Request

Prepare

newtype Prepare k a b Source #

Prepare a query for later execution (cf. Execute).

Constructors

Prepare (QueryString k a b) 

Instances

Instances details
Show (Prepare k a b) Source # 
Instance details

Defined in Database.CQL.Protocol.Request

Methods

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

show :: Prepare k a b -> String #

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

Execute

data Execute k a b Source #

Executes a prepared query.

Constructors

Execute !(QueryId k a b) !(QueryParams a) 

Instances

Instances details
Show a => Show (Execute k a b) Source # 
Instance details

Defined in Database.CQL.Protocol.Request

Methods

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

show :: Execute k a b -> String #

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

Response

data Response k a b Source #

The type corresponding to the protocol response frame.

The type parameter k denotes the kind of response. It is present to allow distinguishing read operations from write operations. Use R for read, W for write and S for schema related operations.

a represents the argument type and b the return type of this response.

Instances

Instances details
Show b => Show (Response k a b) Source # 
Instance details

Defined in Database.CQL.Protocol.Response

Methods

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

show :: Response k a b -> String #

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

warnings :: Response k a b -> [Text] Source #

Get server warnings from response if any.

traceId :: Response k a b -> Maybe UUID Source #

Get server trace ID from response if any.

unpack :: (Tuple a, Tuple b) => Compression -> Header -> ByteString -> Either String (Response k a b) Source #

Deserialise a Response from the given ByteString.

Ready

data Ready Source #

The server is ready to process queries. Response of a Startup request.

Constructors

Ready 

Instances

Instances details
Show Ready Source # 
Instance details

Defined in Database.CQL.Protocol.Response

Methods

showsPrec :: Int -> Ready -> ShowS #

show :: Ready -> String #

showList :: [Ready] -> ShowS #

Authenticate

newtype Authenticate Source #

The server requires authentication.

Constructors

Authenticate Text 

Instances

Instances details
Show Authenticate Source # 
Instance details

Defined in Database.CQL.Protocol.Response

newtype AuthChallenge Source #

A server-send authentication challenge.

Instances

Instances details
Show AuthChallenge Source # 
Instance details

Defined in Database.CQL.Protocol.Response

newtype AuthSuccess Source #

Indicates the success of an authentication phase.

Constructors

AuthSuccess (Maybe ByteString) 

Instances

Instances details
Show AuthSuccess Source # 
Instance details

Defined in Database.CQL.Protocol.Response

Result

data Result k a b Source #

Query response.

Instances

Instances details
Show b => Show (Result k a b) Source # 
Instance details

Defined in Database.CQL.Protocol.Response

Methods

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

show :: Result k a b -> String #

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

data MetaData Source #

Part of a RowsResult. Describes the result set.

Instances

Instances details
Show MetaData Source # 
Instance details

Defined in Database.CQL.Protocol.Response

data ColumnSpec Source #

The column specification. Part of MetaData unless skipMetaData in QueryParams was True.

Constructors

ColumnSpec 

Instances

Instances details
Show ColumnSpec Source # 
Instance details

Defined in Database.CQL.Protocol.Response

decodeResult :: forall k a b. (Tuple a, Tuple b) => Version -> Get (Result k a b) Source #

Supported

data Supported Source #

The startup options supported by the server. Response of an Options request.

Instances

Instances details
Show Supported Source # 
Instance details

Defined in Database.CQL.Protocol.Response

Event

data Event Source #

Messages send by the server without request, if the connection has been Registered to receive such events.

Instances

Instances details
Show Event Source # 
Instance details

Defined in Database.CQL.Protocol.Response

Methods

showsPrec :: Int -> Event -> ShowS #

show :: Event -> String #

showList :: [Event] -> ShowS #

Error

data Error Source #

Error response.

Instances

Instances details
Eq Error Source # 
Instance details

Defined in Database.CQL.Protocol.Response

Methods

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

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

Show Error Source # 
Instance details

Defined in Database.CQL.Protocol.Response

Methods

showsPrec :: Int -> Error -> ShowS #

show :: Error -> String #

showList :: [Error] -> ShowS #

Exception Error Source # 
Instance details

Defined in Database.CQL.Protocol.Response

Tuple and Record

class PrivateTuple a => Tuple a Source #

Instances

Instances details
Tuple () Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

Tuple Row Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

Cql a => Tuple (Identity a) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2) => Tuple (a1, a2) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3) => Tuple (a1, a2, a3) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4) => Tuple (a1, a2, a3, a4) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5) => Tuple (a1, a2, a3, a4, a5) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6) => Tuple (a1, a2, a3, a4, a5, a6) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7) => Tuple (a1, a2, a3, a4, a5, a6, a7) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16, Cql a17) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16, Cql a17, Cql a18) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16, Cql a17, Cql a18, Cql a19) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16, Cql a17, Cql a18, Cql a19, Cql a20) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16, Cql a17, Cql a18, Cql a19, Cql a20, Cql a21) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16, Cql a17, Cql a18, Cql a19, Cql a20, Cql a21, Cql a22) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16, Cql a17, Cql a18, Cql a19, Cql a20, Cql a21, Cql a22, Cql a23) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16, Cql a17, Cql a18, Cql a19, Cql a20, Cql a21, Cql a22, Cql a23, Cql a24) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16, Cql a17, Cql a18, Cql a19, Cql a20, Cql a21, Cql a22, Cql a23, Cql a24, Cql a25) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16, Cql a17, Cql a18, Cql a19, Cql a20, Cql a21, Cql a22, Cql a23, Cql a24, Cql a25, Cql a26) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16, Cql a17, Cql a18, Cql a19, Cql a20, Cql a21, Cql a22, Cql a23, Cql a24, Cql a25, Cql a26, Cql a27) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16, Cql a17, Cql a18, Cql a19, Cql a20, Cql a21, Cql a22, Cql a23, Cql a24, Cql a25, Cql a26, Cql a27, Cql a28) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27, a28) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16, Cql a17, Cql a18, Cql a19, Cql a20, Cql a21, Cql a22, Cql a23, Cql a24, Cql a25, Cql a26, Cql a27, Cql a28, Cql a29) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16, Cql a17, Cql a18, Cql a19, Cql a20, Cql a21, Cql a22, Cql a23, Cql a24, Cql a25, Cql a26, Cql a27, Cql a28, Cql a29, Cql a30) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29, a30) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16, Cql a17, Cql a18, Cql a19, Cql a20, Cql a21, Cql a22, Cql a23, Cql a24, Cql a25, Cql a26, Cql a27, Cql a28, Cql a29, Cql a30, Cql a31) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29, a30, a31) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16, Cql a17, Cql a18, Cql a19, Cql a20, Cql a21, Cql a22, Cql a23, Cql a24, Cql a25, Cql a26, Cql a27, Cql a28, Cql a29, Cql a30, Cql a31, Cql a32) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29, a30, a31, a32) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16, Cql a17, Cql a18, Cql a19, Cql a20, Cql a21, Cql a22, Cql a23, Cql a24, Cql a25, Cql a26, Cql a27, Cql a28, Cql a29, Cql a30, Cql a31, Cql a32, Cql a33) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29, a30, a31, a32, a33) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16, Cql a17, Cql a18, Cql a19, Cql a20, Cql a21, Cql a22, Cql a23, Cql a24, Cql a25, Cql a26, Cql a27, Cql a28, Cql a29, Cql a30, Cql a31, Cql a32, Cql a33, Cql a34) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29, a30, a31, a32, a33, a34) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16, Cql a17, Cql a18, Cql a19, Cql a20, Cql a21, Cql a22, Cql a23, Cql a24, Cql a25, Cql a26, Cql a27, Cql a28, Cql a29, Cql a30, Cql a31, Cql a32, Cql a33, Cql a34, Cql a35) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29, a30, a31, a32, a33, a34, a35) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16, Cql a17, Cql a18, Cql a19, Cql a20, Cql a21, Cql a22, Cql a23, Cql a24, Cql a25, Cql a26, Cql a27, Cql a28, Cql a29, Cql a30, Cql a31, Cql a32, Cql a33, Cql a34, Cql a35, Cql a36) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29, a30, a31, a32, a33, a34, a35, a36) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16, Cql a17, Cql a18, Cql a19, Cql a20, Cql a21, Cql a22, Cql a23, Cql a24, Cql a25, Cql a26, Cql a27, Cql a28, Cql a29, Cql a30, Cql a31, Cql a32, Cql a33, Cql a34, Cql a35, Cql a36, Cql a37) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29, a30, a31, a32, a33, a34, a35, a36, a37) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16, Cql a17, Cql a18, Cql a19, Cql a20, Cql a21, Cql a22, Cql a23, Cql a24, Cql a25, Cql a26, Cql a27, Cql a28, Cql a29, Cql a30, Cql a31, Cql a32, Cql a33, Cql a34, Cql a35, Cql a36, Cql a37, Cql a38) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29, a30, a31, a32, a33, a34, a35, a36, a37, a38) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16, Cql a17, Cql a18, Cql a19, Cql a20, Cql a21, Cql a22, Cql a23, Cql a24, Cql a25, Cql a26, Cql a27, Cql a28, Cql a29, Cql a30, Cql a31, Cql a32, Cql a33, Cql a34, Cql a35, Cql a36, Cql a37, Cql a38, Cql a39) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29, a30, a31, a32, a33, a34, a35, a36, a37, a38, a39) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16, Cql a17, Cql a18, Cql a19, Cql a20, Cql a21, Cql a22, Cql a23, Cql a24, Cql a25, Cql a26, Cql a27, Cql a28, Cql a29, Cql a30, Cql a31, Cql a32, Cql a33, Cql a34, Cql a35, Cql a36, Cql a37, Cql a38, Cql a39, Cql a40) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29, a30, a31, a32, a33, a34, a35, a36, a37, a38, a39, a40) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16, Cql a17, Cql a18, Cql a19, Cql a20, Cql a21, Cql a22, Cql a23, Cql a24, Cql a25, Cql a26, Cql a27, Cql a28, Cql a29, Cql a30, Cql a31, Cql a32, Cql a33, Cql a34, Cql a35, Cql a36, Cql a37, Cql a38, Cql a39, Cql a40, Cql a41) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29, a30, a31, a32, a33, a34, a35, a36, a37, a38, a39, a40, a41) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16, Cql a17, Cql a18, Cql a19, Cql a20, Cql a21, Cql a22, Cql a23, Cql a24, Cql a25, Cql a26, Cql a27, Cql a28, Cql a29, Cql a30, Cql a31, Cql a32, Cql a33, Cql a34, Cql a35, Cql a36, Cql a37, Cql a38, Cql a39, Cql a40, Cql a41, Cql a42) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29, a30, a31, a32, a33, a34, a35, a36, a37, a38, a39, a40, a41, a42) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16, Cql a17, Cql a18, Cql a19, Cql a20, Cql a21, Cql a22, Cql a23, Cql a24, Cql a25, Cql a26, Cql a27, Cql a28, Cql a29, Cql a30, Cql a31, Cql a32, Cql a33, Cql a34, Cql a35, Cql a36, Cql a37, Cql a38, Cql a39, Cql a40, Cql a41, Cql a42, Cql a43) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29, a30, a31, a32, a33, a34, a35, a36, a37, a38, a39, a40, a41, a42, a43) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16, Cql a17, Cql a18, Cql a19, Cql a20, Cql a21, Cql a22, Cql a23, Cql a24, Cql a25, Cql a26, Cql a27, Cql a28, Cql a29, Cql a30, Cql a31, Cql a32, Cql a33, Cql a34, Cql a35, Cql a36, Cql a37, Cql a38, Cql a39, Cql a40, Cql a41, Cql a42, Cql a43, Cql a44) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29, a30, a31, a32, a33, a34, a35, a36, a37, a38, a39, a40, a41, a42, a43, a44) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16, Cql a17, Cql a18, Cql a19, Cql a20, Cql a21, Cql a22, Cql a23, Cql a24, Cql a25, Cql a26, Cql a27, Cql a28, Cql a29, Cql a30, Cql a31, Cql a32, Cql a33, Cql a34, Cql a35, Cql a36, Cql a37, Cql a38, Cql a39, Cql a40, Cql a41, Cql a42, Cql a43, Cql a44, Cql a45) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29, a30, a31, a32, a33, a34, a35, a36, a37, a38, a39, a40, a41, a42, a43, a44, a45) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16, Cql a17, Cql a18, Cql a19, Cql a20, Cql a21, Cql a22, Cql a23, Cql a24, Cql a25, Cql a26, Cql a27, Cql a28, Cql a29, Cql a30, Cql a31, Cql a32, Cql a33, Cql a34, Cql a35, Cql a36, Cql a37, Cql a38, Cql a39, Cql a40, Cql a41, Cql a42, Cql a43, Cql a44, Cql a45, Cql a46) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29, a30, a31, a32, a33, a34, a35, a36, a37, a38, a39, a40, a41, a42, a43, a44, a45, a46) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16, Cql a17, Cql a18, Cql a19, Cql a20, Cql a21, Cql a22, Cql a23, Cql a24, Cql a25, Cql a26, Cql a27, Cql a28, Cql a29, Cql a30, Cql a31, Cql a32, Cql a33, Cql a34, Cql a35, Cql a36, Cql a37, Cql a38, Cql a39, Cql a40, Cql a41, Cql a42, Cql a43, Cql a44, Cql a45, Cql a46, Cql a47) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29, a30, a31, a32, a33, a34, a35, a36, a37, a38, a39, a40, a41, a42, a43, a44, a45, a46, a47) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7, Cql a8, Cql a9, Cql a10, Cql a11, Cql a12, Cql a13, Cql a14, Cql a15, Cql a16, Cql a17, Cql a18, Cql a19, Cql a20, Cql a21, Cql a22, Cql a23, Cql a24, Cql a25, Cql a26, Cql a27, Cql a28, Cql a29, Cql a30, Cql a31, Cql a32, Cql a33, Cql a34, Cql a35, Cql a36, Cql a37, Cql a38, Cql a39, Cql a40, Cql a41, Cql a42, Cql a43, Cql a44, Cql a45, Cql a46, Cql a47, Cql a48) => Tuple (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29, a30, a31, a32, a33, a34, a35, a36, a37, a38, a39, a40, a41, a42, a43, a44, a45, a46, a47, a48) Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

count :: PrivateTuple a => Tagged a Int Source #

check :: PrivateTuple a => Tagged a ([ColumnType] -> [ColumnType]) Source #

tuple :: PrivateTuple a => Version -> [ColumnType] -> Get a Source #

store :: PrivateTuple a => Version -> Putter a Source #

data Row Source #

A row is a vector of Values.

Instances

Instances details
Eq Row Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

Methods

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

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

Show Row Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

Methods

showsPrec :: Int -> Row -> ShowS #

show :: Row -> String #

showList :: [Row] -> ShowS #

Tuple Row Source # 
Instance details

Defined in Database.CQL.Protocol.Tuple

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

Convert a row element.

class Record a where Source #

Record/Tuple conversion. For example:

data Peer = Peer
    { peerAddr :: IP
    , peerRPC  :: IP
    , peerDC   :: Text
    , peerRack :: Text
    } deriving Show

recordInstance ''Peer

map asRecord <$> performQuery "SELECT peer, rpc_address, data_center, rack FROM system.peers"

The generated type-class instance maps between record and tuple constructors:

type instance TupleType Peer = (IP, IP, Text, Text)

instance Record Peer where
    asTuple (Peer a b c d) = (a, b, c, d)
    asRecord (a, b, c, d)  = Peer a b c d

Methods

asTuple :: a -> TupleType a Source #

asRecord :: TupleType a -> a Source #

type family TupleType a Source #

Codec