Fixed DESCRIBE names for small and tiny ints, added column names
This commit is contained in:
@@ -377,9 +377,23 @@ class Integer(Column):
|
||||
return self.validate(value)
|
||||
|
||||
|
||||
class TinyInt(Integer):
|
||||
"""
|
||||
Stores an 8-bit signed integer value
|
||||
"""
|
||||
db_type = 'tinyint'
|
||||
|
||||
|
||||
class SmallInt(Integer):
|
||||
"""
|
||||
Stores a 16-bit signed integer value
|
||||
"""
|
||||
db_type = 'smallint'
|
||||
|
||||
|
||||
class BigInt(Integer):
|
||||
"""
|
||||
Stores a 64-bit signed long value
|
||||
Stores a 64-bit signed integer value
|
||||
"""
|
||||
db_type = 'bigint'
|
||||
|
||||
|
||||
@@ -424,7 +424,7 @@ class BooleanType(_CassandraType):
|
||||
def serialize(truth, protocol_version):
|
||||
return int8_pack(truth)
|
||||
|
||||
class TinyIntType(_CassandraType):
|
||||
class ByteType(_CassandraType):
|
||||
typename = 'tinyint'
|
||||
|
||||
@staticmethod
|
||||
@@ -661,7 +661,7 @@ class SimpleDateType(_CassandraType):
|
||||
return util.Date(days)
|
||||
|
||||
|
||||
class SmallIntType(_CassandraType):
|
||||
class ShortType(_CassandraType):
|
||||
typename = 'smallint'
|
||||
|
||||
@staticmethod
|
||||
|
||||
@@ -36,7 +36,7 @@ from cassandra.cqltypes import (AsciiType, BytesType, BooleanType,
|
||||
LongType, MapType, SetType, TimeUUIDType,
|
||||
UTF8Type, UUIDType, UserType,
|
||||
TupleType, lookup_casstype, SimpleDateType,
|
||||
TimeType, TinyIntType, SmallIntType)
|
||||
TimeType, ByteType, ShortType)
|
||||
from cassandra.policies import WriteType
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@@ -623,8 +623,8 @@ class ResultMessage(_MessageType):
|
||||
0x0010: InetAddressType,
|
||||
0x0011: SimpleDateType,
|
||||
0x0012: TimeType,
|
||||
0x0013: SmallIntType,
|
||||
0x0014: TinyIntType,
|
||||
0x0013: ShortType,
|
||||
0x0014: ByteType,
|
||||
0x0020: ListType,
|
||||
0x0021: MapType,
|
||||
0x0022: SetType,
|
||||
|
||||
Reference in New Issue
Block a user