mirror of
https://github.com/jeffknupp/sandman2.git
synced 2026-04-25 00:25:49 +03:00
[GH-ISSUE #61] Paging does not work with MSSQL #42
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
pull-request
question
refactoring
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/sandman2-jeffknupp#42
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @knutimar on GitHub (May 16, 2017).
Original GitHub issue: https://github.com/jeffknupp/sandman2/issues/61
Originally assigned to: @jeffknupp on GitHub.
http://localhost:5000/bigtable/?page=1 works
http://localhost:5000/bigtable/?page=2 gives 500 Internal Server Error
....
sql/base.py", line 1169, in visit_select
raise exc.CompileError('MSSQL requires an order_by when '
CompileError: MSSQL requires an order_by when using an OFFSET or a non-simple LIMIT clause
I am using sandman2 v1.0.6 and Python 2.7.12 on Linux
Connection string starts with mssql+pymssql://
@jeffknupp commented on GitHub (May 16, 2017):
Well, the error seems clear and makes sense. Let me see what I can do. Unfortunately, I don't have an MSSQL database to test on, but it should work on any database.
@jeffknupp commented on GitHub (May 16, 2017):
@knutimar In the meantime, can you try to circumvent this by simply adding
/?sort=<some attribute of your model>&page=2and let me know the output?@knutimar commented on GitHub (May 17, 2017):
Hi, thanks for your reply.
The workaround with adding /?sort=&page=2 works
fine, thank you!
I tried several increments for page=x and every time I get 20 new elements.
2017-05-16 15:55 GMT+02:00 Jeff Knupp notifications@github.com:
@jeffknupp commented on GitHub (May 18, 2017):
20 is just the default. If you'd like to change the number returned per page, set the
limitURL parameter