Added paging for SQL results.

Should close #26.