In Chapter 5, Working with Databases, we have seen how to paginate result sets using PaginatorSnippet
and Mapper, in the Paginating result sets recipe. We'll be using the PaginatorSnippet
tool, so there will be nothing new in that sense; however, Record does not have the helper methods that Mapper does. Therefore, paginating the result sets using Record and Squeryl is a little different.
In this recipe we will look at these differences and learn how to paginate result sets using Squeryl.
To keep things simple and to focus on what is important, we will use the project from the second recipe of this chapter, Mapping a table to a Scala class, where we mapped the contacts
table. You can create a new project by duplicating the old one or you can modify it.