[Groonga-commit] groonga/grnxx:a3e352f [master] Support MAP_CURSOR_ORDER_BY_ID | MAP_CURSOR_REVERSE_ORDER.

Back to archive index

susumu.yata null+****@clear*****
Thu Apr 18 14:48:29 JST 2013


susumu.yata	2013-04-18 14:48:29 +0900 (Thu, 18 Apr 2013)

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

  Message:
    Support MAP_CURSOR_ORDER_BY_ID | MAP_CURSOR_REVERSE_ORDER.

  Modified files:
    lib/grnxx/alpha/map/double_array-slice.cpp

  Modified: lib/grnxx/alpha/map/double_array-slice.cpp (+4 -0)
===================================================================
--- lib/grnxx/alpha/map/double_array-slice.cpp    2013-04-18 14:40:12 +0900 (f4db195)
+++ lib/grnxx/alpha/map/double_array-slice.cpp    2013-04-18 14:48:29 +0900 (feda5d3)
@@ -647,7 +647,11 @@ void DoubleArrayKeyCursor<Slice>::init_order_by_id() {
       node_ids_.push_back(node.offset() ^ node.child());
     }
   }
+
   std::sort(keys_.begin(), keys_.end());
+  if (options_.flags & MAP_CURSOR_REVERSE_ORDER) {
+    std::reverse(keys_.begin(), keys_.end());
+  }
 
   cur_ = options_.offset - 1;
 }
-------------- next part --------------
HTML����������������������������...
Download 



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