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

Select and order columns should be instantly resolved #8

Open
nilmerg opened this issue Oct 27, 2020 · 1 comment
Open

Select and order columns should be instantly resolved #8

nilmerg opened this issue Oct 27, 2020 · 1 comment

Comments

@nilmerg
Copy link
Member

nilmerg commented Oct 27, 2020

Currently a call to Query::with() is mandatory (see 7dc53f1) in order to be able to differentiate a column from being solely used in a filter or from being selected.

Consider the following:

$query = Service::on($this->getDb());

$query->with('service.vars');
$query->columns('service.vars.flatvalue');
$query->where('service.vars.flatname', 'app');

The call to with() here shouldn't be necessary, the call to columns should do so instantly. Instantly because with() does the same and it is required for any filter optimizations to work correctly.

At the moment relations of selected columns are only resolved in Query::assembleSelect(). This is too late and can't be assumed as an requirement for e.g. filter optimizations.

@nilmerg
Copy link
Member Author

nilmerg commented Mar 12, 2021

While thinking about this, it is (maybe) related to the ability to postpone filter column qualification. If so, it's possibly obsolete because when filter column qualification can be postponed this might not be an issue anymore.

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

1 participant