Closed cnsharp closed 9 years ago
I'll see what I can do. Looks similar to Oracle's paging, using ROW_NUMBER() OVER(ORDER BY )
.
@cnsharp SqlServer 2008 support is complete. Please checkout the master branch to try it out. You have to decorate your database class with [Provider(typeof(Sql2008Provider))]
to enable it, e.g.:
[Provider(typeof(Sql2008Provider))]
class Sql2008Database : Database {
...
}
Thank you very much!You are so quickly and dedicated.I'll try it now.
@maxtoroq Hi Max,
Our DBA recommended a style like this which has a better performance in the middle of many pages
WITH ID AS( SELECT row_id = ROW_NUMBER() OVER(order by id DESC), id FROM dbo.tb WITH(NOLOCK) WHERE column_id = 1 ) SELECT ID.__row_id, DATA.* FROM ID INNER JOIN dbo.tb DATA WITH(NOLOCK) ON DATA.id = ID.id WHERE ID.row_id BETWEEN 5000 AND 5100 ;
I want to implement it by myself. The question is how can I pass id/primary key to SqlSet?Maybe I could add an id property to SqlSet.
What is your opinion? Thanks!
@cnsharp That level of fine tuning is not supported, use SqlBuilder instead. If you have more questions please create a new issue.
I found that SqlSet.Take and Skip method are based on SQL 2012.How can I do that in SQL 2008? Thanks!