[Groonga-commit] groonga/grnxx at 326f3b4 [master] Add missing arguments to get error information.

Back to archive index

susumu.yata null+****@clear*****
Wed May 28 15:52:55 JST 2014


susumu.yata	2014-05-28 15:52:55 +0900 (Wed, 28 May 2014)

  New Revision: 326f3b480a3d7b58422f5fe7fba68ed2f2594078
  https://github.com/groonga/grnxx/commit/326f3b480a3d7b58422f5fe7fba68ed2f2594078

  Message:
    Add missing arguments to get error information.

  Modified files:
    new-interface/table.hpp

  Modified: new-interface/table.hpp (+14 -5)
===================================================================
--- new-interface/table.hpp    2014-05-28 15:51:21 +0900 (f57c1d6)
+++ new-interface/table.hpp    2014-05-28 15:52:55 +0900 (795a32a)
@@ -219,7 +219,8 @@ class Table {
   // - オプションが不正である.
   // - リソースが確保できない.
   virtual std::unique_ptr<Cursor> create_cursor(
-      const CursorOptions &options) const = 0;
+      const CursorOptions &options,
+      Error *error) const = 0;
 
   // 行 ID の一覧に適用できる式を作成する.
   // 成功すれば有効なオブジェクトへのポインタを返す.
@@ -235,8 +236,13 @@ class Table {
   //       インタフェースがあれば何かと便利かもしれない.
   //       テスト用と考えれば,最適化などは一切せず,
   //       真っ正直にやってくれるのがベスト.
+  //
+  // 失敗する状況としては,以下のようなものが挙げられる.
+  // - オプションが不正である.
+  // - リソースが確保できない.
   virtual std::unique_ptr<Expression> create_expression(
-      const ExpressionOptions &options) const = 0;
+      const ExpressionOptions &options,
+      Error *error) const = 0;
 
   // 整列器を作成する.
   // 成功すれば有効なオブジェクトへのポインタを返す.
@@ -245,13 +251,16 @@ class Table {
   // 返り値は std::unique_ptr なので自動的に delete される.
   // 自動で delete されて困るときは release() で生のポインタを取り出す必要がある.
   //
-  // TODO: Sorter のインタフェースを決める.
-  //
   // TODO: 索引,整列,グループ化の連携について検討する.
   //       たとえば,整列の途中経過をグループ化に利用するなど.
   //       行の整列とグループの整列が考えられる.
+  //
+  // 失敗する状況としては,以下のようなものが挙げられる.
+  // - オプションが不正である.
+  // - リソースが確保できない.
   virtual std::unique_ptr<Sorter> create_sorter(
-      const SorterOptions &options) const = 0;
+      const SorterOptions &options,
+      Error *error) const = 0;
 
   // TODO: Grouper
   //
-------------- next part --------------
HTML����������������������������...
下載 



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