aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Delegate & Proxy.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2012-03-29 23:55:09 +0000
committerrowanbeentje <rowan@beent.je>2012-03-29 23:55:09 +0000
commit537a96297f236e2c41dd6d18ae317d2211a334a5 (patch)
tree094965db188cfb2ceb15210a864109cc2a750efd /Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Delegate & Proxy.m
parente611c3b44b57715a917563f897237fddcaf991c8 (diff)
downloadsequelpro-537a96297f236e2c41dd6d18ae317d2211a334a5.tar.gz
sequelpro-537a96297f236e2c41dd6d18ae317d2211a334a5.tar.bz2
sequelpro-537a96297f236e2c41dd6d18ae317d2211a334a5.zip
- Fix SPMySQL warnings about delegate and proxy methods mixing synthesized getters and manually overridden setters
- Fix autoincrement ID retrieval in SPMySQL, addressing issues previewing rows when the setting for "Reload Table After: Adding a row" is not being used
Diffstat (limited to 'Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Delegate & Proxy.m')
-rw-r--r--Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Delegate & Proxy.m28
1 files changed, 23 insertions, 5 deletions
diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Delegate & Proxy.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Delegate & Proxy.m
index 3ac013cc..59e78c35 100644
--- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Delegate & Proxy.m
+++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Delegate & Proxy.m
@@ -39,8 +39,8 @@
#pragma mark Connection delegate
/**
- * Override the synthesized delegate setter, to allow optimisations to oft-made
- * checks by precacheing availability.
+ * Set the delegate of the connection object, precaching availability of
+ * oft-called methods to allow optimisation.
*/
- (void)setDelegate:(NSObject <SPMySQLConnectionDelegate> *)aDelegate
{
@@ -51,12 +51,22 @@
delegateSupportsConnectionLost = [delegate respondsToSelector:@selector(connectionLost:)];
}
+/**
+ * Return the current instance delegate.
+ */
+- (NSObject <SPMySQLConnectionDelegate> *)delegate
+{
+ return delegate;
+}
+
#pragma mark -
#pragma mark Connection proxy
/**
- * Override the synthesized proxy setter, to record the initial state and to
- * set the state change selector.
+ * Set the connection proxy, used by the class to set up a connection pre-requisite, and
+ * monitored for state changes. This allows the MySQL connection to be routed over
+ * another helper class providing a port or socket. This method also records the initial
+ * state and sets the state change selector.
*/
- (void)setProxy:(NSObject <SPMySQLConnectionProxy> *)aProxy
{
@@ -64,7 +74,15 @@
previousProxyState = [aProxy state];
[proxy setConnectionStateChangeSelector:@selector(_proxyStateChange:) delegate:self];
-}
+}
+
+/**
+ * Return the current instance proxy.
+ */
+- (NSObject <SPMySQLConnectionProxy> *)proxy
+{
+ return proxy;
+}
@end