aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/SPCopyTable.m5
-rw-r--r--Source/SPCustomQuery.m10
-rw-r--r--Source/SPDatabaseContentViewDelegate.h2
-rw-r--r--Source/SPDatabaseDocument.h9
-rw-r--r--Source/SPTableContent.h67
-rw-r--r--Source/SPTableContent.m5
-rw-r--r--Source/SPTableContentDelegate.m5
7 files changed, 53 insertions, 50 deletions
diff --git a/Source/SPCopyTable.m b/Source/SPCopyTable.m
index f6f98219..02ff29ec 100644
--- a/Source/SPCopyTable.m
+++ b/Source/SPCopyTable.m
@@ -1274,8 +1274,9 @@ static const NSInteger kBlobAsImageFile = 4;
[env setObject:[infoPath stringByDeletingLastPathComponent] forKey:SPBundleShellVariableBundlePath];
[env setObject:bundleInputFilePath forKey:SPBundleShellVariableInputFilePath];
- if ([[self delegate] respondsToSelector:@selector(usedQuery)] && [[self delegate] usedQuery])
- [env setObject:[[self delegate] usedQuery] forKey:SPBundleShellVariableUsedQueryForTable];
+ if ([[self delegate] respondsToSelector:@selector(usedQuery)] && [(id <SPDatabaseContentViewDelegate>)[self delegate] usedQuery]) {
+ [env setObject:[(id <SPDatabaseContentViewDelegate>)[self delegate] usedQuery] forKey:SPBundleShellVariableUsedQueryForTable];
+ }
[env setObject:bundleInputTableMetaDataFilePath forKey:SPBundleShellVariableInputTableMetaData];
[env setObject:SPBundleScopeDataTable forKey:SPBundleShellVariableBundleScope];
diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m
index 9f97e7b4..ba3eca62 100644
--- a/Source/SPCustomQuery.m
+++ b/Source/SPCustomQuery.m
@@ -1531,11 +1531,6 @@
[textView scrollRangeToVisible:NSMakeRange([query length], 0)];
}
-- (NSString *)usedQuery
-{
- return usedQuery;
-}
-
#pragma mark -
#pragma mark Retrieving and setting table state
@@ -3358,6 +3353,11 @@
#pragma mark -
#pragma mark Database content view delegate methods
+- (NSString *)usedQuery
+{
+ return usedQuery;
+}
+
/**
* Provide a getter for the custom query result table's current viewport
*/
diff --git a/Source/SPDatabaseContentViewDelegate.h b/Source/SPDatabaseContentViewDelegate.h
index f4d0785b..52dd7dd3 100644
--- a/Source/SPDatabaseContentViewDelegate.h
+++ b/Source/SPDatabaseContentViewDelegate.h
@@ -30,6 +30,8 @@
@protocol SPDatabaseContentViewDelegate <NSObject>
+- (NSString *)usedQuery;
+
- (NSArray *)dataColumnDefinitions;
@end
diff --git a/Source/SPDatabaseDocument.h b/Source/SPDatabaseDocument.h
index 1b7bc68a..d618ea3b 100644
--- a/Source/SPDatabaseDocument.h
+++ b/Source/SPDatabaseDocument.h
@@ -57,6 +57,7 @@
@class SPDatabaseStructure;
@class SPMySQLConnection;
+#import "SPDatabaseContentViewDelegate.h"
#import "SPConnectionControllerDelegateProtocol.h"
#import <SPMySQL/SPMySQLConnectionDelegate.h>
@@ -72,14 +73,14 @@
#endif
// IBOutlets
- IBOutlet SPTablesList* tablesListInstance;
- IBOutlet SPTableStructure* tableSourceInstance;
- IBOutlet SPTableContent* tableContentInstance;
+ IBOutlet SPTablesList *tablesListInstance;
+ IBOutlet SPTableStructure *tableSourceInstance;
+ IBOutlet SPTableContent <SPDatabaseContentViewDelegate> *tableContentInstance;
IBOutlet id tableRelationsInstance;
IBOutlet id tableTriggersInstance;
IBOutlet id customQueryInstance;
IBOutlet id tableDumpInstance;
- IBOutlet SPTableData* tableDataInstance;
+ IBOutlet SPTableData *tableDataInstance;
IBOutlet id extendedTableInfoInstance;
IBOutlet id databaseDataInstance;
#ifndef SP_CODA
diff --git a/Source/SPTableContent.h b/Source/SPTableContent.h
index 2bbdefde..cb81a706 100644
--- a/Source/SPTableContent.h
+++ b/Source/SPTableContent.h
@@ -206,32 +206,31 @@
- (NSRange)fieldEditorSelectedRange;
// Table loading methods and information
-- (void) loadTable:(NSString *)aTable;
+- (void)loadTable:(NSString *)aTable;
- (void)setTableDetails:(NSDictionary *)tableDetails;
-- (void) clearTableValues;
-- (void) loadTableValues;
-- (NSString *) tableFilterString;
-- (void) updateCountText;
-- (void) initTableLoadTimer;
-- (void) clearTableLoadTimer;
-- (void) tableLoadUpdate:(NSTimer *)theTimer;
+- (void)clearTableValues;
+- (void)loadTableValues;
+- (NSString *)tableFilterString;
+- (void)updateCountText;
+- (void)initTableLoadTimer;
+- (void)clearTableLoadTimer;
+- (void)tableLoadUpdate:(NSTimer *)theTimer;
// Table interface actions
-- (IBAction) reloadTable:(id)sender;
-- (void) reloadTableTask;
-- (IBAction) filterTable:(id)sender;
+- (IBAction)reloadTable:(id)sender;
+- (void)reloadTableTask;
+- (IBAction)filterTable:(id)sender;
- (void)filterTableTask;
-- (IBAction) toggleFilterField:(id)sender;
-- (NSString *) usedQuery;
-- (void) setUsedQuery:(NSString *)query;
+- (IBAction)toggleFilterField:(id)sender;
+- (void)setUsedQuery:(NSString *)query;
// Pagination
-- (IBAction) navigatePaginationFromButton:(id)sender;
+- (IBAction)navigatePaginationFromButton:(id)sender;
#ifndef SP_CODA
- (IBAction)togglePagination:(NSButton *)sender;
#endif
-- (void) setPaginationViewVisibility:(BOOL)makeVisible;
-- (void) updatePaginationState;
+- (void)setPaginationViewVisibility:(BOOL)makeVisible;
+- (void)updatePaginationState;
// Edit methods
- (IBAction)addRow:(id)sender;
@@ -254,8 +253,8 @@
- (NSArray *)currentDataResultWithNULLs:(BOOL)includeNULLs hideBLOBs:(BOOL)hide;
// Task interaction
-- (void) startDocumentTaskForTab:(NSNotification *)aNotification;
-- (void) endDocumentTaskForTab:(NSNotification *)aNotification;
+- (void)startDocumentTaskForTab:(NSNotification *)aNotification;
+- (void)endDocumentTaskForTab:(NSNotification *)aNotification;
// Additional methods
- (void)setConnection:(SPMySQLConnection *)theConnection;
@@ -279,26 +278,26 @@
- (void)saveViewCellValue:(id)anObject forTableColumn:(NSTableColumn *)aTableColumn row:(NSUInteger)rowIndex;
// Retrieving and setting table state
-- (NSString *) sortColumnName;
-- (BOOL) sortColumnIsAscending;
-- (NSUInteger) pageNumber;
+- (NSString *)sortColumnName;
+- (BOOL)sortColumnIsAscending;
+- (NSUInteger)pageNumber;
- (NSDictionary *)selectionDetailsAllowingIndexSelection:(BOOL)allowIndexFallback;
-- (NSRect) viewport;
-- (CGFloat) tablesListWidth;
-- (NSDictionary *) filterSettings;
-- (void) setSortColumnNameToRestore:(NSString *)theSortColumnName isAscending:(BOOL)isAscending;
-- (void) setPageToRestore:(NSUInteger)thePage;
+- (NSRect)viewport;
+- (CGFloat)tablesListWidth;
+- (NSDictionary *)filterSettings;
+- (void)setSortColumnNameToRestore:(NSString *)theSortColumnName isAscending:(BOOL)isAscending;
+- (void)setPageToRestore:(NSUInteger)thePage;
- (void)setSelectionToRestore:(NSDictionary *)theSelection;
-- (void) setViewportToRestore:(NSRect)theViewport;
-- (void) setFiltersToRestore:(NSDictionary *)filterSettings;
-- (void) storeCurrentDetailsForRestoration;
-- (void) clearDetailsToRestore;
-- (void) setFilterTableData:(NSData*)arcData;
-- (NSData*) filterTableData;
+- (void)setViewportToRestore:(NSRect)theViewport;
+- (void)setFiltersToRestore:(NSDictionary *)filterSettings;
+- (void)storeCurrentDetailsForRestoration;
+- (void)clearDetailsToRestore;
+- (void)setFilterTableData:(NSData *)arcData;
+- (NSData *)filterTableData;
- (NSString *)escapeFilterArgument:(NSString *)argument againstClause:(NSString *)clause;
- (void)openContentFilterManager;
-- (NSArray*)fieldEditStatusForRow:(NSInteger)rowIndex andColumn:(NSInteger)columnIndex;
+- (NSArray *)fieldEditStatusForRow:(NSInteger)rowIndex andColumn:(NSInteger)columnIndex;
@end
diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m
index 15de8157..95ccec59 100644
--- a/Source/SPTableContent.m
+++ b/Source/SPTableContent.m
@@ -1644,11 +1644,6 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper
}
-- (NSString *)usedQuery
-{
- return usedQuery;
-}
-
- (void)setUsedQuery:(NSString *)query
{
if (usedQuery) [usedQuery release];
diff --git a/Source/SPTableContentDelegate.m b/Source/SPTableContentDelegate.m
index 9b11eb3d..018932cb 100644
--- a/Source/SPTableContentDelegate.m
+++ b/Source/SPTableContentDelegate.m
@@ -784,6 +784,11 @@
#pragma mark -
#pragma mark Database content view delegate methods
+- (NSString *)usedQuery
+{
+ return usedQuery;
+}
+
/**
* Retrieve the data column definitions
*/