aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPCustomQuery.m
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2014-12-13 03:12:41 +0100
committerMax <post@wickenrode.com>2014-12-13 03:44:31 +0100
commit3cf0254e55d558565775e6cb20d36ea7e54beca1 (patch)
tree38842cf51bdfd2b28c74dba86646bc6523c767fc /Source/SPCustomQuery.m
parent4ad26db45b46d8267fcb5203571b81bc8949b853 (diff)
downloadsequelpro-3cf0254e55d558565775e6cb20d36ea7e54beca1.tar.gz
sequelpro-3cf0254e55d558565775e6cb20d36ea7e54beca1.tar.bz2
sequelpro-3cf0254e55d558565775e6cb20d36ea7e54beca1.zip
Replace boxed integers in code with @ literals
Diffstat (limited to 'Source/SPCustomQuery.m')
-rw-r--r--Source/SPCustomQuery.m14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m
index acfe7eac..ba053dbf 100644
--- a/Source/SPCustomQuery.m
+++ b/Source/SPCustomQuery.m
@@ -1808,7 +1808,7 @@
NSDictionary *columnDefinition = [NSDictionary dictionaryWithDictionary:[cqColumnDefinition objectAtIndex:[[[[customQueryView tableColumns] objectAtIndex:columnIndex] identifier] integerValue]]];
if(!columnDefinition)
- return [NSArray arrayWithObjects:[NSNumber numberWithInteger:-2], @"", nil];
+ return [NSArray arrayWithObjects:@(-2), @"", nil];
// Resolve the original table name for current column if AS was used
NSString *tableForColumn = [columnDefinition objectForKey:@"org_table"];
@@ -1819,13 +1819,13 @@
// No table/database name found indicates that the field's column contains data from more than one table as for UNION
// or the field data are not bound to any table as in SELECT 1 or if column database is unset
if(!tableForColumn || ![tableForColumn length] || !dbForColumn || ![dbForColumn length])
- return [NSArray arrayWithObjects:[NSNumber numberWithInteger:-1], @"", nil];
+ return [NSArray arrayWithObjects:@(-1), @"", nil];
// if table and database name are given check if field can be identified unambiguously
// first without blob data
NSString *fieldIDQueryStr = [self argumentForRow:rowIndex ofTable:tableForColumn andDatabase:[columnDefinition objectForKey:@"db"] includeBlobs:NO];
if(!fieldIDQueryStr)
- return [NSArray arrayWithObjects:[NSNumber numberWithInteger:-1], @"", nil];
+ return [NSArray arrayWithObjects:@(-1), @"", nil];
[tableDocumentInstance startTaskWithDescription:NSLocalizedString(@"Checking field data for editing...", @"checking field data for editing task description")];
@@ -1837,7 +1837,7 @@
if ([mySQLConnection queryErrored]) {
[tableDocumentInstance endTask];
- return [NSArray arrayWithObjects:[NSNumber numberWithInteger:-1], @"", nil];
+ return [NSArray arrayWithObjects:@(-1), @"", nil];
}
NSArray *tempRow = [tempResult getRowAsArray];
@@ -1847,7 +1847,7 @@
fieldIDQueryStr = [self argumentForRow:rowIndex ofTable:tableForColumn andDatabase:[columnDefinition objectForKey:@"db"] includeBlobs:YES];
if(!fieldIDQueryStr) {
[tableDocumentInstance endTask];
- return [NSArray arrayWithObjects:[NSNumber numberWithInteger:-1], @"", nil];
+ return [NSArray arrayWithObjects:@(-1), @"", nil];
}
tempResult = [mySQLConnection queryString:[NSString stringWithFormat:@"SELECT COUNT(1) FROM %@.%@ %@",
@@ -1857,14 +1857,14 @@
if ([mySQLConnection queryErrored]) {
[tableDocumentInstance endTask];
- return [NSArray arrayWithObjects:[NSNumber numberWithInteger:-1], @"", nil];
+ return [NSArray arrayWithObjects:@(-1), @"", nil];
}
tempRow = [tempResult getRowAsArray];
if([tempRow count] && [[tempRow objectAtIndex:0] integerValue] < 1) {
[tableDocumentInstance endTask];
- return [NSArray arrayWithObjects:[NSNumber numberWithInteger:-1], @"", nil];
+ return [NSArray arrayWithObjects:@(-1), @"", nil];
}
}