Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Like Database.CQL.Protocol but exports the whole encode/decode machinery for all types.
Synopsis
- class Cql a where
- newtype Keyspace = Keyspace {
- unKeyspace :: Text
- newtype Table = Table {}
- newtype PagingState = PagingState {}
- newtype QueryId k a b = QueryId {}
- newtype QueryString k a b = QueryString {}
- data Version
- data CqlVersion
- = Cqlv300
- | CqlVersion !Text
- data CompressionAlgorithm
- data Compression = Compression {
- algorithm :: !CompressionAlgorithm
- shrink :: ByteString -> Maybe ByteString
- expand :: ByteString -> Maybe ByteString
- noCompression :: Compression
- data Consistency
- = Any
- | One
- | LocalOne
- | Two
- | Three
- | Quorum
- | LocalQuorum
- | All
- | EachQuorum
- | Serial
- | LocalSerial
- data OpCode
- data ColumnType
- = CustomColumn !Text
- | AsciiColumn
- | BigIntColumn
- | BlobColumn
- | BooleanColumn
- | CounterColumn
- | DecimalColumn
- | DoubleColumn
- | FloatColumn
- | IntColumn
- | TextColumn
- | TimestampColumn
- | UuidColumn
- | VarCharColumn
- | VarIntColumn
- | TimeUuidColumn
- | InetColumn
- | MaybeColumn !ColumnType
- | ListColumn !ColumnType
- | SetColumn !ColumnType
- | MapColumn !ColumnType !ColumnType
- | TupleColumn [ColumnType]
- | UdtColumn !Text [(Text, ColumnType)]
- | DateColumn
- | TimeColumn
- | SmallIntColumn
- | TinyIntColumn
- newtype Ascii = Ascii {}
- newtype Blob = Blob {}
- newtype Counter = Counter {
- fromCounter :: Int64
- newtype TimeUuid = TimeUuid {
- fromTimeUuid :: UUID
- newtype Set a = Set {
- fromSet :: [a]
- newtype Map a b = Map {
- fromMap :: [(a, b)]
- data Value
- = CqlCustom !ByteString
- | CqlBoolean !Bool
- | CqlInt !Int32
- | CqlBigInt !Int64
- | CqlVarInt !Integer
- | CqlFloat !Float
- | CqlDecimal !Decimal
- | CqlDouble !Double
- | CqlText !Text
- | CqlInet !IP
- | CqlUuid !UUID
- | CqlTimestamp !Int64
- | CqlAscii !Text
- | CqlBlob !ByteString
- | CqlCounter !Int64
- | CqlTimeUuid !UUID
- | CqlMaybe (Maybe Value)
- | CqlList [Value]
- | CqlSet [Value]
- | CqlMap [(Value, Value)]
- | CqlTuple [Value]
- | CqlUdt [(Text, Value)]
- | CqlDate !Int32
- | CqlTime !Int64
- | CqlSmallInt !Int16
- | CqlTinyInt !Int8
- newtype Tagged a b = Tagged {
- untag :: b
- retag :: Tagged a c -> Tagged b c
- data R
- data W
- data S
- data ColumnSpec = ColumnSpec {
- keyspace :: !Keyspace
- table :: !Table
- columnName :: !Text
- columnType :: !ColumnType
- data Header = Header {
- headerType :: !HeaderType
- version :: !Version
- flags :: !Flags
- streamId :: !StreamId
- opCode :: !OpCode
- bodyLength :: !Length
- data HeaderType
- header :: Version -> ByteString -> Either String Header
- encodeHeader :: Version -> HeaderType -> Flags -> StreamId -> OpCode -> Length -> PutM ()
- decodeHeader :: Version -> Get Header
- newtype Length = Length {
- lengthRepr :: Int32
- encodeLength :: Putter Length
- decodeLength :: Get Length
- data StreamId
- mkStreamId :: Integral i => i -> StreamId
- fromStreamId :: StreamId -> Int
- encodeStreamId :: Version -> Putter StreamId
- decodeStreamId :: Version -> Get StreamId
- data Flags
- compress :: Flags
- customPayload :: Flags
- tracing :: Flags
- warning :: Flags
- isSet :: Flags -> Flags -> Bool
- encodeFlags :: Putter Flags
- decodeFlags :: Get Flags
- data Request k a b
- pack :: Tuple a => Version -> Compression -> Bool -> StreamId -> Request k a b -> Either String ByteString
- encodeRequest :: Tuple a => Version -> Putter (Request k a b)
- getOpCode :: Request k a b -> OpCode
- data Options = Options
- encodeOptions :: Putter Options
- data Startup = Startup !CqlVersion !CompressionAlgorithm
- encodeStartup :: Putter Startup
- newtype AuthResponse = AuthResponse ByteString
- encodeAuthResponse :: Putter AuthResponse
- newtype Register = Register [EventType]
- data EventType
- encodeRegister :: Putter Register
- encodeEventType :: Putter EventType
- data Query k a b = Query !(QueryString k a b) !(QueryParams a)
- data QueryParams a = QueryParams {}
- data SerialConsistency
- encodeQuery :: Tuple a => Version -> Putter (Query k a b)
- encodeQueryParams :: forall a. Tuple a => Version -> Putter (QueryParams a)
- data Batch = Batch {}
- data BatchQuery where
- 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
- data BatchType
- encodeBatch :: Version -> Putter Batch
- encodeBatchType :: Putter BatchType
- encodeBatchQuery :: Version -> Putter BatchQuery
- newtype Prepare k a b = Prepare (QueryString k a b)
- encodePrepare :: Putter (Prepare k a b)
- data Execute k a b = Execute !(QueryId k a b) !(QueryParams a)
- encodeExecute :: Tuple a => Version -> Putter (Execute k a b)
- data Response k a b
- = RsError (Maybe UUID) [Text] !Error
- | RsReady (Maybe UUID) [Text] !Ready
- | RsAuthenticate (Maybe UUID) [Text] !Authenticate
- | RsAuthChallenge (Maybe UUID) [Text] !AuthChallenge
- | RsAuthSuccess (Maybe UUID) [Text] !AuthSuccess
- | RsSupported (Maybe UUID) [Text] !Supported
- | RsResult (Maybe UUID) [Text] !(Result k a b)
- | RsEvent (Maybe UUID) [Text] !Event
- warnings :: Response k a b -> [Text]
- traceId :: Response k a b -> Maybe UUID
- unpack :: (Tuple a, Tuple b) => Compression -> Header -> ByteString -> Either String (Response k a b)
- data Ready = Ready
- decodeReady :: Get Ready
- newtype Authenticate = Authenticate Text
- newtype AuthChallenge = AuthChallenge (Maybe ByteString)
- newtype AuthSuccess = AuthSuccess (Maybe ByteString)
- decodeAuthenticate :: Get Authenticate
- decodeAuthChallenge :: Get AuthChallenge
- decodeAuthSuccess :: Get AuthSuccess
- data Result k a b
- = VoidResult
- | RowsResult !MetaData [b]
- | SetKeyspaceResult !Keyspace
- | PreparedResult !(QueryId k a b) !MetaData !MetaData
- | SchemaChangeResult !SchemaChange
- data MetaData = MetaData {
- columnCount :: !Int32
- pagingState :: Maybe PagingState
- columnSpecs :: [ColumnSpec]
- primaryKeyIndices :: [Int32]
- data ColumnSpec = ColumnSpec {
- keyspace :: !Keyspace
- table :: !Table
- columnName :: !Text
- columnType :: !ColumnType
- decodeResult :: forall k a b. (Tuple a, Tuple b) => Version -> Get (Result k a b)
- decodeMetaData :: Get MetaData
- data Supported = Supported [CompressionAlgorithm] [CqlVersion]
- decodeSupported :: Get Supported
- data Event
- data TopologyChange
- data SchemaChange
- data StatusChange
- data Change
- = KeyspaceChange !Keyspace
- | TableChange !Keyspace !Table
- | TypeChange !Keyspace !Text
- | FunctionChange !Keyspace !Text ![Text]
- | AggregateChange !Keyspace !Text ![Text]
- decodeSchemaChange :: Version -> Get SchemaChange
- decodeChange :: Version -> Get Change
- decodeEvent :: Version -> Get Event
- decodeTopologyChange :: Get TopologyChange
- decodeStatusChange :: Get StatusChange
- data Error
- = AlreadyExists !Text !Keyspace !Table
- | BadCredentials !Text
- | ConfigError !Text
- | FunctionFailure !Text !Keyspace !Text ![Text]
- | Invalid !Text
- | IsBootstrapping !Text
- | Overloaded !Text
- | ProtocolError !Text
- | ServerError !Text
- | SyntaxError !Text
- | TruncateError !Text
- | Unauthorized !Text
- | Unprepared !Text !ByteString
- | Unavailable { }
- | ReadFailure { }
- | ReadTimeout { }
- | WriteFailure { }
- | WriteTimeout { }
- data WriteType
- decodeError :: Get Error
- decodeWriteType :: Get WriteType
- class PrivateTuple a => Tuple a
- count :: PrivateTuple a => Tagged a Int
- check :: PrivateTuple a => Tagged a ([ColumnType] -> [ColumnType])
- tuple :: PrivateTuple a => Version -> [ColumnSpec] -> Get a
- store :: PrivateTuple a => Version -> Putter a
- data Row
- mkRow :: [(Value, ColumnType)] -> Row
- fromRow :: Cql a => Int -> Row -> Either String a
- columnTypes :: Row -> [ColumnType]
- rowLength :: Row -> Int
- class Record a where
- type family TupleType a
- recordInstance :: Name -> Q [Dec]
- encodeByte :: Putter Word8
- decodeByte :: Get Word8
- encodeSignedByte :: Putter Int8
- decodeSignedByte :: Get Int8
- encodeShort :: Putter Word16
- decodeShort :: Get Word16
- encodeSignedShort :: Putter Int16
- decodeSignedShort :: Get Int16
- encodeInt :: Putter Int32
- decodeInt :: Get Int32
- encodeString :: Putter Text
- decodeString :: Get Text
- encodeLongString :: Putter Text
- decodeLongString :: Get Text
- encodeBytes :: Putter ByteString
- decodeBytes :: Get (Maybe ByteString)
- encodeShortBytes :: Putter ByteString
- decodeShortBytes :: Get ByteString
- encodeUUID :: Putter UUID
- decodeUUID :: Get UUID
- encodeList :: Putter [Text]
- decodeList :: Get [Text]
- encodeMap :: Putter [(Text, Text)]
- decodeMap :: Get [(Text, Text)]
- encodeMultiMap :: Putter [(Text, [Text])]
- decodeMultiMap :: Get [(Text, [Text])]
- encodeSockAddr :: Putter SockAddr
- decodeSockAddr :: Get SockAddr
- encodeConsistency :: Putter Consistency
- decodeConsistency :: Get Consistency
- encodeOpCode :: Putter OpCode
- decodeOpCode :: Get OpCode
- encodePagingState :: Putter PagingState
- decodePagingState :: Get (Maybe PagingState)
- decodeKeyspace :: Get Keyspace
- decodeTable :: Get Table
- decodeColumnType :: Get ColumnType
- decodeQueryId :: Get (QueryId k a b)
- putValue :: Version -> Putter Value
- getValue :: Version -> ColumnType -> Get Value
Cql type-class
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"
ctype :: Tagged a ColumnType Source #
the column-type of a
map a
to some CQL data-type
fromCql :: Value -> Either String a Source #
map a CQL value back to a
Instances
Cql Decimal Source # | |
Cql Int16 Source # | |
Cql Int32 Source # | |
Cql Int64 Source # | |
Cql Int8 Source # | |
Cql Ascii Source # | |
Cql Blob Source # | |
Cql Counter Source # | |
Cql TimeUuid Source # | |
Cql IP Source # | |
Cql Text Source # | |
Cql UTCTime Source # | |
Cql UUID Source # | |
Cql Integer Source # | |
Cql Bool Source # | |
Cql Double Source # | |
Cql Float Source # | |
Cql a => Cql (Set a) Source # | |
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 |
Cql a => Cql [a] Source # | |
(Cql a, Cql b) => Cql (Map a b) Source # | |
(Cql a1, Cql a2) => Cql (a1, a2) Source # | |
(Cql a1, Cql a2, Cql a3) => Cql (a1, a2, a3) Source # | |
(Cql a1, Cql a2, Cql a3, Cql a4) => Cql (a1, a2, a3, a4) Source # | |
(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5) => Cql (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 # | |
(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5, Cql a6, Cql a7) => Cql (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 # | |
(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 # | |
(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 # | |
(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 # | |
(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 # | |
(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 # | |
Defined in Database.CQL.Protocol.Class | |
(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 # | |
Defined in Database.CQL.Protocol.Class | |
(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 # | |
Defined in Database.CQL.Protocol.Class 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 # | |
Defined in Database.CQL.Protocol.Class 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
Instances
newtype PagingState Source #
Opaque token passed to the server to continue result paging.
Instances
Show PagingState Source # | |
Defined in Database.CQL.Protocol.Types showsPrec :: Int -> PagingState -> ShowS # show :: PagingState -> String # showList :: [PagingState] -> ShowS # | |
Eq PagingState Source # | |
Defined in Database.CQL.Protocol.Types (==) :: PagingState -> PagingState -> Bool # (/=) :: PagingState -> PagingState -> Bool # |
newtype QueryId k a b Source #
ID representing a prepared query.
newtype QueryString k a b Source #
Instances
IsString (QueryString k a b) Source # | |
Defined in Database.CQL.Protocol.Types fromString :: String -> QueryString k a b # | |
Show (QueryString k a b) Source # | |
Defined in Database.CQL.Protocol.Types showsPrec :: Int -> QueryString k a b -> ShowS # show :: QueryString k a b -> String # showList :: [QueryString k a b] -> ShowS # | |
Eq (QueryString k a b) Source # | |
Defined in Database.CQL.Protocol.Types (==) :: QueryString k a b -> QueryString k a b -> Bool # (/=) :: QueryString k a b -> QueryString k a b -> Bool # |
CQL binary protocol version.
data CqlVersion Source #
The CQL version (not the binary protocol version).
Instances
Show CqlVersion Source # | |
Defined in Database.CQL.Protocol.Types showsPrec :: Int -> CqlVersion -> ShowS # show :: CqlVersion -> String # showList :: [CqlVersion] -> ShowS # | |
Eq CqlVersion Source # | |
Defined in Database.CQL.Protocol.Types (==) :: CqlVersion -> CqlVersion -> Bool # (/=) :: CqlVersion -> CqlVersion -> Bool # |
data CompressionAlgorithm Source #
Instances
Show CompressionAlgorithm Source # | |
Defined in Database.CQL.Protocol.Types showsPrec :: Int -> CompressionAlgorithm -> ShowS # show :: CompressionAlgorithm -> String # showList :: [CompressionAlgorithm] -> ShowS # | |
Eq CompressionAlgorithm Source # | |
Defined in Database.CQL.Protocol.Types (==) :: CompressionAlgorithm -> CompressionAlgorithm -> Bool # (/=) :: CompressionAlgorithm -> CompressionAlgorithm -> Bool # |
data Compression Source #
Compression | |
|
Instances
Show Compression Source # | |
Defined in Database.CQL.Protocol.Types showsPrec :: Int -> Compression -> ShowS # show :: Compression -> String # showList :: [Compression] -> ShowS # |
data Consistency Source #
Consistency level.
See: Consistency
Any | |
One | |
LocalOne | |
Two | |
Three | |
Quorum | |
LocalQuorum | |
All | |
EachQuorum | Only for write queries. |
Serial | Only for read queries. |
LocalSerial | Only for read queries. |
Instances
Show Consistency Source # | |
Defined in Database.CQL.Protocol.Types showsPrec :: Int -> Consistency -> ShowS # show :: Consistency -> String # showList :: [Consistency] -> ShowS # | |
Eq Consistency Source # | |
Defined in Database.CQL.Protocol.Types (==) :: Consistency -> Consistency -> Bool # (/=) :: Consistency -> Consistency -> Bool # |
An opcode is a tag to distinguish protocol frame bodies.
data ColumnType Source #
The type of a single CQL column.
Instances
Show ColumnType Source # | |
Defined in Database.CQL.Protocol.Types showsPrec :: Int -> ColumnType -> ShowS # show :: ColumnType -> String # showList :: [ColumnType] -> ShowS # | |
Eq ColumnType Source # | |
Defined in Database.CQL.Protocol.Types (==) :: ColumnType -> ColumnType -> Bool # (/=) :: ColumnType -> ColumnType -> Bool # |
A CQL value. The various constructors correspond to CQL data-types for individual columns in Cassandra.
CqlCustom !ByteString | |
CqlBoolean !Bool | |
CqlInt !Int32 | |
CqlBigInt !Int64 | |
CqlVarInt !Integer | |
CqlFloat !Float | |
CqlDecimal !Decimal | |
CqlDouble !Double | |
CqlText !Text | |
CqlInet !IP | |
CqlUuid !UUID | |
CqlTimestamp !Int64 | |
CqlAscii !Text | |
CqlBlob !ByteString | |
CqlCounter !Int64 | |
CqlTimeUuid !UUID | |
CqlMaybe (Maybe Value) | |
CqlList [Value] | |
CqlSet [Value] | |
CqlMap [(Value, Value)] | |
CqlTuple [Value] | |
CqlUdt [(Text, Value)] | |
CqlDate !Int32 | |
CqlTime !Int64 | |
CqlSmallInt !Int16 | |
CqlTinyInt !Int8 |
data ColumnSpec Source #
The column specification. Part of MetaData
unless skipMetaData
in
QueryParams
was True.
ColumnSpec | |
|
Instances
Show ColumnSpec Source # | |
Defined in Database.CQL.Protocol.Types showsPrec :: Int -> ColumnSpec -> ShowS # show :: ColumnSpec -> String # showList :: [ColumnSpec] -> ShowS # |
Header
Protocol frame header.
Header | |
|
data HeaderType Source #
Instances
Show HeaderType Source # | |
Defined in Database.CQL.Protocol.Header showsPrec :: Int -> HeaderType -> ShowS # show :: HeaderType -> String # showList :: [HeaderType] -> ShowS # |
header :: Version -> ByteString -> Either String Header Source #
Deserialise a frame header using the version specific decoding format.
encodeHeader :: Version -> HeaderType -> Flags -> StreamId -> OpCode -> Length -> PutM () Source #
Length
The type denoting a protocol frame length.
decodeLength :: Get Length Source #
StreamId
Streams allow multiplexing of requests over a single communication
channel. The StreamId
correlates Request
s with Response
s.
mkStreamId :: Integral i => i -> StreamId Source #
fromStreamId :: StreamId -> Int Source #
Convert the stream ID to an integer.
Flags
Type representing header flags. Flags form a monoid and can be used
as in compress <> tracing <> mempty
.
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.
decodeFlags :: Get Flags Source #
Request
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.
:: 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 |
Options
An options request, send prior to Startup
to request the server's
startup options.
Startup
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.
Auth Response
newtype AuthResponse Source #
A request send in response to a previous authentication challenge.
Instances
Show AuthResponse Source # | |
Defined in Database.CQL.Protocol.Request showsPrec :: Int -> AuthResponse -> ShowS # show :: AuthResponse -> String # showList :: [AuthResponse] -> ShowS # |
Register
Register's the connection this request is made through, to receive server events.
Event types to register.
TopologyChangeEvent | events related to change in the cluster topology |
StatusChangeEvent | events related to change of node status |
SchemaChangeEvent | events related to schema change |
Query
A CQL query (select, insert, etc.).
Query !(QueryString k a b) !(QueryParams a) |
data QueryParams a Source #
Query parameters.
QueryParams | |
|
Instances
Show a => Show (QueryParams a) Source # | |
Defined in Database.CQL.Protocol.Request showsPrec :: Int -> QueryParams a -> ShowS # show :: QueryParams a -> String # showList :: [QueryParams a] -> ShowS # |
data SerialConsistency Source #
Consistency level for the serial phase of conditional updates (aka "lightweight transactions").
See: SerialConsistency
SerialConsistency | Default. Quorum-based linearizable consistency. |
LocalSerialConsistency | Like |
Instances
Show SerialConsistency Source # | |
Defined in Database.CQL.Protocol.Request showsPrec :: Int -> SerialConsistency -> ShowS # show :: SerialConsistency -> String # showList :: [SerialConsistency] -> ShowS # |
encodeQueryParams :: forall a. Tuple a => Version -> Putter (QueryParams a) Source #
Batch
Allows executing a list of queries (prepared or not) as a batch.
data BatchQuery where Source #
A GADT to unify queries and prepared queries both of which can be used in batch requests.
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
Show BatchQuery Source # | |
Defined in Database.CQL.Protocol.Request showsPrec :: Int -> BatchQuery -> ShowS # show :: BatchQuery -> String # showList :: [BatchQuery] -> ShowS # |
BatchLogged | default, uses a batch log for atomic application |
BatchUnLogged | skip the batch log |
BatchCounter | used for batched counter updates |
Prepare
newtype Prepare k a b Source #
Prepare a query for later execution (cf. Execute
).
Prepare (QueryString k a b) |
encodePrepare :: Putter (Prepare k a b) Source #
Execute
Executes a prepared query.
Execute !(QueryId k a b) !(QueryParams a) |
Response
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.
RsError (Maybe UUID) [Text] !Error | |
RsReady (Maybe UUID) [Text] !Ready | |
RsAuthenticate (Maybe UUID) [Text] !Authenticate | |
RsAuthChallenge (Maybe UUID) [Text] !AuthChallenge | |
RsAuthSuccess (Maybe UUID) [Text] !AuthSuccess | |
RsSupported (Maybe UUID) [Text] !Supported | |
RsResult (Maybe UUID) [Text] !(Result k a b) | |
RsEvent (Maybe UUID) [Text] !Event |
unpack :: (Tuple a, Tuple b) => Compression -> Header -> ByteString -> Either String (Response k a b) Source #
Deserialise a Response
from the given ByteString
.
Ready
The server is ready to process queries. Response of a Startup
request.
decodeReady :: Get Ready Source #
Authenticate
newtype Authenticate Source #
The server requires authentication.
Instances
Show Authenticate Source # | |
Defined in Database.CQL.Protocol.Response showsPrec :: Int -> Authenticate -> ShowS # show :: Authenticate -> String # showList :: [Authenticate] -> ShowS # |
newtype AuthChallenge Source #
A server-send authentication challenge.
Instances
Show AuthChallenge Source # | |
Defined in Database.CQL.Protocol.Response showsPrec :: Int -> AuthChallenge -> ShowS # show :: AuthChallenge -> String # showList :: [AuthChallenge] -> ShowS # |
newtype AuthSuccess Source #
Indicates the success of an authentication phase.
Instances
Show AuthSuccess Source # | |
Defined in Database.CQL.Protocol.Response showsPrec :: Int -> AuthSuccess -> ShowS # show :: AuthSuccess -> String # showList :: [AuthSuccess] -> ShowS # |
Result
Query response.
Part of a RowsResult
. Describes the result set.
MetaData | |
|
data ColumnSpec Source #
The column specification. Part of MetaData
unless skipMetaData
in
QueryParams
was True.
ColumnSpec | |
|
Instances
Show ColumnSpec Source # | |
Defined in Database.CQL.Protocol.Types showsPrec :: Int -> ColumnSpec -> ShowS # show :: ColumnSpec -> String # showList :: [ColumnSpec] -> ShowS # |
Supported
The startup options supported by the server. Response of an Options
request.
Event
Messages send by the server without request, if the connection has
been Register
ed to receive such events.
data TopologyChange Source #
Instances
Show TopologyChange Source # | |
Defined in Database.CQL.Protocol.Response showsPrec :: Int -> TopologyChange -> ShowS # show :: TopologyChange -> String # showList :: [TopologyChange] -> ShowS # | |
Eq TopologyChange Source # | |
Defined in Database.CQL.Protocol.Response (==) :: TopologyChange -> TopologyChange -> Bool # (/=) :: TopologyChange -> TopologyChange -> Bool # | |
Ord TopologyChange Source # | |
Defined in Database.CQL.Protocol.Response compare :: TopologyChange -> TopologyChange -> Ordering # (<) :: TopologyChange -> TopologyChange -> Bool # (<=) :: TopologyChange -> TopologyChange -> Bool # (>) :: TopologyChange -> TopologyChange -> Bool # (>=) :: TopologyChange -> TopologyChange -> Bool # max :: TopologyChange -> TopologyChange -> TopologyChange # min :: TopologyChange -> TopologyChange -> TopologyChange # |
data SchemaChange Source #
Instances
Show SchemaChange Source # | |
Defined in Database.CQL.Protocol.Response showsPrec :: Int -> SchemaChange -> ShowS # show :: SchemaChange -> String # showList :: [SchemaChange] -> ShowS # |
data StatusChange Source #
Instances
Show StatusChange Source # | |
Defined in Database.CQL.Protocol.Response showsPrec :: Int -> StatusChange -> ShowS # show :: StatusChange -> String # showList :: [StatusChange] -> ShowS # | |
Eq StatusChange Source # | |
Defined in Database.CQL.Protocol.Response (==) :: StatusChange -> StatusChange -> Bool # (/=) :: StatusChange -> StatusChange -> Bool # | |
Ord StatusChange Source # | |
Defined in Database.CQL.Protocol.Response compare :: StatusChange -> StatusChange -> Ordering # (<) :: StatusChange -> StatusChange -> Bool # (<=) :: StatusChange -> StatusChange -> Bool # (>) :: StatusChange -> StatusChange -> Bool # (>=) :: StatusChange -> StatusChange -> Bool # max :: StatusChange -> StatusChange -> StatusChange # min :: StatusChange -> StatusChange -> StatusChange # |
Error
Error response.
Instances
Exception Error Source # | |
Defined in Database.CQL.Protocol.Response toException :: Error -> SomeException # fromException :: SomeException -> Maybe Error # displayException :: Error -> String # | |
Show Error Source # | |
Eq Error Source # | |
WriteSimple | |
WriteBatch | |
WriteBatchLog | |
WriteUnloggedBatch | |
WriteCounter | |
WriteCas | |
WriteView | Since |
WriteCdc | Since |
decodeError :: Get Error Source #
Tuple and Record
class PrivateTuple a => Tuple a Source #
Instances
Tuple Row Source # | |
Defined in Database.CQL.Protocol.Tuple | |
Tuple () Source # | |
Defined in Database.CQL.Protocol.Tuple | |
Cql a => Tuple (Identity a) Source # | |
Defined in Database.CQL.Protocol.Tuple | |
(Cql a1, Cql a2) => Tuple (a1, a2) Source # | |
Defined in Database.CQL.Protocol.Tuple | |
(Cql a1, Cql a2, Cql a3) => Tuple (a1, a2, a3) Source # | |
Defined in Database.CQL.Protocol.Tuple | |
(Cql a1, Cql a2, Cql a3, Cql a4) => Tuple (a1, a2, a3, a4) Source # | |
Defined in Database.CQL.Protocol.Tuple | |
(Cql a1, Cql a2, Cql a3, Cql a4, Cql a5) => Tuple (a1, a2, a3, a4, a5) Source # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
Defined in Database.CQL.Protocol.Tuple |
check :: PrivateTuple a => Tagged a ([ColumnType] -> [ColumnType]) Source #
A row is a vector of Value
s.
columnTypes :: Row -> [ColumnType] 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
Codec
encodeByte :: Putter Word8 Source #
decodeByte :: Get Word8 Source #
decodeShort :: Get Word16 Source #
decodeString :: Get Text Source #
decodeBytes :: Get (Maybe ByteString) Source #
encodeUUID :: Putter UUID Source #
decodeUUID :: Get UUID Source #
encodeList :: Putter [Text] Source #
decodeList :: Get [Text] Source #
decodeOpCode :: Get OpCode Source #
decodeTable :: Get Table Source #
decodeQueryId :: Get (QueryId k a b) Source #