[Groonga-commit] groonga/grnxx at b08ac18 [master] Add Cursor::read_all().

Back to archive index

susumu.yata null+****@clear*****
Tue Jul 15 18:56:12 JST 2014


susumu.yata	2014-07-15 18:56:12 +0900 (Tue, 15 Jul 2014)

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

  Message:
    Add Cursor::read_all().

  Modified files:
    include/grnxx/cursor.hpp

  Modified: include/grnxx/cursor.hpp (+10 -1)
===================================================================
--- include/grnxx/cursor.hpp    2014-07-15 15:28:13 +0900 (dc96ab0)
+++ include/grnxx/cursor.hpp    2014-07-15 18:56:12 +0900 (6dd7339)
@@ -19,13 +19,22 @@ class Cursor {
   // Reads at most "max_count" records and stores the records into
   // "*record_set".
   //
-  // On success, returns the number of records read on success.
+  // On success, returns the number of records read.
   // On failure, returns -1 and stores error information into "*error" if
   // "error" != nullptr.
   virtual Int read(Error *error,
                    Int max_count,
                    RecordSet *record_set) = 0;
 
+  // Read all the remaining records.
+  //
+  // On success, returns the number of records read.
+  // On failure, returns -1 and stores error information into "*error" if
+  // "error" != nullptr.
+  virtual Int read_all(Error *error, RecordSet *record_set) {
+    return read(error, numeric_limits<Int>::max(), record_set);
+  }
+
  protected:
   const Table *table_;
 
-------------- next part --------------
HTML����������������������������...
下載 



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