markrendle / Simple.Data

A light-weight, dynamic data access component for C# 4.0
MIT License
1.33k stars 303 forks source link

Paging views #308

Closed maniserowicz closed 10 years ago

maniserowicz commented 10 years ago

Currently views cannot be paged using Simple.Data because they do not have primary keys. The problem is that keys are really necessary in the SqlQueryPager. Even SqlCe40QueryPager that comes with Simple.Data does not require them. MySql pager would ignore the keys too. And our PostgreSQL pager (found here, forked from the "official" one that seems to be abandoned: https://github.com/ultrico/Simple.Data.PostgreSql ) does not need them either. Wouldn't it be a good idea to allow paging on tables/views without primary key and move this exception from AdoAdapterQueryRunner to SqlQueryPager ?

https://github.com/markrendle/Simple.Data/blob/master/Simple.Data.Ado/AdoAdapterQueryRunner.cs#L188

MattBecker commented 8 years ago

If I understand the pull request properly, this was only applied to the v2.0.0-alpha1 branch, and not Simple.Data.Core 1.0.0-rc3. Is that correct?