Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

highter_items returns items with the same position value #247

Closed
james-logan opened this issue Dec 29, 2016 · 2 comments
Closed

highter_items returns items with the same position value #247

james-logan opened this issue Dec 29, 2016 · 2 comments

Comments

@james-logan
Copy link

Hey, this isn't really an issue, just a question.

Is there a reason this line is using <= and not just <

In the off chance that something in the database has a position value that is equal to another item in the list, it will show up in the list of 'higher_items', won't it?

@brendon
Copy link
Owner

brendon commented Dec 29, 2016

Hi @james-logan, This was added with the extra constraint on the next line that excludes the current record. The assumption is that there may be other records with the same position value, and we assume that those records are higher than this record.

This concept is utilised in the move up/down logic too from memory.

I hope that helps explain it :)

@brendon
Copy link
Owner

brendon commented Dec 29, 2016

Feel free to close the issue or ask further questions :)

@brendon brendon closed this as completed Jan 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants