get_scanner

获取针对某个hashkey下的sortkey区间 [sortkeyA ~ sortkeyB)的一个scanner

  1. ///
  2. /// \brief get hash scanner
  3. /// get scanner for [start_sortkey, stop_sortkey) of hashkey
  4. /// \param hashkey
  5. /// cannot be empty
  6. /// \param start_sortkey
  7. /// sortkey to start with
  8. /// \param stop_sortkey
  9. /// sortkey to stop. ""(empty string) represents the max key
  10. /// \param options
  11. /// which used to indicate scan options, like which bound is inclusive
  12. /// \param scanner
  13. /// out param, used to get k-v
  14. /// this pointer should be deleted when scan complete
  15. /// \return
  16. /// int, the error indicates whether or not the operation is succeeded.
  17. /// this error can be converted to a string using get_error_string()
  18. ///
  19. virtual int get_scanner(const std::string &hashkey,
  20. const std::string &start_sortkey, // start from beginning if this set ""
  21. const std::string &stop_sortkey, // to the last item if this set ""
  22. const scan_options &options,
  23. pegasus_scanner *&scanner) = 0;