OmniSciDB  fe05a0c208
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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 288 of file ResultSet.cpp.

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

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

+ Here is the caller graph for this function: