diff options
author | bamse16 <marius@marius.me.uk> | 2009-04-11 09:14:42 +0000 |
---|---|---|
committer | bamse16 <marius@marius.me.uk> | 2009-04-11 09:14:42 +0000 |
commit | 1824ae6360c9ce1897e75404163d39df08ee5fbf (patch) | |
tree | 0eca1f6f4cb42e08f25e44a4683aecfb5881aac2 /Source/TableContent.m | |
parent | 41f8cde09ff77996339cabc71517496976beee2e (diff) | |
download | sequelpro-1824ae6360c9ce1897e75404163d39df08ee5fbf.tar.gz sequelpro-1824ae6360c9ce1897e75404163d39df08ee5fbf.tar.bz2 sequelpro-1824ae6360c9ce1897e75404163d39df08ee5fbf.zip |
Added printing support via WebKit WebView
Diffstat (limited to 'Source/TableContent.m')
-rw-r--r-- | Source/TableContent.m | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Source/TableContent.m b/Source/TableContent.m index dfe9b24c..2a359d07 100644 --- a/Source/TableContent.m +++ b/Source/TableContent.m @@ -50,6 +50,7 @@ sortField = nil; areShowingAllRows = false; currentlyEditingRow = -1; + usedQuery = [[NSString stringWithString:@""] retain]; return self; } @@ -297,6 +298,8 @@ [limitRowsField intValue]-1, [prefs integerForKey:@"LimitResultsValue"]]]; } + [self setUsedQuery:query]; + queryResult = [mySQLConnection queryString:query]; if ( queryResult == nil ) { NSLog(@"Loading table data for %@ failed, query string was: %@", aTable, query); @@ -393,6 +396,9 @@ [limitRowsField intValue]-1, [prefs integerForKey:@"LimitResultsValue"]]]; [limitRowsField selectText:self]; } + + [self setUsedQuery:queryString]; + queryResult = [mySQLConnection queryString:queryString]; // [fullResult setArray:[[self fetchResultAsArray:queryResult] retain]]; [fullResult setArray:[self fetchResultAsArray:queryResult]]; @@ -605,6 +611,8 @@ [limitRowsField intValue]-1, [prefs integerForKey:@"LimitResultsValue"]]; } + [self setUsedQuery:queryString]; + theResult = [mySQLConnection queryString:queryString]; [filteredResult setArray:[self fetchResultAsArray:theResult]]; @@ -654,6 +662,18 @@ [argumentField setEnabled:(![[[compareField selectedItem] title] hasSuffix:@"NULL"])]; } +- (NSString *)usedQuery +{ + return usedQuery; +} + +- (void)setUsedQuery:(NSString *)query +{ + if(usedQuery) + [usedQuery release]; + usedQuery = [[NSString stringWithString:query] retain]; +} + #pragma mark Edit methods @@ -1659,6 +1679,7 @@ [limitRowsField intValue]-1, [prefs integerForKey:@"LimitResultsValue"]]]; } + [self setUsedQuery:queryString]; queryResult = [mySQLConnection queryString:queryString]; // [fullResult setArray:[[self fetchResultAsArray:queryResult] retain]]; [fullResult setArray:[self fetchResultAsArray:queryResult]]; @@ -2189,6 +2210,7 @@ objectValueForTableColumn:(NSTableColumn *)aTableColumn [compareType release]; if (sortField) [sortField release]; [prefs release]; + [usedQuery release]; [super dealloc]; } |