...
 
Commits (4)
......@@ -8,22 +8,22 @@ cache:
before_script:
- apt -qq update
- apt -qq install build-essential netbase xz-utils libstdc++-4.9-dev libssl-dev > /dev/null
- stack upgrade && hash -d stack && stack --version
- stack clean --full
test:8.4:
image: haskell:8.2
image: haskell:8.4
script:
- stack -j 1 --resolver nightly-2018-05-15 test --fast
- stack -j 1 --resolver lts-12.6 test --fast
test:8.2:
image: haskell:8.2
script:
- stack -j 1 test --fast
- stack -j 1 --resolver lts-11.21 test --fast
test:8.0:
image: haskell:8.0
script:
- apt -qq install build-essential netbase xz-utils libstdc++-4.9-dev libssl-dev > /dev/null
- stack -j 1 --resolver lts-9.21 test --fast
4.X.X
-----
- Add missing constructors for 'WriteType'.
cf. https://github.com/apache/cassandra/commit/5a662ea3ffdbb9563cf3ef959deb13982b084b24
4.0.1
-----
- GHC 8.4 compatibility.
......
......@@ -5,11 +5,30 @@ This Haskell library implements Cassandra's CQL Binary Protocol versions
[3] and [4]. It provides encoding and decoding functionality as well
as representations of the various protocol related types.
[3]: https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v3.spec
[4]: https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v4.spec
Contributing
------------
If you want to contribute to this project please read the file
CONTRIBUTING first.
[3]: https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v3.spec
[4]: https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v4.spec
License
=======
See [LICENSE](./LICENSE).
Cassandra Logo License
======================
Copyright © 2018 Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at https://www.apache.org/licenses/LICENSE-2.0. Unless required by
applicable law or agreed to in writing, software distributed under the License
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
......@@ -216,10 +216,10 @@ data Result k a b
-- | Part of a @RowsResult@. Describes the result set.
data MetaData = MetaData
{ columnCount :: !Int32
, pagingState :: Maybe PagingState
, columnSpecs :: [ColumnSpec]
, primaryKeyIndicies :: [Int32]
{ columnCount :: !Int32
, pagingState :: Maybe PagingState
, columnSpecs :: [ColumnSpec]
, primaryKeyIndices :: [Int32]
} deriving (Show)
-- | The column specification. Part of 'MetaData' unless 'skipMetaData' in
......@@ -455,6 +455,11 @@ data WriteType
| WriteBatchLog
| WriteUnloggedBatch
| WriteCounter
| WriteCas
| WriteView
-- ^ Since 'V4'.
| WriteCdc
-- ^ Since 'V4'.
deriving (Eq, Show)
decodeError :: Get Error
......@@ -517,5 +522,8 @@ decodeWriteType = decodeString >>= fromString
fromString "BATCH_LOG" = return WriteBatchLog
fromString "UNLOGGED_BATCH" = return WriteUnloggedBatch
fromString "COUNTER" = return WriteCounter
fromString "CAS" = return WriteCas
fromString "VIEW" = return WriteView
fromString "CDC" = return WriteCdc
fromString unknown = fail $
"decode: unknown write-type: " ++ show unknown