aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-10-20 20:08:08 +0000
committerstuconnolly <stuart02@gmail.com>2010-10-20 20:08:08 +0000
commitc92776958cb5d5fca8f165e9bac043e5a91521dc (patch)
tree9146f7a5f62b799eadf8126f3b3708284e940fd8 /Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
parent3b92b30ca625eff33df49b538e3c4f2da7a9cf09 (diff)
downloadsequelpro-c92776958cb5d5fca8f165e9bac043e5a91521dc.tar.gz
sequelpro-c92776958cb5d5fca8f165e9bac043e5a91521dc.tar.bz2
sequelpro-c92776958cb5d5fca8f165e9bac043e5a91521dc.zip
Split MCPConnection's delegate methods into it's own protocol.
Diffstat (limited to 'Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m')
-rw-r--r--Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m23
1 files changed, 22 insertions, 1 deletions
diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
index 15eaae82..f503db55 100644
--- a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
+++ b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
@@ -60,6 +60,25 @@ static BOOL sTruncateLongFieldInLogs = YES;
@end
+/**
+ * Note that these aren't actually delegate methods, but are defined because queryDbStructureWithUserInfo needs
+ * them. We define them here to supress compiler warnings.
+ *
+ * TODO: Remove along with queryDbStructureWithUserInfo
+ */
+@interface MCPConnection (MCPConnectionDelegate)
+
+- (NSString *)database;
+- (NSString *)connectionID;
+
+- (NSArray *)allDatabaseNames;
+- (NSArray *)allSystemDatabaseNames;
+- (NSArray *)allTableNames;
+- (NSArray *)allViewNames;
+- (NSArray *)allSchemaKeys;
+
+@end
+
@implementation MCPConnection
// Synthesize ivars
@@ -2222,6 +2241,8 @@ void pingThreadCleanup(MCPConnectionPingDetails *pingDetails)
/**
* Updates the dict containing the structure of all available databases (mainly for completion/navigator)
* executed on a new connection.
+ *
+ * TODO: Split this entire method out of MCPKit if possible
*/
- (void)queryDbStructureWithUserInfo:(NSDictionary*)userInfo
{
@@ -2331,7 +2352,7 @@ void pingThreadCleanup(MCPConnectionPingDetails *pingDetails)
return;
}
- // Retrieve the tables and views for this database from SPTablesList (TODO: split out of MCPKit)
+ // Retrieve the tables and views for this database from SPTablesList
NSMutableArray *tablesAndViews = [NSMutableArray array];
for (id aTable in [[[self delegate] valueForKeyPath:@"tablesListInstance"] allTableNames]) {
NSDictionary *aTableDict = [NSDictionary dictionaryWithObjectsAndKeys: