Cassandra教程
Cassandra包括以下几种数据类型:
基本类型 | 集合类型 | 用户自定义 | tuple类型 | custom_type
基本数据类型
类型 | 支持的常数 | 描述 |
---|---|---|
ascii | string | ASCII character string |
bigint | integer | 64-bit signed long |
blob | blob | Arbitrary bytes (no validation) |
boolean | boolean | Either true or false |
counter | integer | Counter column (64-bit signed value). See Counters for details |
date | integer, string | A date (with no corresponding time value). See Working with dates below for details |
decimal | integer, float | Variable-precision decimal |
double | integer float | 64-bit IEEE-754 floating point |
duration | duration, | A duration with nanosecond precision. See Working with durations below for details |
float | integer, float | 32-bit IEEE-754 floating point |
inet | string | An IP address, either IPv4 (4 bytes long) or IPv6 (16 bytes long). Note that there is no inet constant, IP address should be input as strings |
int | integer | 32-bit signed int |
smallint | integer | 16-bit signed int |
text | string | UTF8 encoded string |
time | integer, string | A time (with no corresponding date value) with nanosecond precision. See Working with times below for details |
timestamp | integer, string | A timestamp (date and time) with millisecond precision. See Working with timestamps below for details |
timeuuid | uuid | Version 1 UUID, generally used as a “conflict-free” timestamp. Also see Timeuuid functions |
tinyint | integer | 8-bit signed int |
uuid | uuid | A UUID (of any version) |
varchar | string | UTF8 encoded string |
varint | integer | Arbitrary-precision integer |