You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sl...@apache.org on 2012/09/11 12:11:38 UTC
git commit: Add inet support in binary protocol
Updated Branches:
refs/heads/trunk 73a4b4685 -> c6ddbea43
Add inet support in binary protocol
patch by slebresne; reviewed by thepaul for CASSANDRA-4627
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c6ddbea4
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c6ddbea4
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c6ddbea4
Branch: refs/heads/trunk
Commit: c6ddbea4386d123354b07fb8ad7316abe483c0c5
Parents: 73a4b46
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Tue Sep 11 12:10:27 2012 +0200
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Tue Sep 11 12:10:27 2012 +0200
----------------------------------------------------------------------
doc/cql3/CQL.textile | 2 ++
doc/native_protocol.spec | 1 +
.../org/apache/cassandra/transport/DataType.java | 1 +
3 files changed, 4 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/c6ddbea4/doc/cql3/CQL.textile
----------------------------------------------------------------------
diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile
index e0f25da..175bac0 100644
--- a/doc/cql3/CQL.textile
+++ b/doc/cql3/CQL.textile
@@ -652,6 +652,7 @@ bc(syntax)..
| decimal
| double
| float
+ | inet
| int
| text
| timestamp
@@ -672,6 +673,7 @@ p. The following table gives additional informations on the native data types:
|@decimal@ |Variable-precision decimal|
|@double@ |64-bit IEEE-754 floating point|
|@float@ |32-bit IEEE-754 floating point|
+|@inet@ |An IP address. It can be either 4 bytes long (IPv4) or 16 bytes long (IPv6)|
|@int@ |32-bit signed int|
|@text@ |UTF8 encoded string|
|@timestamp@|A timestamp. See "Working with dates":#usingdates below for more information.|
http://git-wip-us.apache.org/repos/asf/cassandra/blob/c6ddbea4/doc/native_protocol.spec
----------------------------------------------------------------------
diff --git a/doc/native_protocol.spec b/doc/native_protocol.spec
index 07d5c69..0dd5c14 100644
--- a/doc/native_protocol.spec
+++ b/doc/native_protocol.spec
@@ -384,6 +384,7 @@ Table of Contents
0x000D Varchar
0x000E Varint
0x000F Timeuuid
+ 0x0010 Inet
0x0020 List: the value is an [option], representing the type
of the elements of the list.
0x0021 Map: the value is two [option], representing the types of the
http://git-wip-us.apache.org/repos/asf/cassandra/blob/c6ddbea4/src/java/org/apache/cassandra/transport/DataType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/transport/DataType.java b/src/java/org/apache/cassandra/transport/DataType.java
index 29d7a93..0cb9d2d 100644
--- a/src/java/org/apache/cassandra/transport/DataType.java
+++ b/src/java/org/apache/cassandra/transport/DataType.java
@@ -48,6 +48,7 @@ public enum DataType implements OptionCodec.Codecable<DataType>
VARCHAR (13, UTF8Type.instance),
VARINT (14, IntegerType.instance),
TIMEUUID (15, TimeUUIDType.instance),
+ INET (16, InetAddressType.instance),
LIST (32, null),
MAP (33, null),
SET (34, null);