Database Reference
In-Depth Information
Data types
Cassandra supports all data types any standard relational database supports and more.
Here's the list of data types Cassandra 2.x supports:
Java equi-
valent
CQL type
Description
ascii
String
US-ASCII character string
bigint
Long
64-bit signed long
blob
ByteBuffer Arbitrary bytes (no validation), expressed as hexadecimal (Java type:
java.nio.ByteBuffer
)
boolean
Boolean
True or false
counter
Long
Distributed counter value (64-bit long)
decimal
BigDecimal Variable-precision decimal (Java type:
java.math.BigDecimal
)
double
Double
64-bit IEEE-754 floating point (Java type:
java.lang.Double
)
float
Float
32-bit IEEE-754 floating point (Java type:
java.lang.Float
)
IP address string in IPv4 or IPv6 format, used by the python-cql driver and CQL native protocols (Java type:
java.net.InetAddress
)
inet
InetAddress
Integer
32-bit signed integer
int
List<T>
A collection of one or more ordered elements (Java type:
java.util.List<T>
)
list
Map<K,V> Map of unique key to value (Java type:
java.util.Map<K,V>
)
map
Set<T>
A collection of one or more elements (Java type:
java.util.Set<T>
)
set
String
UTF-8 encoded string
text
timestamp
Date
Date plus time, encoded as 8 bytes since epoch