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
Expand Up @@ -50,7 +50,6 @@
#import "SPCopyTable.h" #import "SPCopyTable.h"
#import "SPSyntaxParser.h" #import "SPSyntaxParser.h"
#import "SPOSInfo.h" #import "SPOSInfo.h"
#import "SPPrintController.h"


#import <PSMTabBar/PSMTabBarControl.h> #import <PSMTabBar/PSMTabBarControl.h>
#import <Sparkle/Sparkle.h> #import <Sparkle/Sparkle.h>
Expand Down
1 change: 0 additions & 1 deletion Source/SPConnectionController.m
Expand Up @@ -45,7 +45,6 @@
#import "SPFavoritesController.h" #import "SPFavoritesController.h"
#import "SPFavoriteNode.h" #import "SPFavoriteNode.h"
#import "SPGeneralPreferencePane.h" #import "SPGeneralPreferencePane.h"
#import "SPDatabaseViewController.h"
#import "SPTreeNode.h" #import "SPTreeNode.h"
#import "SPFavoritesExporter.h" #import "SPFavoritesExporter.h"
#import "SPFavoritesImporter.h" #import "SPFavoritesImporter.h"
Expand Down
2 changes: 1 addition & 1 deletion Source/SPConnectionControllerInitializer.m
Expand Up @@ -35,7 +35,7 @@
#import "SPTreeNode.h" #import "SPTreeNode.h"
#import "SPFavoriteNode.h" #import "SPFavoriteNode.h"
#import "SPGroupNode.h" #import "SPGroupNode.h"
#import "SPDatabaseViewController.h" #import "SPDatabaseDocument.h"
#import "SPSplitView.h" #import "SPSplitView.h"
#import "SPFavoriteColorSupport.h" #import "SPFavoriteColorSupport.h"
#import "SPColorSelectorView.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
Expand Up @@ -66,7 +66,7 @@
#import <pthread.h> #import <pthread.h>
#import <SPMySQL/SPMySQL.h> #import <SPMySQL/SPMySQL.h>


@interface SPCustomQuery (PrivateAPI) @interface SPCustomQuery ()


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


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


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


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


#endif #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 @end

0 comments on commit b7830d6

Please sign in to comment.