aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableDump.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2009-05-19 19:47:40 +0000
committerBibiko <bibiko@eva.mpg.de>2009-05-19 19:47:40 +0000
commit2ff722a0de334e4fc4df1dc6219734e85326637c (patch)
treede8047732671a8ca72ccc8689c89a46551a750a1 /Source/TableDump.m
parent6350ce999b2921b0501e9afc5158ded8dffcd7fd (diff)
downloadsequelpro-2ff722a0de334e4fc4df1dc6219734e85326637c.tar.gz
sequelpro-2ff722a0de334e4fc4df1dc6219734e85326637c.tar.bz2
sequelpro-2ff722a0de334e4fc4df1dc6219734e85326637c.zip
• some minor code cosmetics
Diffstat (limited to 'Source/TableDump.m')
-rw-r--r--Source/TableDump.m13
1 files changed, 8 insertions, 5 deletions
diff --git a/Source/TableDump.m b/Source/TableDump.m
index 42d340e3..2d9b60ca 100644
--- a/Source/TableDump.m
+++ b/Source/TableDump.m
@@ -458,18 +458,21 @@
[singleProgressBar stopAnimation:self];
[singleProgressBar setUsesThreadedAnimation:NO];
[singleProgressBar setIndeterminate:NO];
-
+
+ NSCharacterSet *whitespaceAndNewline = [NSCharacterSet whitespaceAndNewlineCharacterSet];
+ unsigned long queryCount = [queries count];
+
//perform all mysql-queries
- for ( i = 0 ; i < [queries count] ; i++ ) {
- [singleProgressBar setDoubleValue:((i+1)*100/[queries count])];
+ for ( i = 0 ; i < queryCount ; i++ ) {
+ [singleProgressBar setDoubleValue:((i+1)*100/queryCount)];
[singleProgressBar displayIfNeeded];
// Skip blank or whitespace-only queries to avoid errors
- if ([[[queries objectAtIndex:i] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] length] == 0)
+ if ([[[queries objectAtIndex:i] stringByTrimmingCharactersInSet:whitespaceAndNewline] length] == 0)
continue;
if (importSQLAsUTF8) {
- [mySQLConnection queryString:[queries objectAtIndex:i] usingEncoding:NSUTF8StringEncoding];
+ [mySQLConnection queryString:[queries objectAtIndex:i] usingEncoding:NSUTF8StringEncoding];
} else {
[mySQLConnection queryString:[queries objectAtIndex:i]];
}