Modified method of cursor pagination and data filtering as an NPM package
DOI:
https://doi.org/10.34185/1562-9945-3-158-2025-17Keywords:
cursor pagination, database, ORM system, data filtering, query indexing, NPM package, fuzzy search, merge and heap sort, binary tree, hash function.Abstract
This article is devoted to the development of a modified cursor pagination method that supports major databases and ORM systems, provides the ability to use complex data filtering and sorting, query indexing, etc. Existing solutions, their use cases, advantages and disadvan-tages are analyzed. A modified method is formed that includes modified and improved func-tionality of existing NPM packages, along with new implementations focused on increasing the efficiency and versatility of database queries. The proposed solution is analyzed. Potential directions for further expansion and improvement of the method are given. The purpose of this research is to increase the efficiency and versatility of cursor pagi-nation by developing and software implementing a method in which query time will be signifi-cantly reduced and the number of databases supported will be greater than in existing solu-tions. In accordance with the stated goal, it is necessary to solve the following tasks: to re-view existing methods for implementing cursor pagination, to propose a new method with bet-ter speed and greater versatility, to experimentally verify the effectiveness of the developed method. At the moment, there is a very limited number of data packages that provide ready-made functionality for implementing cursor pagination, and none of them is universal enough (only one ORM system or one native database is supported). In addition, such solutions do not include the implementation of query indexing to increase efficiency; there is no optional filtering/sorting of data by the selected parameter. Thus, the problem of the lack of a univer-sal and optimized pagination method is relevant and requires research. Therefore, a modified method of cursor pagination and data filtering is proposed in the form of an NPM package, which will solve the shortcomings of existing methods.
References
Jason Ngan (2022). Understanding the Offset and Cursor Pagination [Electronic resource]. – URL: https://medium.com/better-programming/understanding-the-offset-and-cursor-pagination-8ddc54d10d98
Merge.dev (2023). Cursor pagination: how it works and its pros and cons [Electronic re-source]. – URL: https://www.merge.dev/blog/cursor-pagination
Kellton (2024). Best Backend Web Development Frameworks [Electronic resource] / Kell-ton. – URL: https://www.kellton.com/kellton-tech-blog/best-backend-web-development-frameworks
mongo-cursor-pagination (2025). Module for cursor pagination integration in MongoDB [Electronic resource]. – URL: https://www.npmjs.com/package/mongo-cursor-pagination
typeorm-cursor-pagination (2023). Package for cursor pagination with TypeORM [Elec-tronic resource]. – URL: https://www.npmjs.com/package/typeorm-cursor-pagination
sequelize-cursor-pagination (2025). Package for cursor pagination with Sequelize [Elec-tronic resource]. – URL: https://www.npmjs.com/package/sequelize-cursor-pagination
about-npm (2023). About NPM packages [Electronic resource]. – URL: https://docs.npmjs.com/about-npm
Goodays API Platform (2023). Pagination, sorting and filtering [Electronic resource]. – URL: https://apidocs.goodays.co/docs/sorting-and-paginatio
Downloads
Published
Issue
Section
License
Copyright (c) 2025 System technologies

This work is licensed under a Creative Commons Attribution 4.0 International License.