OmniSciDB  bf83d84833
 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 284 of file ResultSet.cpp.

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

284  {
285  if (total_row_count < offset) {
286  return 0;
287  }
288 
289  size_t total_truncated_row_count = total_row_count - offset;
290 
291  if (limit) {
292  return std::min(total_truncated_row_count, limit);
293  }
294 
295  return total_truncated_row_count;
296 }

+ Here is the caller graph for this function: