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

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 290 of file ResultSet.cpp.

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

290  {
291  if (total_row_count < offset) {
292  return 0;
293  }
294 
295  size_t total_truncated_row_count = total_row_count - offset;
296 
297  if (limit) {
298  return std::min(total_truncated_row_count, limit);
299  }
300 
301  return total_truncated_row_count;
302 }

+ Here is the caller graph for this function: