mirror of
https://github.com/Unleash/unleash.git
synced 2025-05-03 01:18:43 +02:00
export queries use order by feature name (#3051)
This commit is contained in:
parent
f43adb60f7
commit
09ab4e42db
@ -17,9 +17,8 @@ export const StyledColumn = styled('div')(() => ({
|
|||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
}));
|
}));
|
||||||
|
|
||||||
export const StyledName = styled('h1')(({ theme }) => ({
|
export const StyledName = styled('span')(({ theme }) => ({
|
||||||
fontSize: theme.typography.h1.fontSize,
|
fontSize: theme.typography.h1.fontSize,
|
||||||
overflow: 'hidden',
|
|
||||||
textOverflow: 'ellipsis',
|
textOverflow: 'ellipsis',
|
||||||
whiteSpace: 'nowrap',
|
whiteSpace: 'nowrap',
|
||||||
}));
|
}));
|
||||||
|
@ -112,7 +112,9 @@ export class FeatureEnvironmentStore implements IFeatureEnvironmentStore {
|
|||||||
features: string[],
|
features: string[],
|
||||||
environment?: string,
|
environment?: string,
|
||||||
): Promise<IFeatureEnvironment[]> {
|
): Promise<IFeatureEnvironment[]> {
|
||||||
let rows = this.db(T.featureEnvs).whereIn('feature_name', features);
|
let rows = this.db(T.featureEnvs)
|
||||||
|
.whereIn('feature_name', features)
|
||||||
|
.orderBy('feature_name', 'asc');
|
||||||
if (environment) {
|
if (environment) {
|
||||||
rows = rows.where({ environment });
|
rows = rows.where({ environment });
|
||||||
}
|
}
|
||||||
|
@ -209,7 +209,8 @@ class FeatureStrategiesStore implements IFeatureStrategiesStore {
|
|||||||
const query = this.db
|
const query = this.db
|
||||||
.select(COLUMNS)
|
.select(COLUMNS)
|
||||||
.from<IFeatureStrategiesTable>(T.featureStrategies)
|
.from<IFeatureStrategiesTable>(T.featureStrategies)
|
||||||
.whereIn('feature_name', features);
|
.whereIn('feature_name', features)
|
||||||
|
.orderBy('feature_name', 'asc');
|
||||||
if (environment) {
|
if (environment) {
|
||||||
query.where('environment', environment);
|
query.where('environment', environment);
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,8 @@ class FeatureTagStore implements IFeatureTagStore {
|
|||||||
const query = this.db
|
const query = this.db
|
||||||
.select(COLUMNS)
|
.select(COLUMNS)
|
||||||
.from<FeatureTagTable>(TABLE)
|
.from<FeatureTagTable>(TABLE)
|
||||||
.whereIn('feature_name', features);
|
.whereIn('feature_name', features)
|
||||||
|
.orderBy('feature_name', 'asc');
|
||||||
const rows = await query;
|
const rows = await query;
|
||||||
return rows.map((row) => ({
|
return rows.map((row) => ({
|
||||||
featureName: row.feature_name,
|
featureName: row.feature_name,
|
||||||
|
@ -104,7 +104,7 @@ export default class FeatureToggleStore implements IFeatureToggleStore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getAllByNames(names: string[]): Promise<FeatureToggle[]> {
|
async getAllByNames(names: string[]): Promise<FeatureToggle[]> {
|
||||||
const query = this.db<FeaturesTable>(TABLE);
|
const query = this.db<FeaturesTable>(TABLE).orderBy('name', 'asc');
|
||||||
if (names.length > 0) {
|
if (names.length > 0) {
|
||||||
query.whereIn('name', names);
|
query.whereIn('name', names);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user