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

query: make datastore ordering act like a user would expect #110

Merged
merged 2 commits into from
Jan 24, 2019

Conversation

Stebalien
Copy link
Member

@Stebalien Stebalien commented Jan 24, 2019

This applies orders hierarchically. Unfortunately, the interfaces had to be changed significantly to get this to work.

For example [OrderByValue{}, SortByKey{}] used to re-sort by key, throwing away the value sort. Now, this acts like a normal database and SortByKey will only sort within equivalent values.

[[BREAKING CHANGE]]

PRs for datastores:

(and probably more)

This is all because we had to change NaiveOrder. Unfortunately, the old interface simply can't support this kind of sorting.

This applies orders hierarchically. Unfortunately, the interfaces had to be
changed significantly to get this to work.

For example `[OrderByValue{}, SortByKey{}]` *used* to re-sort by key, throwing
away the value sort. Now, this acts like a normal database and `SortByKey` will
only sort within equivalent values.
@ghost ghost assigned Stebalien Jan 24, 2019
@ghost ghost added the status/in-progress In progress label Jan 24, 2019
@Stebalien Stebalien requested a review from raulk January 24, 2019 17:41
@Stebalien Stebalien added the status/blocked Unable to be worked further until needs are met label Jan 24, 2019
query/order.go Show resolved Hide resolved
package.json Show resolved Hide resolved
@Stebalien Stebalien merged commit 3a9490a into master Jan 24, 2019
@ghost ghost removed the status/in-progress In progress label Jan 24, 2019
Stebalien added a commit to ipfs/go-ds-badger that referenced this pull request Jan 24, 2019
@Stebalien Stebalien deleted the fix/datastore-order branch January 24, 2019 19:56
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

Successfully merging this pull request may close these issues.

2 participants