mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
fix: make search selects explicit (#7445)
Now we are not returning * columns, but all tables that we join later, will need to select columns one by one.
This commit is contained in:
parent
388fe2dbd3
commit
ed7f917df6
@ -299,7 +299,13 @@ class FeatureSearchStore implements IFeatureSearchStore {
|
|||||||
'client_metrics_env.environment',
|
'client_metrics_env.environment',
|
||||||
]);
|
]);
|
||||||
})
|
})
|
||||||
.select('*')
|
.select([
|
||||||
|
'ranked_features.*',
|
||||||
|
'total_features.total',
|
||||||
|
'final_ranks.final_rank',
|
||||||
|
'metrics.yes',
|
||||||
|
'metrics.no',
|
||||||
|
])
|
||||||
.from('ranked_features')
|
.from('ranked_features')
|
||||||
.innerJoin(
|
.innerJoin(
|
||||||
'final_ranks',
|
'final_ranks',
|
||||||
@ -310,11 +316,17 @@ class FeatureSearchStore implements IFeatureSearchStore {
|
|||||||
.whereBetween('final_rank', [offset + 1, offset + limit])
|
.whereBetween('final_rank', [offset + 1, offset + limit])
|
||||||
.orderBy('final_rank');
|
.orderBy('final_rank');
|
||||||
if (featureLifecycleEnabled) {
|
if (featureLifecycleEnabled) {
|
||||||
finalQuery.leftJoin(
|
finalQuery
|
||||||
'lifecycle',
|
.select(
|
||||||
'ranked_features.feature_name',
|
'lifecycle.latest_stage',
|
||||||
'lifecycle.stage_feature',
|
'lifecycle.stage_status',
|
||||||
);
|
'lifecycle.entered_stage_at',
|
||||||
|
)
|
||||||
|
.leftJoin(
|
||||||
|
'lifecycle',
|
||||||
|
'ranked_features.feature_name',
|
||||||
|
'lifecycle.stage_feature',
|
||||||
|
);
|
||||||
}
|
}
|
||||||
this.queryExtraData(finalQuery);
|
this.queryExtraData(finalQuery);
|
||||||
const rows = await finalQuery;
|
const rows = await finalQuery;
|
||||||
|
Loading…
Reference in New Issue
Block a user