Skip to content

feat!: pagination #509

@faretek1

Description

@faretek1

It would be useful to be able to convert offset+limit into page numbers using the method of User.loves so that we can standardize the api. I recommend placing some function for this in commons.py

If we update some functions to use this instead of pages, it would be backwards incompatible. we could also add a handler that overrides the pagination calculation if you provide a page number manually

not sure if pagination is the correct word

list of operations to 'paginate' (i.e. ones that use page insetead of limit+offset)

  • Classroom.student_names
  • Classroom.class_studio_ids
  • Classroom.activity
  • Forum.posts
  • (forum) get_topic_list
  • User.loves (could be modified to use a shared function)
  • sess.classroom_alerts
  • sess.mystuff_projects
  • sess.mystuff_studios
  • ses.mystuff_classes
  • sess.mystuff_ended_classes
  • sess.connect_topic_list
  • user.comments

Metadata

Metadata

Assignees

No one assigned

    Labels

    BREAKING CHANGEWould increase the semver major number. Backwards-incompatibleenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions