docs: def page_to_offset(params):
      """
      Transforms `page`/`per_page` from `params` to `limit`/`offset` suitable for SQL.
  
      :param dict params: The dictionary containing `page` and `per_page` values will be added
                          the values `limit` and `offset`.
      """
  
      if 'page' not in params:
          return
  
      page = params['page']
      del params['page']
  
      # 'per_page' je len alias za 'limit'
      if 'per_page' in params:
          per_page = params.get('per_page')
          del params['per_page']
      else:
          per_page = params.get('limit', 10)
  
      params['offset'] = int(per_page) * (int(page) - 1)
      params['limit'] = per_page