17 #ifndef KUDU_CLIENT_SCAN_BATCH_H    18 #define KUDU_CLIENT_SCAN_BATCH_H    22 #ifdef KUDU_HEADERS_NO_STUBS    23 #include "kudu/gutil/macros.h"    24 #include "kudu/gutil/port.h"    26 #include "kudu/client/stubs.h"    29 #include "kudu/util/kudu_export.h"    30 #include "kudu/util/slice.h"   107   KuduScanBatch::RowPtr Row(
int idx) 
const;
   110   const_iterator begin() 
const;
   112   const_iterator end() 
const;
   120   class KUDU_NO_EXPORT Data;
   122   friend class tools::ReplicaDumper;
   132   RowPtr() : schema_(NULL), row_data_(NULL) {}
   137   bool IsNull(
const Slice& col_name) 
const;
   142   bool IsNull(
int col_idx) 
const;
   157   Status GetBool(
const Slice& col_name, 
bool* val) 
const WARN_UNUSED_RESULT;
   159   Status GetInt8(
const Slice& col_name, int8_t* val) 
const WARN_UNUSED_RESULT;
   160   Status GetInt16(
const Slice& col_name, int16_t* val) 
const WARN_UNUSED_RESULT;
   161   Status GetInt32(
const Slice& col_name, int32_t* val) 
const WARN_UNUSED_RESULT;
   162   Status GetInt64(
const Slice& col_name, int64_t* val) 
const WARN_UNUSED_RESULT;
   163   Status GetUnixTimeMicros(
const Slice& col_name, int64_t* micros_since_utc_epoch)
   164     const WARN_UNUSED_RESULT;
   166   Status GetFloat(
const Slice& col_name, 
float* val) 
const WARN_UNUSED_RESULT;
   167   Status GetDouble(
const Slice& col_name, 
double* val) 
const WARN_UNUSED_RESULT;
   188   Status GetBool(
int col_idx, 
bool* val) 
const WARN_UNUSED_RESULT;
   190   Status GetInt8(
int col_idx, int8_t* val) 
const WARN_UNUSED_RESULT;
   191   Status GetInt16(
int col_idx, int16_t* val) 
const WARN_UNUSED_RESULT;
   192   Status GetInt32(
int col_idx, int32_t* val) 
const WARN_UNUSED_RESULT;
   193   Status GetInt64(
int col_idx, int64_t* val) 
const WARN_UNUSED_RESULT;
   194   Status GetUnixTimeMicros(
int col_idx, int64_t* micros_since_utc_epoch) 
const WARN_UNUSED_RESULT;
   196   Status GetFloat(
int col_idx, 
float* val) 
const WARN_UNUSED_RESULT;
   197   Status GetDouble(
int col_idx, 
double* val) 
const WARN_UNUSED_RESULT;
   217   Status GetString(
const Slice& col_name, 
Slice* val) 
const WARN_UNUSED_RESULT;
   218   Status GetBinary(
const Slice& col_name, 
Slice* val) 
const WARN_UNUSED_RESULT;
   242   Status GetString(
int col_idx, 
Slice* val) 
const WARN_UNUSED_RESULT;
   243   Status GetBinary(
int col_idx, 
Slice* val) 
const WARN_UNUSED_RESULT;
   252   const void* cell(
int col_idx) 
const;
   255   std::string ToString() 
const;
   259   template<
typename KeyTypeWrapper> 
friend struct SliceKeysTestSetup;
   260   template<
typename KeyTypeWrapper> 
friend struct IntKeysTestSetup;
   263   RowPtr(
const Schema* schema,
   264          const uint8_t* row_data)
   266         row_data_(row_data) {
   270   Status Get(
const Slice& col_name, 
typename T::cpp_type* val) 
const;
   273   Status Get(
int col_idx, 
typename T::cpp_type* val) 
const;
   275   const Schema* schema_;
   276   const uint8_t* row_data_;
   279 class KUDU_EXPORT KuduScanBatch::const_iterator
   280     : 
public std::iterator<std::forward_iterator_tag, KuduScanBatch::RowPtr> {
   286     return batch_->Row(idx_);
   301     const_iterator tmp(batch_, idx_);
   313     return (idx_ == other.idx_) && (batch_ == other.batch_);
   324     return !(*
this == other);
   328   friend class KuduScanBatch;
   329   const_iterator(
const KuduScanBatch* b, 
int idx)
   334   const KuduScanBatch* 
const batch_;
   339 inline KuduScanBatch::const_iterator KuduScanBatch::begin()
 const {
   340   return const_iterator(
this, 0);
   343 inline KuduScanBatch::const_iterator KuduScanBatch::end()
 const {
   344   return const_iterator(
this, NumRows());
 A representation of a table's schema. 
Definition: schema.h:417
 
A representation of an operation's outcome. 
Definition: status.h:130
 
Definition: callbacks.h:28
 
RowPtr value_type
A handy typedef for the RowPtr. 
Definition: scan_batch.h:89
 
RowPtr()
Definition: scan_batch.h:132
 
KuduScanBatch::RowPtr operator*() const 
Definition: scan_batch.h:285
 
A wrapper around externally allocated data. 
Definition: slice.h:43
 
This class is a representation of a single scan. 
Definition: client.h:1682
 
bool operator==(const const_iterator &other) const 
Definition: scan_batch.h:312
 
const_iterator operator++(int)
Definition: scan_batch.h:300
 
bool operator!=(const const_iterator &other) const 
Definition: scan_batch.h:323
 
const_iterator & operator++()
Definition: scan_batch.h:292
 
A batch of zero or more rows returned by a scan operation. 
Definition: scan_batch.h:75