O'Reilly logo

Lift Application Development Cookbook by Gilberto T. Garcia Jr.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Paginating result sets using Record

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.

Getting ready

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required