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

Comparison table

Cassandra data typeElixir data type
NULLnil
boolboolean()
float, doublefloat()
int, bigint, smallint, varint, tinyint, counterinteger()
decimalDecimal.t(), {value, scale}
ascii, varchar, textString.t()
blobbinary()
dateDate.t(), integer() (days from Unix epoch)
timestampDateTime.t(), integer() (milliseconds from Unix epoch)
timeTime.t(), integer() (nanoseconds from midnight)
listlist()
tupletuple()
setMapSet.t()
mapmap()
uuid, timeuuidbinary()