From 52120b83efe049c6eb76d6fd90b3334a0fd4ce8d Mon Sep 17 00:00:00 2001 From: Alan Boudreault Date: Mon, 16 Jan 2017 15:00:20 -0500 Subject: [PATCH] Add DurationType in type_codes --- cassandra/protocol.py | 2 +- cassandra/type_codes.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cassandra/protocol.py b/cassandra/protocol.py index 70576563..5cae104f 100644 --- a/cassandra/protocol.py +++ b/cassandra/protocol.py @@ -38,7 +38,7 @@ from cassandra.cqltypes import (AsciiType, BytesType, BooleanType, LongType, MapType, SetType, TimeUUIDType, UTF8Type, VarcharType, UUIDType, UserType, TupleType, lookup_casstype, SimpleDateType, - TimeType, ByteType, ShortType) + TimeType, ByteType, ShortType, DurationType) from cassandra.policies import WriteType from cassandra.cython_deps import HAVE_CYTHON, HAVE_NUMPY from cassandra import util diff --git a/cassandra/type_codes.py b/cassandra/type_codes.py index daf882e4..eab9a334 100644 --- a/cassandra/type_codes.py +++ b/cassandra/type_codes.py @@ -25,6 +25,11 @@ Type codes are repeated here from the Cassandra binary protocol specification: 0x000E Varint 0x000F Timeuuid 0x0010 Inet + 0x0011 SimpleDateType + 0x0012 TimeType + 0x0013 ShortType + 0x0014 ByteType + 0x0015 DurationType 0x0020 List: the value is an [option], representing the type of the elements of the list. 0x0021 Map: the value is two [option], representing the types of the @@ -54,6 +59,7 @@ SimpleDateType = 0x0011 TimeType = 0x0012 ShortType = 0x0013 ByteType = 0x0014 +DurationType = 0x0015 ListType = 0x0020 MapType = 0x0021 SetType = 0x0022