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

Allow queries to be sorted by any fields #1165

Open
MoOx opened this Issue Sep 25, 2017 · 7 comments

Comments

Projects
None yet
3 participants
@MoOx
Member

MoOx commented Sep 25, 2017

Currently "order" is restricted to id because it's leveldb default behavior.
To improve the situation, we will need to dig deeper into leveldb. Probably the thing called "iterator".

@MoOx

This comment has been minimized.

Show comment
Hide comment
@MoOx

MoOx Sep 26, 2017

Member

@bloodyowl mind taking a look to this issue?

Member

MoOx commented Sep 26, 2017

@bloodyowl mind taking a look to this issue?

@MoOx MoOx added the Hacktoberfest label Sep 28, 2017

@luan-cestari

This comment has been minimized.

Show comment
Hide comment
@luan-cestari

luan-cestari Oct 30, 2017

Hi @MoOx ,

Does this issue require to use something like https://github.com/mirkokiefer/levelup-iterator ? I saw https://github.com/phenomic/phenomic/blob/master/packages/core/src/db/index.js and it seems to have leveldown which have iterator but I can't see the usage and I thought leveldown would be mutual exclusive with levelup.

Also about the issue, that means it would have a new arguments about the desire field to be used to sort in the entire API that use https://github.com/phenomic/phenomic/blob/master/packages/core/src/db/index.js ?

luan-cestari commented Oct 30, 2017

Hi @MoOx ,

Does this issue require to use something like https://github.com/mirkokiefer/levelup-iterator ? I saw https://github.com/phenomic/phenomic/blob/master/packages/core/src/db/index.js and it seems to have leveldown which have iterator but I can't see the usage and I thought leveldown would be mutual exclusive with levelup.

Also about the issue, that means it would have a new arguments about the desire field to be used to sort in the entire API that use https://github.com/phenomic/phenomic/blob/master/packages/core/src/db/index.js ?

@MoOx

This comment has been minimized.

Show comment
Hide comment
@MoOx

MoOx Oct 30, 2017

Member

@luan-cestari I know that @bloodyowl attempted to take a look to this issue but I am not sure what was his conclusion (since he was the initial author of the current db+api).
From my search I saw indeed that iterators should be the solution. So I think a new field will be necessary for our API surface.

Member

MoOx commented Oct 30, 2017

@luan-cestari I know that @bloodyowl attempted to take a look to this issue but I am not sure what was his conclusion (since he was the initial author of the current db+api).
From my search I saw indeed that iterators should be the solution. So I think a new field will be necessary for our API surface.

@luan-cestari

This comment has been minimized.

Show comment
Hide comment
@luan-cestari

luan-cestari Oct 30, 2017

Is he working on this issue?

luan-cestari commented Oct 30, 2017

Is he working on this issue?

@MoOx

This comment has been minimized.

Show comment
Hide comment
@MoOx

MoOx Oct 30, 2017

Member

@bloodyowl will have a look and will get back to us asap.

Member

MoOx commented Oct 30, 2017

@bloodyowl will have a look and will get back to us asap.

@bloodyowl

This comment has been minimized.

Show comment
Hide comment
@bloodyowl

bloodyowl Oct 31, 2017

Contributor

I'm currently working on removing levelDB and using a plain JS-in-memory structure in order to free us from these limitations.
there should be some progress made by the end of the week, I'll let you both know.

Contributor

bloodyowl commented Oct 31, 2017

I'm currently working on removing levelDB and using a plain JS-in-memory structure in order to free us from these limitations.
there should be some progress made by the end of the week, I'll let you both know.

@MoOx MoOx referenced this issue Nov 28, 2017

Merged

Removed LevelDB #1193

@MoOx

This comment has been minimized.

Show comment
Hide comment
@MoOx

MoOx Dec 2, 2017

Member

Doable very easily since bfe1aa8 (this commit add sorting in JS, default to date).

We will need to offer a public API for this.

Member

MoOx commented Dec 2, 2017

Doable very easily since bfe1aa8 (this commit add sorting in JS, default to date).

We will need to offer a public API for this.

@MoOx MoOx removed the Hacktoberfest label Dec 2, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment