Skip to content

Commit

Permalink
Remove joins (#1898)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaanus committed Aug 10, 2022
1 parent c7174e0 commit 84a9320
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/lib/db/feature-strategy-store.ts
Expand Up @@ -225,12 +225,12 @@ class FeatureStrategiesStore implements IFeatureStrategiesStore {
'feature_strategies.constraints as constraints',
'feature_strategies.sort_order as sort_order',
)
.fullOuterJoin(
.leftJoin(
'feature_environments',
'feature_environments.feature_name',
'features.name',
)
.fullOuterJoin('feature_strategies', function () {
.leftJoin('feature_strategies', function () {
this.on(
'feature_strategies.feature_name',
'=',
Expand All @@ -241,7 +241,7 @@ class FeatureStrategiesStore implements IFeatureStrategiesStore {
'feature_environments.environment',
);
})
.fullOuterJoin(
.leftJoin(
'environments',
'feature_environments.environment',
'environments.name',
Expand Down
4 changes: 2 additions & 2 deletions src/lib/db/feature-toggle-client-store.ts
Expand Up @@ -85,15 +85,15 @@ export default class FeatureToggleClientStore
let query = this.db('features')
.select(selectColumns)
.modify(FeatureToggleStore.filterByArchived, archived)
.fullOuterJoin(
.leftJoin(
this.db('feature_strategies')
.select('*')
.where({ environment })
.as('fs'),
'fs.feature_name',
'features.name',
)
.fullOuterJoin(
.leftJoin(
this.db('feature_environments')
.select('feature_name', 'enabled', 'environment')
.where({ environment })
Expand Down

0 comments on commit 84a9320

Please sign in to comment.