OmniSciDB  085a039ca4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
anonymous_namespace{ResultSet.cpp} Namespace Reference

Classes

struct  IsDictEncodedStr
 

Functions

size_t get_truncated_row_count (size_t total_row_count, size_t limit, size_t offset)
 

Function Documentation

size_t anonymous_namespace{ResultSet.cpp}::get_truncated_row_count ( size_t  total_row_count,
size_t  limit,
size_t  offset 
)

Definition at line 539 of file ResultSet.cpp.

Referenced by ResultSet::binSearchRowCount(), ResultSet::parallelRowCount(), and ResultSet::rowCountImpl().

539  {
540  if (total_row_count < offset) {
541  return 0;
542  }
543 
544  size_t total_truncated_row_count = total_row_count - offset;
545 
546  if (limit) {
547  return std::min(total_truncated_row_count, limit);
548  }
549 
550  return total_truncated_row_count;
551 }

+ Here is the caller graph for this function: