View Source Data Types Comparison Table

This page contains a table that compares the data types used by Cassandra with their counterparts used by Xandra. Each Cassandra data type corresponds to one or more Elixir data types. What Elixir data type is used for a given Cassandra type is often controlled by a formatting option. For example, a date value from Cassandra can be returned as a Date.t() struct or as an integer representing the number of days since the Unix epoch depending on the :date_format option passed to various Xandra functions.

Comparison Table

Cassandra data typeElixir data type
asciiString.t/0
bigintinteger/0
blobbinary/0
booleanboolean/0
counterinteger/0
dateDate.t/0 (if date_format: :date)
dateinteger/0 (if date_format: :integer), days from Unix epoch
decimal{value, scale} (if decimal_format: :tuple), where value * 10^(-1 * scale)
decimalDecimal.t/0 (if decimal_format: :decimal)
doublefloat/0
floatfloat/0
inet:inet.ip_address/0
intinteger/0
list<T>list/0
map<KeyT, ValueT>map/0
NULLnil
set<T>MapSet.t/0
smallintinteger/0
textString.t/0
timeinteger/0 (if time_format: :integer), as nanoseconds from midnight
timeTime.t/0 (if time_format: :time)
timestampDateTime.t/0 (if timestamp_format: :datetime)
timestampinteger/0 (if timestamp_format: :integer), as milliseconds from Unix epoch
timeuuidbinary/0
tinyintinteger/0
tuple<...>tuple/0
uuidbinary/0
varcharString.t/0
varintinteger/0