Skip to content

Commit b7830d6

Browse files
committed
Merge SPDatabaseDocument (part of #2789)
1 parent e86375a commit b7830d6

28 files changed

+1235
-1513
lines changed

Source/SPAppController.m

-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
#import "SPCopyTable.h"
5151
#import "SPSyntaxParser.h"
5252
#import "SPOSInfo.h"
53-
#import "SPPrintController.h"
5453

5554
#import <PSMTabBar/PSMTabBarControl.h>
5655
#import <Sparkle/Sparkle.h>

Source/SPConnectionController.m

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
#import "SPFavoritesController.h"
4646
#import "SPFavoriteNode.h"
4747
#import "SPGeneralPreferencePane.h"
48-
#import "SPDatabaseViewController.h"
4948
#import "SPTreeNode.h"
5049
#import "SPFavoritesExporter.h"
5150
#import "SPFavoritesImporter.h"

Source/SPConnectionControllerInitializer.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#import "SPTreeNode.h"
3636
#import "SPFavoriteNode.h"
3737
#import "SPGroupNode.h"
38-
#import "SPDatabaseViewController.h"
38+
#import "SPDatabaseDocument.h"
3939
#import "SPSplitView.h"
4040
#import "SPFavoriteColorSupport.h"
4141
#import "SPColorSelectorView.h"

Source/SPConnectionDelegate.h

-42
This file was deleted.

Source/SPConnectionDelegate.m

-209
This file was deleted.

Source/SPCustomQuery.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
#import <pthread.h>
6767
#import <SPMySQL/SPMySQL.h>
6868

69-
@interface SPCustomQuery (PrivateAPI)
69+
@interface SPCustomQuery ()
7070

7171
- (id)_resultDataItemAtRow:(NSInteger)row columnIndex:(NSUInteger)column preserveNULLs:(BOOL)preserveNULLs asPreview:(BOOL)asPreview;
7272
+ (NSString *)linkToHelpTopic:(NSString *)aTopic;

Source/SPDataImport.m

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131

3232
#import "SPDataImport.h"
3333
#import "SPDatabaseDocument.h"
34-
#import "SPDatabaseViewController.h"
3534
#import "SPTablesList.h"
3635
#import "SPTableStructure.h"
3736
#import "SPDatabaseStructure.h"

Source/SPDatabaseDocument.h

+42-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@
291291
int64_t instanceId;
292292
}
293293

294-
@property (assign) NSTableView *dbTablesTableView;
294+
@property (nonatomic, assign) NSTableView *dbTablesTableView;
295295

296296
#ifdef SP_CODA /* ivars */
297297
@property (assign) SPDatabaseData* databaseDataInstance;
@@ -537,4 +537,45 @@
537537

538538
#endif
539539

540+
#pragma mark - SPDatabaseViewController
541+
542+
// Accessors
543+
- (NSString *)table;
544+
- (SPTableType)tableType;
545+
546+
- (BOOL)structureLoaded;
547+
- (BOOL)contentLoaded;
548+
- (BOOL)statusLoaded;
549+
550+
#ifndef SP_CODA /* method decls */
551+
// Tab view control
552+
- (IBAction)viewStructure:(id)sender;
553+
- (IBAction)viewContent:(id)sender;
554+
- (IBAction)viewQuery:(id)sender;
555+
- (IBAction)viewStatus:(id)sender;
556+
- (IBAction)viewRelations:(id)sender;
557+
- (IBAction)viewTriggers:(id)sender;
558+
#endif
559+
560+
- (void)setStructureRequiresReload:(BOOL)reload;
561+
- (void)setContentRequiresReload:(BOOL)reload;
562+
- (void)setStatusRequiresReload:(BOOL)reload;
563+
- (void)setRelationsRequiresReload:(BOOL)reload;
564+
565+
// Table control
566+
- (void)loadTable:(NSString *)aTable ofType:(SPTableType)aTableType;
567+
568+
#ifndef SP_CODA /* method decls */
569+
- (NSView *)databaseView;
570+
#endif
571+
572+
#pragma mark - SPPrintController
573+
574+
- (void)startPrintDocumentOperation;
575+
- (void)generateHTMLForPrinting;
576+
- (void)generateTableInfoHTMLForPrinting;
577+
578+
- (NSArray *)columnNames;
579+
- (NSMutableDictionary *)connectionInformation;
580+
540581
@end

0 commit comments

Comments
 (0)