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

EloquentQueryProvider #5

Open
Chumper opened this issue Oct 30, 2015 · 3 comments
Open

EloquentQueryProvider #5

Chumper opened this issue Oct 30, 2015 · 3 comments
Assignees
Labels

Comments

@Chumper
Copy link
Contributor

Chumper commented Oct 30, 2015

We should have a replacement ready for the old QueryEngine, so a user can pass a query builder or similar to the datatable.

What i found was really 'annoying' was the small little details i had to put into the old QueryEngine to make the search work across different databases.

So i would like to include search functionality behaviour as method on this provider so the user can implement it as needed.

I also see a problem if the user pre selected any data and then passes it to the EloquentQueryProvider.
E.g. if a user passes all users sorted by name to the datatable but skips the first 10 we have a problem, because the initial dataset can change.

So when a user orders by id (and the user skips the first 10 and passes it to the provider) then there is a changed dataset where different 10 users are missing.

Also should we override the skip and take parameter of the user?

@timgws
Copy link
Member

timgws commented Mar 2, 2016

We should consider allowing a maximum value for skip and limit.

For example, I don't want users to be able to export all of my data by just having them provide me with a $largeNumber for the take parameter.

But I don't think this needs to be handled in the QueryProvider, I think this should be done somewhere else, that way the providers don't need to worry about handling minimum and maximum parameters, it happens somewhere in a level above.

@timgws
Copy link
Member

timgws commented Feb 6, 2017

Are you specifically talking about Chumper/Datatable#267?

I also see a problem if the user pre selected any data and then passes it to the EloquentQueryProvider.

E.g. if a user passes all users sorted by name to the datatable but skips the first 10 we have a problem, because the initial dataset can change.

I don't see that as a bug - I see that as a feature :) By definition, if you are doing filtering & ordering, the datatable should represent what is in the database. If that means unexpectedly showing and hiding different rows from users, then so be it :)

I am sure if it's a problem that we will hear about it.

@Chumper
Copy link
Contributor Author

Chumper commented Feb 6, 2017

I was not talking about any issue specifically, that was just my impression when working on the old 'QueryEngine`.

Sounds good, I think with the current eloquent there should be quite some possibilities.

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

No branches or pull requests

2 participants