[Groonga-commit] groonga/grnxx at aafd9b3 [master] Add comments to Expression.

Back to archive index

susumu.yata null+****@clear*****
Fri Jul 11 17:15:23 JST 2014


susumu.yata	2014-07-11 17:15:23 +0900 (Fri, 11 Jul 2014)

  New Revision: aafd9b369813feaf18c7e4b3b9d7473b16c6b591
  https://github.com/groonga/grnxx/commit/aafd9b369813feaf18c7e4b3b9d7473b16c6b591

  Message:
    Add comments to Expression.

  Modified files:
    include/grnxx/expression.hpp
    lib/grnxx/expression.cpp

  Modified: include/grnxx/expression.hpp (+11 -2)
===================================================================
--- include/grnxx/expression.hpp    2014-07-09 17:10:56 +0900 (00cdb12)
+++ include/grnxx/expression.hpp    2014-07-11 17:15:23 +0900 (9a114c6)
@@ -28,19 +28,28 @@ class Expression {
 
   ~Expression();
 
+  // Return the associated table.
   Table *table() const {
     return table_;
   }
+  // Return the result data type.
   DataType data_type() const;
 
+  // Filter records.
+  //
+  // Evaluates the expression for the given record set and removes records
+  // whose evaluation results are false.
+  //
+  // Returns true on success.
+  // On failure, returns false and stores error information into "*error" if
+  // "error" != nullptr.
   bool filter(Error *error, RecordSet *record_set);
 
  private:
   Table *table_;
   unique_ptr<ExpressionNode> root_;
 
-  Expression(Table *table,
-             unique_ptr<ExpressionNode> &&root);
+  Expression(Table *table, unique_ptr<ExpressionNode> &&root);
 };
 
 class ExpressionBuilder {

  Modified: lib/grnxx/expression.cpp (+1 -2)
===================================================================
--- lib/grnxx/expression.cpp    2014-07-09 17:10:56 +0900 (dbac606)
+++ lib/grnxx/expression.cpp    2014-07-11 17:15:23 +0900 (be5b631)
@@ -294,8 +294,7 @@ bool Expression::filter(Error *error, RecordSet *record_set) {
   return false;
 }
 
-Expression::Expression(Table *table,
-                       unique_ptr<ExpressionNode> &&root)
+Expression::Expression(Table *table, unique_ptr<ExpressionNode> &&root)
     : table_(table),
       root_(std::move(root)) {}
 
-------------- next part --------------
HTML����������������������������...
Download 



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