aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPDatabaseData.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPDatabaseData.m')
-rw-r--r--Source/SPDatabaseData.m14
1 files changed, 11 insertions, 3 deletions
diff --git a/Source/SPDatabaseData.m b/Source/SPDatabaseData.m
index 2317902e..cc782b5e 100644
--- a/Source/SPDatabaseData.m
+++ b/Source/SPDatabaseData.m
@@ -26,13 +26,13 @@
#import "SPDatabaseData.h"
#import "SPServerSupport.h"
#import "SPDatabaseCharacterSets.h"
-#import "SPMySQL.h"
+#import <SPMySQL/SPMySQL.h>
@interface SPDatabaseData (PrivateAPI)
- (NSArray *)_getDatabaseDataForQuery:(NSString *)query;
-
NSInteger _sortMySQL4CharsetEntry(NSDictionary *itemOne, NSDictionary *itemTwo, void *context);
+NSInteger _sortStorageEngineEntry(NSDictionary *itemOne, NSDictionary *itemTwo, void *context);
@end
@@ -228,7 +228,7 @@ NSInteger _sortMySQL4CharsetEntry(NSDictionary *itemOne, NSDictionary *itemTwo,
}
}
- return storageEngines;
+ return [storageEngines sortedArrayUsingFunction:_sortStorageEngineEntry context:nil];
}
/**
@@ -327,4 +327,12 @@ NSInteger _sortMySQL4CharsetEntry(NSDictionary *itemOne, NSDictionary *itemTwo,
return [[itemOne objectForKey:@"Charset"] compare:[itemTwo objectForKey:@"Charset"]];
}
+/**
+ * Sorts a storage engine array by the Engine key.
+ */
+NSInteger _sortStorageEngineEntry(NSDictionary *itemOne, NSDictionary *itemTwo, void *context)
+{
+ return [[itemOne objectForKey:@"Engine"] compare:[itemTwo objectForKey:@"Engine"]];
+}
+
@end