Skip to content

Select and order columns should be instantly resolved #8

@nilmerg

Description

@nilmerg

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions