aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/QueryKit/Source/QKQuery.h
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2012-07-14 10:26:44 +0000
committerstuconnolly <stuart02@gmail.com>2012-07-14 10:26:44 +0000
commit6c1a1acdb2e030b08ccd08dc6eea70b3657ebb4c (patch)
treea2b9c82ab3db6f149ee6a67affd94ecda30a5b9b /Frameworks/QueryKit/Source/QKQuery.h
parenta2d65d3fa1e58d91d47260cdbbbeae7c99aa04f8 (diff)
downloadsequelpro-6c1a1acdb2e030b08ccd08dc6eea70b3657ebb4c.tar.gz
sequelpro-6c1a1acdb2e030b08ccd08dc6eea70b3657ebb4c.tar.bz2
sequelpro-6c1a1acdb2e030b08ccd08dc6eea70b3657ebb4c.zip
Bunch of improvements including uderlying database system support.
Diffstat (limited to 'Frameworks/QueryKit/Source/QKQuery.h')
-rw-r--r--Frameworks/QueryKit/Source/QKQuery.h31
1 files changed, 27 insertions, 4 deletions
diff --git a/Frameworks/QueryKit/Source/QKQuery.h b/Frameworks/QueryKit/Source/QKQuery.h
index e3b7f148..117da9b3 100644
--- a/Frameworks/QueryKit/Source/QKQuery.h
+++ b/Frameworks/QueryKit/Source/QKQuery.h
@@ -29,6 +29,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#import "QKQueryTypes.h"
+#import "QKQueryDatabases.h"
#import "QKQueryOperators.h"
#import "QKQueryParameter.h"
#import "QKQueryUpdateParameter.h"
@@ -44,6 +45,7 @@
{
NSString *_database;
NSString *_table;
+ NSString *_identifierQuote;
NSMutableString *_query;
@@ -54,8 +56,9 @@
NSMutableArray *_orderByFields;
QKQueryType _queryType;
+ QKQueryDatabase _queryDatabase;
- BOOL _useQuotes;
+ BOOL _useQuotedIdentifiers;
BOOL _orderDescending;
}
@@ -90,23 +93,43 @@
@property(readwrite, assign, getter=queryType, setter=setQueryType:) QKQueryType _queryType;
/**
- * @property _useQuotes Indicates whether or not the query's fields should be quoted.
+ * @property _queryDatabase The underlying database system this query will be run against.
*/
-@property(readwrite, assign, getter=useQuotes) BOOL _useQuotes;
+@property(readwrite, assign, getter=queryDatabase, setter=setQueryDatabase:) QKQueryDatabase _queryDatabase;
+/**
+ * @property _useQuotedIdentifiers Indicates whether or not the query's fields should be quoted.
+ */
+@property(readwrite, assign, getter=useQuotedIdentifiers) BOOL _useQuotedIdentifiers;
+
+/**
+ * @property _groupByFields The group by fields of the query.
+ */
@property(readonly, getter=groupByFields) NSMutableArray *_groupByFields;
+/**
+ * @property _orderByFields The order by fields of the query.
+ */
@property(readonly, getter=orderByFields) NSMutableArray *_orderByFields;
+/**
+ * @property _identifierQuote The character to use when quoting identifiers.
+ */
+@property(readonly, getter=identifierQuote) NSString *_identifierQuote;
+
+ (QKQuery *)queryTable:(NSString *)table;
++ (QKQuery *)queryTable:(NSString *)table database:(NSString *)database;
+
+ (QKQuery *)selectQueryFromTable:(NSString *)table;
++ (QKQuery *)selectQueryFromTable:(NSString *)table database:(NSString *)database;
- (id)initWithTable:(NSString *)table;
+- (id)initWithTable:(NSString *)table database:(NSString *)database;
- (NSString *)query;
- (void)clear;
-- (void)setUseQuotes:(BOOL)quote;
+- (void)setUseQuotedIdentifiers:(BOOL)quote;
- (void)addField:(NSString *)field;
- (void)addFields:(NSArray *)fields;