Skip to content

Commit

Permalink
Merge SPDatabaseDocument (part of #2789)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmoagx committed Jan 20, 2018
1 parent e86375a commit b7830d6
Show file tree
Hide file tree
Showing 28 changed files with 1,235 additions and 1,513 deletions.
1 change: 0 additions & 1 deletion Source/SPAppController.m
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
#import "SPCopyTable.h"
#import "SPSyntaxParser.h"
#import "SPOSInfo.h"
#import "SPPrintController.h"

#import <PSMTabBar/PSMTabBarControl.h>
#import <Sparkle/Sparkle.h>
Expand Down
1 change: 0 additions & 1 deletion Source/SPConnectionController.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
#import "SPFavoritesController.h"
#import "SPFavoriteNode.h"
#import "SPGeneralPreferencePane.h"
#import "SPDatabaseViewController.h"
#import "SPTreeNode.h"
#import "SPFavoritesExporter.h"
#import "SPFavoritesImporter.h"
Expand Down
2 changes: 1 addition & 1 deletion Source/SPConnectionControllerInitializer.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#import "SPTreeNode.h"
#import "SPFavoriteNode.h"
#import "SPGroupNode.h"
#import "SPDatabaseViewController.h"
#import "SPDatabaseDocument.h"
#import "SPSplitView.h"
#import "SPFavoriteColorSupport.h"
#import "SPColorSelectorView.h"
Expand Down
42 changes: 0 additions & 42 deletions Source/SPConnectionDelegate.h

This file was deleted.

209 changes: 0 additions & 209 deletions Source/SPConnectionDelegate.m

This file was deleted.

2 changes: 1 addition & 1 deletion Source/SPCustomQuery.m
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
#import <pthread.h>
#import <SPMySQL/SPMySQL.h>

@interface SPCustomQuery (PrivateAPI)
@interface SPCustomQuery ()

- (id)_resultDataItemAtRow:(NSInteger)row columnIndex:(NSUInteger)column preserveNULLs:(BOOL)preserveNULLs asPreview:(BOOL)asPreview;
+ (NSString *)linkToHelpTopic:(NSString *)aTopic;
Expand Down
1 change: 0 additions & 1 deletion Source/SPDataImport.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

#import "SPDataImport.h"
#import "SPDatabaseDocument.h"
#import "SPDatabaseViewController.h"
#import "SPTablesList.h"
#import "SPTableStructure.h"
#import "SPDatabaseStructure.h"
Expand Down
43 changes: 42 additions & 1 deletion Source/SPDatabaseDocument.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@
int64_t instanceId;
}

@property (assign) NSTableView *dbTablesTableView;
@property (nonatomic, assign) NSTableView *dbTablesTableView;

#ifdef SP_CODA /* ivars */
@property (assign) SPDatabaseData* databaseDataInstance;
Expand Down Expand Up @@ -537,4 +537,45 @@

#endif

#pragma mark - SPDatabaseViewController

// Accessors
- (NSString *)table;
- (SPTableType)tableType;

- (BOOL)structureLoaded;
- (BOOL)contentLoaded;
- (BOOL)statusLoaded;

#ifndef SP_CODA /* method decls */
// Tab view control
- (IBAction)viewStructure:(id)sender;
- (IBAction)viewContent:(id)sender;
- (IBAction)viewQuery:(id)sender;
- (IBAction)viewStatus:(id)sender;
- (IBAction)viewRelations:(id)sender;
- (IBAction)viewTriggers:(id)sender;
#endif

- (void)setStructureRequiresReload:(BOOL)reload;
- (void)setContentRequiresReload:(BOOL)reload;
- (void)setStatusRequiresReload:(BOOL)reload;
- (void)setRelationsRequiresReload:(BOOL)reload;

// Table control
- (void)loadTable:(NSString *)aTable ofType:(SPTableType)aTableType;

#ifndef SP_CODA /* method decls */
- (NSView *)databaseView;
#endif

#pragma mark - SPPrintController

- (void)startPrintDocumentOperation;
- (void)generateHTMLForPrinting;
- (void)generateTableInfoHTMLForPrinting;

- (NSArray *)columnNames;
- (NSMutableDictionary *)connectionInformation;

@end
Loading

0 comments on commit b7830d6

Please sign in to comment.