aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CMMCPConnection.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CMMCPConnection.m')
-rw-r--r--Source/CMMCPConnection.m31
1 files changed, 31 insertions, 0 deletions
diff --git a/Source/CMMCPConnection.m b/Source/CMMCPConnection.m
index 5319f42f..11f60b97 100644
--- a/Source/CMMCPConnection.m
+++ b/Source/CMMCPConnection.m
@@ -287,6 +287,23 @@ WARNING : incomplete implementation. Please, send your fixes.
/*
+ * Modified version of selectDB to be used in Sequel Pro.
+ * Checks the connection exists, and handles keepalive, otherwise calling the parent implementation.
+ */
+- (BOOL) selectDB:(NSString *) dbName
+{
+ if (!mConnected) return NO;
+ [self stopKeepAliveTimer];
+ if (![self checkConnection]) return NO;
+ if ([super selectDB:dbName]) {
+ [self startKeepAliveTimerResettingState:YES];
+ return YES;
+ }
+ return NO;
+}
+
+
+/*
* Modified version of queryString to be used in Sequel Pro.
* Error checks extensively - if this method fails, it will ask how to proceed and loop depending
* on the status, not returning control until either the query has been executed and the result can
@@ -337,6 +354,20 @@ WARNING : incomplete implementation. Please, send your fixes.
/*
+ * Modified version of selectDB to be used in Sequel Pro.
+ * Checks the connection exists, and handles keepalive, otherwise calling the parent implementation.
+ */
+- (MCPResult *) listDBsLike:(NSString *) dbsName
+{
+ if (!mConnected) return NO;
+ [self stopKeepAliveTimer];
+ if (![self checkConnection]) return [[[MCPResult alloc] init] autorelease];
+ [self startKeepAliveTimerResettingState:YES];
+ return [super listDBsLike:dbsName];
+}
+
+
+/*
* Checks whether the connection to the server is still active. If not, prompts for what approach to take,
* offering to retry, reconnect or disconnect the connection.
*/