Skip to main content


You can limit your query results by using the limit modifier. It limits the max number of objects returned from the database, namely defines the page size for pagination. In combination with page, primarily used to paginate through your data. Even if you do not specify a limit in your database queries, Altogic automatically limits the number of objects returned from the database by setting the default limits.


If multiple limit method calls are chained then the last one overwrites the previous limit values.

// Limit the query result to 10 objects per page
let result = await altogic.db
.filter('position == "Engineer" && department.code == 31415')
.omit(["compensation", "benefit"])
.sort("hireDate", "desc")


Here you can find parameters for the limit modifier.



Data type



1limitCountnumberYesAn integer that specifies the max number of objects to return.

It throws an exception if limitCount is not specified or if it is not a positive integer.