diff options
author | stuconnolly <stuart02@gmail.com> | 2011-09-10 22:58:45 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2011-09-10 22:58:45 +0000 |
commit | e4dc361f7cd4b8a5062f58548427a5f542917a7f (patch) | |
tree | 5cc5ce6961a9990cf547ccf3ba869e8890192573 /Frameworks/QueryKit/QKQueryUtilities.m | |
parent | 1538a53adfea8d8238dd23d36c1207938b4d8439 (diff) | |
download | sequelpro-e4dc361f7cd4b8a5062f58548427a5f542917a7f.tar.gz sequelpro-e4dc361f7cd4b8a5062f58548427a5f542917a7f.tar.bz2 sequelpro-e4dc361f7cd4b8a5062f58548427a5f542917a7f.zip |
QueryKit additions.
Diffstat (limited to 'Frameworks/QueryKit/QKQueryUtilities.m')
-rw-r--r-- | Frameworks/QueryKit/QKQueryUtilities.m | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/Frameworks/QueryKit/QKQueryUtilities.m b/Frameworks/QueryKit/QKQueryUtilities.m index cc354a90..5e4eb4ab 100644 --- a/Frameworks/QueryKit/QKQueryUtilities.m +++ b/Frameworks/QueryKit/QKQueryUtilities.m @@ -37,11 +37,11 @@ static NSString *QKUnrecognisedQueryOperatorException = @"QKUnrecognisedQueryOpe @implementation QKQueryUtilities /** - * + * Returns a string representation of the supplied operator type. * - * @param operator + * @param operator The operator * - * @return + * @return A string represenation of the operator. */ + (NSString *)operatorRepresentationForType:(QKQueryOperator)operator { @@ -52,6 +52,39 @@ static NSString *QKUnrecognisedQueryOperatorException = @"QKUnrecognisedQueryOpe case QKEqualityOperator: opString = @"="; break; + case QKNotEqualOperator: + opString = @"!="; + break; + case QKLikeOperator: + opString = @"LIKE"; + break; + case QKNotLikeOperator: + opString = @"NOT LIKE"; + break; + case QKInOperator: + opString = @"IN"; + break; + case QKNotInOperator: + opString = @"NOT IN"; + break; + case QKIsNullOperator: + opString = @"IS NULL"; + break; + case QKIsNotNullOperator: + opString = @"IS NOT NULL"; + break; + case QKGreaterThanOperator: + opString = @">"; + break; + case QKLessThanOperator: + opString = @"<"; + break; + case QKGreaterThanOrEqualOperator: + opString = @">="; + break; + case QKLessThanOrEqualOperator: + opString = @"<="; + break; default: [NSException raise:QKUnrecognisedQueryOperatorException format:@"Unrecognised query operator type: %d", operator]; break; |