DSE Graphデータ型
DSE Graphデータ型について説明します。
DSE Graphには、CQLデータ型と連携しているデータ型が多数あります。検索インデックスについては、DSE Graphデータ型とSolrデータ型の間の関係を参照してください。
DSE Graphデータ型 | 説明 | スキーマ例 |
---|---|---|
bigint | 64ビット符号付きlong | schema.propertyKey('big_number').Bigint().create() |
BLOB | 任意数のバイト(検証なし)。base64文字列で表されます。
|
schema.propertyKey('serial_string').Blob().create() |
boolean | trueまたはfalse | schema.propertyKey('alive').Boolean().create() |
date | 日付。'1940'または'1940-01-01'の形式で表されます。 | schema.propertyKey('review_date').Date().create() |
decimal | 可変精度の10進数 注: 通貨を取り扱う際は、DataStaxでは、intとの間でシリアライズする通貨クラスを使用するか、decimalデータ型を使用することを推奨します。 |
schema.propertyKey('book_price').Decimal().create() |
double | 64ビットIEEE-754の浮動小数点数 | schema.propertyKey('stars').Double().create() |
duration | 時間(ミリ秒) | |
float | 32ビットIEEE-754の浮動小数点数 | schema.propertyKey('precise').Float().create() |
inet | IPv4形式またはIPv6形式のIPアドレス文字列で、python-cqlドライバーとCQLネイティブ・プロトコルで使用される | schema.propertyKey('website_ip').Inet().create() |
int | 32ビット符号付き整数 | schema.propertyKey('age').Int().create() |
linestring | 地理空間およびCartesian linestringsに使用される(double .... points) |
schema.propertyKey('road').Linestring().withGeoBounds().create() schema.propertyKey('road').Linestring().withBounds(-1, -1, 1, 1).create() |
point | 地理空間およびCartesian points(double x、double y)に使用される。地理空間ポイント(点)のマッピングでは、経度/緯度の順に対応する。 |
schema.propertyKey('coordinates').Point().withGeoBounds().create() schema.propertyKey('coordinates').Point().withBounds(-1, -1, 1, 1).create() |
polygon | 地理空間およびCartesian polygonsに使用される(double .... points) |
schema.propertyKey('block).Polygon().withGeoBounds().create() schema.propertyKey('block').Polygon().withBounds(-1, -1, 1, 1).create() |
smallint | 2バイト整数 | schema.propertyKey('age').Smallint().create() |
text | 文字列またはUTF-8エンコード文字列 | schema.propertyKey('name').Text().create() |
time | 時間。'10:00:00'または'10:00'の形式で表される。 | schema.propertyKey('time').Time().create() |
timestamp | 8バイトでエンコードされた、エポック以降の日付または時刻日付。timestampデータ型は有効なDSEデータベース・タイムスタンプとして指定する必要がある。
|
schema.propertyKey('mealCreationDate').Timestamp().create() |
uuid | 標準UUID形式またはtimeuuid形式のUUID | schema.propertyKey('authorID').Uuid().create() |
varint | 任意精度の整数 | schema.propertyKey('number').Varint().create() |