Return right format for databaseGetTableStructureResponseToDictionary method.
Reviewed By: lblasa Differential Revision: D48315431 fbshipit-source-id: fc4ca1bc20e691162dfbe61a90a5ab9bf8df2466
This commit is contained in:
committed by
Facebook GitHub Bot
parent
7ba548d6e7
commit
d9b34e7880
@@ -66,11 +66,29 @@ static NSString* const UNKNOWN_BLOB_LABEL_FORMAT = @"{%d-byte %@ blob}";
|
|||||||
|
|
||||||
+ (NSDictionary*)databaseGetTableStructureResponseToDictionary:
|
+ (NSDictionary*)databaseGetTableStructureResponseToDictionary:
|
||||||
(DatabaseGetTableStructureResponse*)response {
|
(DatabaseGetTableStructureResponse*)response {
|
||||||
|
NSMutableArray* structureValues = [NSMutableArray array];
|
||||||
|
for (NSArray* row in response.structureValues) {
|
||||||
|
NSMutableArray* rowValues = [NSMutableArray array];
|
||||||
|
for (id item in row) {
|
||||||
|
[rowValues addObject:[self objectAndTypeToFlipperObject:item]];
|
||||||
|
}
|
||||||
|
[structureValues addObject:rowValues];
|
||||||
|
}
|
||||||
|
|
||||||
|
NSMutableArray* indexesValues = [NSMutableArray array];
|
||||||
|
for (NSArray* row in response.indexesValues) {
|
||||||
|
NSMutableArray* rowValues = [NSMutableArray array];
|
||||||
|
for (id item in row) {
|
||||||
|
[rowValues addObject:[self objectAndTypeToFlipperObject:item]];
|
||||||
|
}
|
||||||
|
[indexesValues addObject:rowValues];
|
||||||
|
}
|
||||||
|
|
||||||
return @{
|
return @{
|
||||||
@"structureColumns" : response.structureColumns,
|
@"structureColumns" : response.structureColumns,
|
||||||
@"structureValues" : response.structureValues,
|
@"structureValues" : structureValues,
|
||||||
@"indexesColumns" : response.indexesColumns,
|
@"indexesColumns" : response.indexesColumns,
|
||||||
@"indexesValues" : response.indexesValues
|
@"indexesValues" : indexesValues
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user