diff options
author | rowanbeentje <rowan@beent.je> | 2012-02-23 02:13:56 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2012-02-23 02:13:56 +0000 |
commit | 05f1612cbb7e33cf9135a346fc2505cc0e87e853 (patch) | |
tree | 785824be4e44a61389271343d958851fa4ff7dd0 /Source/SPExportController.m | |
parent | a889340b9cb1eca0d3ff022e8e6e2c718480bf44 (diff) | |
download | sequelpro-05f1612cbb7e33cf9135a346fc2505cc0e87e853.tar.gz sequelpro-05f1612cbb7e33cf9135a346fc2505cc0e87e853.tar.bz2 sequelpro-05f1612cbb7e33cf9135a346fc2505cc0e87e853.zip |
Warning: this branch commit is largely untested, and known to throw exceptions as database structure retrieval is currently missing!
Further work on SPMySQLFramework integration:
- Improve SPMySQL framework build settings including correct ppc builds and a Distribution configuration for the build distributions to match
- Add new convenience querying and result methods to the framework
- Amend Sequel Pro source to use the new SPMySQL.framework methods everywhere, replacing MCPKit methods where they differ and improving some functions
- Remove MCPKit from the source
- Fix a number of warnings on Release-style builds
Diffstat (limited to 'Source/SPExportController.m')
-rw-r--r-- | Source/SPExportController.m | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/Source/SPExportController.m b/Source/SPExportController.m index 5b61d178..95076ef2 100644 --- a/Source/SPExportController.m +++ b/Source/SPExportController.m @@ -23,8 +23,6 @@ // // More info at <http://code.google.com/p/sequel-pro/> -#import <MCPKit/MCPKit.h> - #import "SPExportController.h" #import "SPExportInitializer.h" #import "SPTablesList.h" @@ -36,6 +34,7 @@ #import "SPExportFilenameUtilities.h" #import "SPExportFileNameTokenObject.h" #import "SPDatabaseDocument.h" +#import "SPMySQL.h" // Constants static const NSUInteger SPExportUIPadding = 20; @@ -574,7 +573,7 @@ static const NSString *SPSQLExportDropEnabled = @"SQLExportDropEnabled"; /** * Toggles the export button when choosing to include or table structures in an SQL export. */ -- (IBAction)toggleSQLIncludeStructure:(id)sender +- (IBAction)toggleSQLIncludeStructure:(NSButton *)sender { if (![sender state]) { @@ -593,7 +592,7 @@ static const NSString *SPSQLExportDropEnabled = @"SQLExportDropEnabled"; /** * Toggles the export button when choosing to include or exclude table contents in an SQL export. */ -- (IBAction)toggleSQLIncludeContent:(id)sender +- (IBAction)toggleSQLIncludeContent:(NSButton *)sender { [[exportTableList tableColumnWithIdentifier:SPTableViewContentColumnID] setHidden:(![sender state])]; @@ -603,7 +602,7 @@ static const NSString *SPSQLExportDropEnabled = @"SQLExportDropEnabled"; /** * Toggles the export button when choosing to include or exclude table drop syntax in an SQL export. */ -- (IBAction)toggleSQLIncludeDropSyntax:(id)sender +- (IBAction)toggleSQLIncludeDropSyntax:(NSButton *)sender { [[exportTableList tableColumnWithIdentifier:SPTableViewDropColumnID] setHidden:(![sender state])]; @@ -613,7 +612,7 @@ static const NSString *SPSQLExportDropEnabled = @"SQLExportDropEnabled"; /** * Toggles whether XML and CSV files should be combined into a single file. */ -- (IBAction)toggleNewFilePerTable:(id)sender +- (IBAction)toggleNewFilePerTable:(NSButton *)sender { [self _updateExportFormatInformation]; } @@ -795,12 +794,12 @@ static const NSString *SPSQLExportDropEnabled = @"SQLExportDropEnabled"; // to set the export's link case sensitivity setting if (isDot && serverLowerCaseTableNameValue == NSNotFound) { - MCPResult *caseResult = [connection queryString:@"SHOW VARIABLES LIKE 'lower_case_table_names'"]; + SPMySQLResult *caseResult = [connection queryString:@"SHOW VARIABLES LIKE 'lower_case_table_names'"]; [caseResult setReturnDataAsStrings:YES]; - if ([caseResult numOfRows] == 1) { - serverLowerCaseTableNameValue = [[[caseResult fetchRowAsDictionary] objectForKey:@"Value"] integerValue]; + if ([caseResult numberOfRows] == 1) { + serverLowerCaseTableNameValue = [[[caseResult getRowAsDictionary] objectForKey:@"Value"] integerValue]; } else { serverLowerCaseTableNameValue = 0; |