Database Reference
In-Depth Information
Table 6.2
Table 6-2: CQL Data Types
Name
Description
A string encoded as US-ASCII (characters 0-127)
ASCII
A 64-bit signed long value (equivalent to a Java long)
BIGINT
An arbitrary byte array
BLOB
A
true
or
false
Boolean value
BOOLEAN
A 64-bit distributed counter value. This gets special handling
in Cassandra
COUNTER
A variable precision decimal value
DECIMAL
64-bit IEEE-754 compliant floating-point values
DOUBLE
32-bit IEEE-754 compliant floating-point values
FLOAT
A structure representing IPv4 or IPv6 addresses
INET
INT
A 32-bit signed integer (equivalent to a Java
int
)
LIST<?>
A list of values where the
?
is a valid CQL type. For example,
LIST<TEXT>
would be a list of UTF-8 strings. Collections
may not contain other collections so
LIST<LIST<TEXT>>
is
not allowed
MAP<?,?>
An associative array of CQL types. Like the
LIST
type,
MAP
takes two valid scalar CQL types
The
SET
collection type is similar to the
LIST
type, except
that it only stores unique values
SET<?>
A string encoded as UTF-8
TEXT
TIMESTAMP
A timestamp encoded as a 64-bit integer (
BIGINT
) in
milliseconds since the UNIX epoch
UUID
A universally unique identifier value. For Windows users,
this is the same as a GUID
TIMEUUID
A Type 1 UUID with a timestamp component. This type
allows multiple clients to perform inserts with the timestamp
but without collisions. Time range queries can be performed