Skip to content
This repository was archived by the owner on Apr 4, 2024. It is now read-only.

pagination #2

Open
tyfncn opened this issue Feb 22, 2017 · 5 comments
Open

pagination #2

tyfncn opened this issue Feb 22, 2017 · 5 comments
Assignees

Comments

@tyfncn
Copy link

tyfncn commented Feb 22, 2017

Thanks for a good database adapter for peewee. Just starting to like this, then I find out paging is still in your TODO list. Are you planning to add it sometime soon?

@ribx
Copy link
Contributor

ribx commented May 2, 2017

The code says:

    # TODO: implement limit and offset properly, we can use:
    # SELECT *
    # FROM (SELECT ROW_NUMBER() OVER(ORDER BY id) RowNr, id FROM tbl) t
    # WHERE RowNr BETWEEN 10 AND 20

I never used MsSQL, but how about this:
https://technet.microsoft.com/en-us/library/gg699618(v=sql.110).aspx

@ribx
Copy link
Contributor

ribx commented May 2, 2017

looks like it took Microsoft until SQL Server 2012 to fix this:

https://dba.stackexchange.com/questions/136259/offset-fetch-in-sql-server-2008

That's quite frustrating.

@COUR4G3
Copy link
Owner

COUR4G3 commented Aug 18, 2017

I only ever used this with older version of MSSQL (2005 and 2008) and the pagination looked very frustrating to implement. It looks simple enough to implement in 2012+ but I don't use MSSQL anymore so hard to find time to code it.

@COUR4G3
Copy link
Owner

COUR4G3 commented Jan 25, 2018

Will probably start looking at this issue again in the next month, since I will be probably end up working with MSSQL again - both 2005/2008 and 2016.

@COUR4G3 COUR4G3 self-assigned this Jan 25, 2018
@stefanjcollier
Copy link

Not so much an issue, more an FYI. There is another chap attempting (or at least got further with) pagination:

https://github.com/brake/peewee_mssql

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants