[Groonga-commit] groonga/grnxx at 4211711 [master] Rename DatumType to DataType and remove ColumnType.

Back to archive index

susumu.yata null+****@clear*****
Wed Jun 25 11:08:49 JST 2014


susumu.yata	2014-06-25 11:08:49 +0900 (Wed, 25 Jun 2014)

  New Revision: 421171107625eaae5fcf14d797483b4da966dad2
  https://github.com/groonga/grnxx/commit/421171107625eaae5fcf14d797483b4da966dad2

  Message:
    Rename DatumType to DataType and remove ColumnType.

  Modified files:
    new-interface/column.hpp
    new-interface/datum.hpp
    new-interface/types.hpp

  Modified: new-interface/column.hpp (+2 -2)
===================================================================
--- new-interface/column.hpp    2014-06-25 11:07:59 +0900 (c33f701)
+++ new-interface/column.hpp    2014-06-25 11:08:49 +0900 (aece5b4)
@@ -11,8 +11,8 @@ class Column {
   virtual Table *table() const = 0;
   // 名前を取得する.
   virtual const char *name() const = 0;
-  // カラムの種類を取得する.
-  virtual ColumnType type() const = 0;
+  // カラムのデータ型を取得する.
+  virtual DataType data_type() const = 0;
   // 索引 ID の最小値を取得する.
   virtual IndexID min_index_id() const = 0;
   // 索引 ID の最大値を取得する.

  Modified: new-interface/datum.hpp (+2 -2)
===================================================================
--- new-interface/datum.hpp    2014-06-25 11:07:59 +0900 (e73f556)
+++ new-interface/datum.hpp    2014-06-25 11:08:49 +0900 (13568c0)
@@ -61,7 +61,7 @@ class Datum {
   Datum &operator=(Datum &&datum);
 
   // 種類を返す.
-  DatumType type() const {
+  DataType type() const {
     return type_;
   }
 
@@ -129,7 +129,7 @@ class Datum {
   void clear();
 
  private:
-  DatumType type_;
+  DataType type_;
   union {
     std::nullptr_t null_;
     bool bool_;

  Modified: new-interface/types.hpp (+36 -28)
===================================================================
--- new-interface/types.hpp    2014-06-25 11:07:59 +0900 (9ff7ce1)
+++ new-interface/types.hpp    2014-06-25 11:08:49 +0900 (7121757)
@@ -47,40 +47,48 @@ class Column;
 class Index;
 class Datum;
 
-enum ColumnType {
-  ID_COLUMN,
-  BOOL_COLUMN,
-  INT_COLUMN,
-  FLOAT_COLUMN,
-  TEXT_COLUMN,
-  REF_COLUMN,
-  BOOL_ARRAY_COLUMN,
-  INT_ARRAY_COLUMN,
-  FLOAT_ARRAY_COLUMN,
-  TEXT_ARRAY_COLUMN,
-  REF_ARRAY_COLUMN,
-  INDEX_COLUMN
+enum DataType {
+  // 無効な型.
+  INVALID_DATA,
+
+  // 真偽値.
+  BOOLEAN_DATA,
+  // 64-bit 符号あり整数.
+  INTEGER_DATA,
+  // 倍精度浮動小数点数.
+  FLOAT_DATA,
+  // 時刻(The Unix Epoch からの経過マイクロ秒数).
+  TIME_DATA,
+  // 経緯度(ミリ秒単位).
+  GEO_POINT_DATA,
+  // 文字列.
+  TEXT_DATA,
+  // 参照.
+  REFERENCE_DATA,
+
+  // 上述の型を配列にしたもの.
+  BOOLEAN_ARRAY_DATA,
+  INTEGER_ARRAY_DATA,
+  FLOAT_ARRAY_DATA,
+  TIME_ARRAY_DATA,
+  GEO_POINT_ARRAY_DATA,
+  TEXT_ARRAY_DATA,
+  REFERENCE_ARRAY_DATA
 };
 
-std::ostream &operator<<(std::ostream &stream, ColumnType column_type);
-
-enum DatumType {
-  NULL_DATUM,
-  BOOL_DATUM,
-  INT_DATUM,
-  FLOAT_DATUM,
-  TEXT_DATUM,
-  BOOL_ARRAY_DATUM,
-  INT_ARRAY_DATUM,
-  FLOAT_ARRAY_DATUM,
-  TEXT_ARRAY_DATUM
-};
-
-std::ostream &operator<<(std::ostream &stream, DatumType datum_type);
+std::ostream &operator<<(std::ostream &stream, DataType data_type);
 
 enum IndexType {
+  // 木構造にもとづく索引.
+  // 範囲検索をサポートする.
   TREE_INDEX,
+
+  // ハッシュ表にもとづく索引.
+  // TREE_INDEX と比べると,データの登録・削除と完全一致検索が速い代わり,
+  // 範囲検索などには向かない(あるいは使えない).
   HASH_INDEX
+
+  // TODO: 全文検索用の索引は,こちらの索引に加えるか,まったく別の索引として扱う.
 };
 
 std::ostream &operator<<(std::ostream &stream, IndexType index_type);
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index