diff options
author | stuconnolly <stuart02@gmail.com> | 2012-03-25 13:27:36 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2012-03-25 13:27:36 +0000 |
commit | 43be43856a5f6f57ee08ebc36bc52f2dc247e8e8 (patch) | |
tree | 1be18dfda83841a862384eece88481cbe0552222 /Frameworks/QueryKit/Source/QKQuery.h | |
parent | f77bf99491a1c8b550e37fec2707e3db9399db94 (diff) | |
download | sequelpro-43be43856a5f6f57ee08ebc36bc52f2dc247e8e8.tar.gz sequelpro-43be43856a5f6f57ee08ebc36bc52f2dc247e8e8.tar.bz2 sequelpro-43be43856a5f6f57ee08ebc36bc52f2dc247e8e8.zip |
QueryKit: Add support for UPDATE queries.
Diffstat (limited to 'Frameworks/QueryKit/Source/QKQuery.h')
-rw-r--r-- | Frameworks/QueryKit/Source/QKQuery.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/Frameworks/QueryKit/Source/QKQuery.h b/Frameworks/QueryKit/Source/QKQuery.h index b45dc556..2132a158 100644 --- a/Frameworks/QueryKit/Source/QKQuery.h +++ b/Frameworks/QueryKit/Source/QKQuery.h @@ -2,7 +2,7 @@ // $Id: QKQuery.h 3421 2011-09-10 22:58:45Z stuart02 $ // // QKQuery.h -// sequel-pro +// QueryKit // // Created by Stuart Connolly (stuconnolly.com) on September 4, 2011 // Copyright (c) 2011 Stuart Connolly. All rights reserved. @@ -27,12 +27,11 @@ // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR // OTHER DEALINGS IN THE SOFTWARE. -// -// More info at <http://code.google.com/p/sequel-pro/> #import "QKQueryTypes.h" #import "QKQueryOperators.h" #import "QKQueryParameter.h" +#import "QKQueryUpdateParameter.h" /** * @class QKQuery QKQuery.h @@ -47,8 +46,10 @@ NSString *_table; NSMutableString *_query; + NSMutableArray *_parameters; NSMutableArray *_fields; + NSMutableArray *_updateParameters; NSMutableArray *_groupByFields; NSMutableArray *_orderByFields; @@ -79,6 +80,11 @@ @property (readwrite, retain, getter=fields, setter=setFields:) NSMutableArray *_fields; /** + * @property _updateFields The fields of an UPDATE query. + */ +@property (readwrite, retain, getter=updateParameters, setter=setUpdateParameters:) NSMutableArray *_updateParameters; + +/** * @property _queryType The type of query to be built. */ @property (readwrite, assign, getter=queryType, setter=setQueryType:) QKQueryType _queryType; @@ -101,6 +107,9 @@ - (void)addParameter:(QKQueryParameter *)parameter; - (void)addParameter:(NSString *)field operator:(QKQueryOperator)operator value:(id)value; +- (void)addFieldToUpdate:(QKQueryUpdateParameter *)parameter; +- (void)addFieldToUpdate:(NSString *)field toValue:(id)value; + - (void)groupByField:(NSString *)field; - (void)groupByFields:(NSArray *)fields; |