1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

export queries use order by feature name (#3051)

This commit is contained in:
Mateusz Kwasniewski 2023-02-06 15:46:25 +01:00 committed by GitHub
parent f43adb60f7
commit 09ab4e42db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 6 deletions

View File

@ -17,9 +17,8 @@ export const StyledColumn = styled('div')(() => ({
flexDirection: 'column',
}));
export const StyledName = styled('h1')(({ theme }) => ({
export const StyledName = styled('span')(({ theme }) => ({
fontSize: theme.typography.h1.fontSize,
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
}));

View File

@ -112,7 +112,9 @@ export class FeatureEnvironmentStore implements IFeatureEnvironmentStore {
features: string[],
environment?: string,
): 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) {
rows = rows.where({ environment });
}

View File

@ -209,7 +209,8 @@ class FeatureStrategiesStore implements IFeatureStrategiesStore {
const query = this.db
.select(COLUMNS)
.from<IFeatureStrategiesTable>(T.featureStrategies)
.whereIn('feature_name', features);
.whereIn('feature_name', features)
.orderBy('feature_name', 'asc');
if (environment) {
query.where('environment', environment);
}

View File

@ -109,7 +109,8 @@ class FeatureTagStore implements IFeatureTagStore {
const query = this.db
.select(COLUMNS)
.from<FeatureTagTable>(TABLE)
.whereIn('feature_name', features);
.whereIn('feature_name', features)
.orderBy('feature_name', 'asc');
const rows = await query;
return rows.map((row) => ({
featureName: row.feature_name,

View File

@ -104,7 +104,7 @@ export default class FeatureToggleStore implements IFeatureToggleStore {
}
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) {
query.whereIn('name', names);
}