Skip to content

EloquentQueryProvider #5

Open
Open

Description

@Chumper

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?

Activity

  1. self-assigned this
    on Oct 30, 2015
  2. timgws commented on Mar 2, 2016

    @timgws
    Member

    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.

  3. timgws commented on Feb 6, 2017

    @timgws
    Member

    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.

  4. Chumper commented on Feb 6, 2017

    @Chumper
    ContributorAuthor

    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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions