mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01: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', | ||||
| })); | ||||
| 
 | ||||
| export const StyledName = styled('h1')(({ theme }) => ({ | ||||
| export const StyledName = styled('span')(({ theme }) => ({ | ||||
|     fontSize: theme.typography.h1.fontSize, | ||||
|     overflow: 'hidden', | ||||
|     textOverflow: 'ellipsis', | ||||
|     whiteSpace: 'nowrap', | ||||
| })); | ||||
|  | ||||
| @ -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 }); | ||||
|         } | ||||
|  | ||||
| @ -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); | ||||
|         } | ||||
|  | ||||
| @ -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, | ||||
|  | ||||
| @ -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); | ||||
|         } | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user