aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/QueryKit/Source/QKQuery.h
diff options
context:
space:
mode:
Diffstat (limited to 'Frameworks/QueryKit/Source/QKQuery.h')
-rw-r--r--Frameworks/QueryKit/Source/QKQuery.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/Frameworks/QueryKit/Source/QKQuery.h b/Frameworks/QueryKit/Source/QKQuery.h
index b45dc556..c0f925bb 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;
@@ -94,6 +100,7 @@
- (id)initWithTable:(NSString *)table;
- (NSString *)query;
+- (void)clear;
- (void)addField:(NSString *)field;
- (void)addFields:(NSArray *)fields;
@@ -101,6 +108,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;