OmniSciDB  2e3a973ef4
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

◆ get_truncated_row_count()

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

Definition at line 319 of file ResultSet.cpp.

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

319  {
320  if (total_row_count < offset) {
321  return 0;
322  }
323 
324  size_t total_truncated_row_count = total_row_count - offset;
325 
326  if (limit) {
327  return std::min(total_truncated_row_count, limit);
328  }
329 
330  return total_truncated_row_count;
331 }
+ Here is the caller graph for this function: