aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2011-09-04 21:36:24 +0000
committerstuconnolly <stuart02@gmail.com>2011-09-04 21:36:24 +0000
commit09a79031bed30c1cf95e1b9de85bf73b2ce38300 (patch)
tree7ca424689d5970be0302dae986bfd03e979c7241
parent16b55db51bfb4f0c8e44dced5258f3ac1d2a79b3 (diff)
downloadsequelpro-09a79031bed30c1cf95e1b9de85bf73b2ce38300.tar.gz
sequelpro-09a79031bed30c1cf95e1b9de85bf73b2ce38300.tar.bz2
sequelpro-09a79031bed30c1cf95e1b9de85bf73b2ce38300.zip
Add the beginnings of QueryKit.
-rw-r--r--Frameworks/QueryKit/QKQuery.h83
-rw-r--r--Frameworks/QueryKit/QKQuery.m178
-rw-r--r--Frameworks/QueryKit/QKQueryOperators.h45
-rw-r--r--Frameworks/QueryKit/QKQueryParameter.h56
-rw-r--r--Frameworks/QueryKit/QKQueryParameter.m60
-rw-r--r--Frameworks/QueryKit/QKQueryTypes.h33
-rw-r--r--Frameworks/QueryKit/QKQueryUtilities.h32
-rw-r--r--Frameworks/QueryKit/QKQueryUtilities.m47
-rw-r--r--Frameworks/QueryKit/QueryKit.h29
-rw-r--r--Resources/Plists/QueryKit-Info.plist22
-rw-r--r--Resources/Plists/Unit Tests-Info.plist2
-rw-r--r--UnitTests/QKSelectQueryTests.h33
-rw-r--r--UnitTests/QKSelectQueryTests.m64
-rw-r--r--sequel-pro.xcodeproj/project.pbxproj246
14 files changed, 922 insertions, 8 deletions
diff --git a/Frameworks/QueryKit/QKQuery.h b/Frameworks/QueryKit/QKQuery.h
new file mode 100644
index 00000000..9fb7b0f2
--- /dev/null
+++ b/Frameworks/QueryKit/QKQuery.h
@@ -0,0 +1,83 @@
+//
+// $Id$
+//
+// QKQuery.h
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on September 4, 2011
+// Copyright (c) 2011 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import "QKQueryTypes.h"
+#import "QKQueryOperators.h"
+
+@interface QKQuery : NSObject
+{
+ NSString *_database;
+ NSString *_table;
+
+ NSMutableString *_query;
+ NSMutableArray *_parameters;
+ NSMutableArray *_fields;
+
+ QKQueryType _queryType;
+
+ BOOL _quoteFields;
+}
+
+/**
+ *
+ */
+@property (readwrite, retain, getter=database, setter=setDatabase:) NSString *_database;
+
+/**
+ *
+ */
+@property (readwrite, retain, getter=table, setter=setTable:) NSString *_table;
+
+/**
+ *
+ */
+@property (readwrite, retain, getter=parameters, setter=setParameters:) NSMutableArray *_parameters;
+
+/**
+ *
+ */
+@property (readwrite, retain, getter=fields, setter=setFields:) NSMutableArray *_fields;
+
+/**
+ *
+ */
+@property (readwrite, assign, getter=queryType, setter=setQueryType:) QKQueryType _queryType;
+
+/**
+ *
+ */
+@property (readwrite, assign, getter=quoteFields, setter=setQuoteFields:) BOOL _quoteFields;
+
++ (QKQuery *)queryTable:(NSString *)table;
++ (QKQuery *)selectQueryFromTable:(NSString *)table;
+
+- (id)initWithTable:(NSString *)table;
+
+- (NSString *)query;
+
+- (void)addField:(NSString *)field;
+- (void)addParameter:(NSString *)field operator:(QKQueryOperator *)op value:(id)value;
+
+@end
diff --git a/Frameworks/QueryKit/QKQuery.m b/Frameworks/QueryKit/QKQuery.m
new file mode 100644
index 00000000..1f0c5005
--- /dev/null
+++ b/Frameworks/QueryKit/QKQuery.m
@@ -0,0 +1,178 @@
+//
+// $Id$
+//
+// QKQuery.m
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on September 4, 2011
+// Copyright (c) 2011 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import "QKQuery.h"
+
+static NSString *QKNoQueryTypeException = @"QKNoQueryType";
+
+@interface QKQuery ()
+
+- (NSString *)_buildQuery;
+- (NSString *)_buildFieldList;
+
+@end
+
+@implementation QKQuery
+
+@synthesize _database;
+@synthesize _table;
+@synthesize _parameters;
+@synthesize _queryType;
+@synthesize _fields;
+@synthesize _quoteFields;
+
+#pragma mark -
+#pragma mark Initialization
+
++ (QKQuery *)queryTable:(NSString *)table
+{
+ return [[[QKQuery alloc] initWithTable:table] autorelease];
+}
+
++ (QKQuery *)selectQueryFromTable:(NSString *)table
+{
+ QKQuery *query = [[[QKQuery alloc] initWithTable:table] autorelease];
+
+ [query setQueryType:QKSelectQuery];
+
+ return query;
+}
+
+- (id)initWithTable:(NSString *)table
+{
+ if ((self = [super init])) {
+ [self setTable:table];
+ [self setFields:[[NSMutableArray alloc] init]];
+ [self setParameters:[[NSMutableArray alloc] init]];
+ [self setQueryType:-1];
+ [self setQuoteFields:NO];
+
+ _query = [[NSMutableString alloc] init];
+ }
+
+ return self;
+}
+
+#pragma mark -
+#pragma mark Public API
+
+- (NSString *)query
+{
+ return _query ? [self _buildQuery] : @"";
+}
+
+/**
+ * Shortcut for adding a new field to this query.
+ */
+- (void)addField:(NSString *)field
+{
+ [_fields addObject:field];
+}
+
+/**
+ * Shortcut for adding a new parameter to this query.
+ */
+- (void)addParameter:(NSString *)field operator:(QKQueryOperator *)op value:(id)value
+{
+
+}
+
+#pragma mark -
+#pragma mark Private API
+
+/**
+ * Builds the actual query.
+ */
+- (NSString *)_buildQuery
+{
+ if (_queryType == -1) {
+ [NSException raise:QKNoQueryTypeException format:@"Attempt to build query with no query type specified."];
+ }
+
+ if (_queryType == QKSelectQuery) {
+ [_query appendString:@"SELECT "];
+ }
+
+ [_query appendString:[self _buildFieldList]];
+
+ return _query;
+}
+
+/**
+ * Builds the string representation of the field list.
+ */
+- (NSString *)_buildFieldList
+{
+ NSMutableString *fields = [NSMutableString string];
+
+ if ([_fields count] == 0) {
+ [fields appendString:@"*"];
+
+ return fields;
+ }
+
+ for (NSString *field in _fields)
+ {
+ field = [field stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
+
+ if ([field length] == 0) continue;
+
+ if (_quoteFields) {
+ [fields appendString:@"`"];
+ }
+
+ [fields appendString:field];
+
+ if (_quoteFields) {
+ [fields appendString:@"`"];
+ }
+
+ [fields appendString:@", "];
+ }
+
+ if ([fields hasSuffix:@", "]) {
+ [fields setString:[fields substringToIndex:([fields length] - 2)]];
+ }
+
+ return fields;
+}
+
+#pragma mark -
+
+- (NSString *)description
+{
+ return [self query];
+}
+
+#pragma mark -
+
+- (void)dealloc
+{
+ if (_query) [_query release], _query = nil;
+
+ [super dealloc];
+}
+
+@end
diff --git a/Frameworks/QueryKit/QKQueryOperators.h b/Frameworks/QueryKit/QKQueryOperators.h
new file mode 100644
index 00000000..df9a88f9
--- /dev/null
+++ b/Frameworks/QueryKit/QKQueryOperators.h
@@ -0,0 +1,45 @@
+//
+// $Id$
+//
+// QKQueryOperators.h
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on September 4, 2011
+// Copyright (c) 2011 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+/**
+ * Note that this is by no means complete list of available operators, only the most commonly used ones. Other
+ * operators can be added as and when they are required.
+ */
+typedef enum
+{
+ QKEqualityOperator,
+ QKNotEqualOperator,
+ QKLikeOperator,
+ QKNotLikeOperator,
+ QKInOperator,
+ QKNotInOperator,
+ QKIsNullOperator,
+ QKIsNotNullOperator,
+ QKGreaterThanOperator,
+ QKLessThanOperator,
+ QKGreaterThanOrEqualOperator,
+ QKLessThanOrEqualOperator
+}
+QKQueryOperator; \ No newline at end of file
diff --git a/Frameworks/QueryKit/QKQueryParameter.h b/Frameworks/QueryKit/QKQueryParameter.h
new file mode 100644
index 00000000..781fbd87
--- /dev/null
+++ b/Frameworks/QueryKit/QKQueryParameter.h
@@ -0,0 +1,56 @@
+//
+// $Id$
+//
+// QKQueryParameter.h
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on September 4, 2011
+// Copyright (c) 2011 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import "QKQueryOperators.h"
+
+@interface QKQueryParameter : NSObject
+{
+ NSString *_field;
+
+ QKQueryOperator _operator;
+
+ id _value;
+}
+
+/**
+ *
+ */
+@property (readwrite, retain, getter=field, setter=setField:) NSString *_field;
+
+/**
+ *
+ */
+@property (readwrite, assign, getter=operator, setter=setOperator:) QKQueryOperator _operator;
+
+/**
+ *
+ */
+@property (readwrite, retain, getter=value, setter=setValue:) id _value;
+
++ (QKQueryParameter *)queryParamWithField:(NSString *)field operator:(QKQueryOperator)op value:(id)value;
+
+- (id)initParamWithField:(NSString *)field operator:(QKQueryOperator)op value:(id)value;
+
+@end
diff --git a/Frameworks/QueryKit/QKQueryParameter.m b/Frameworks/QueryKit/QKQueryParameter.m
new file mode 100644
index 00000000..c50cb5dd
--- /dev/null
+++ b/Frameworks/QueryKit/QKQueryParameter.m
@@ -0,0 +1,60 @@
+//
+// $Id$
+//
+// QKQueryParameter.m
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on September 4, 2011
+// Copyright (c) 2011 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import "QKQueryParameter.h"
+
+@implementation QKQueryParameter
+
+@synthesize _field;
+@synthesize _operator;
+@synthesize _value;
+
++ (QKQueryParameter *)queryParamWithField:(NSString *)field operator:(QKQueryOperator)op value:(id)value
+{
+ return [[[QKQueryParameter alloc] initParamWithField:field operator:op value:value] autorelease];
+}
+
+- (id)initParamWithField:(NSString *)field operator:(QKQueryOperator)op value:(id)value
+{
+ if ((self = [super init])) {
+ [self setField:field];
+ [self setOperator:op];
+ [self setValue:value];
+ }
+
+ return self;
+}
+
+#pragma mark -
+
+- (void)dealloc
+{
+ if (_field) [_field release], _field = nil;
+ if (_value) [_value release], _value = nil;
+
+ [super dealloc];
+}
+
+@end
diff --git a/Frameworks/QueryKit/QKQueryTypes.h b/Frameworks/QueryKit/QKQueryTypes.h
new file mode 100644
index 00000000..51e918a9
--- /dev/null
+++ b/Frameworks/QueryKit/QKQueryTypes.h
@@ -0,0 +1,33 @@
+//
+// $Id$
+//
+// QKQueryTypes.h
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on September 4, 2011
+// Copyright (c) 2011 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+typedef enum
+{
+ QKSelectQuery,
+ QKUpdateQuery,
+ QKInsertQuery,
+ QKDeleteQuery,
+}
+QKQueryType; \ No newline at end of file
diff --git a/Frameworks/QueryKit/QKQueryUtilities.h b/Frameworks/QueryKit/QKQueryUtilities.h
new file mode 100644
index 00000000..f1a608cf
--- /dev/null
+++ b/Frameworks/QueryKit/QKQueryUtilities.h
@@ -0,0 +1,32 @@
+//
+// $Id$
+//
+// QKQueryUtilities.h
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on September 4, 2011
+// Copyright (c) 2011 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import "QKQueryOperators.h"
+
+@interface QKQueryUtilities : NSObject
+
++ (NSString *)operatorRepresentationForType:(QKQueryOperator)operator;
+
+@end
diff --git a/Frameworks/QueryKit/QKQueryUtilities.m b/Frameworks/QueryKit/QKQueryUtilities.m
new file mode 100644
index 00000000..f9f43f03
--- /dev/null
+++ b/Frameworks/QueryKit/QKQueryUtilities.m
@@ -0,0 +1,47 @@
+//
+// $Id$
+//
+// QKQueryUtilities.m
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on September 4, 2011
+// Copyright (c) 2011 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import "QKQueryUtilities.h"
+
+@implementation QKQueryUtilities
+
++ (NSString *)operatorRepresentationForType:(QKQueryOperator)operator
+{
+ NSString *opString = nil;
+
+ switch (operator)
+ {
+ case QKEqualityOperator:
+ opString = @"=";
+ break;
+ default:
+ [NSException raise:@"" format:@"Unrecognised query operator type: %d", operator];
+ break;
+ }
+
+ return opString;
+}
+
+@end
diff --git a/Frameworks/QueryKit/QueryKit.h b/Frameworks/QueryKit/QueryKit.h
new file mode 100644
index 00000000..8222fe28
--- /dev/null
+++ b/Frameworks/QueryKit/QueryKit.h
@@ -0,0 +1,29 @@
+//
+// $Id$
+//
+// QueryKit.h
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on September 4, 2011
+// Copyright (c) 2011 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import <QueryKit/QKQuery.h>
+#import <QueryKit/QKQueryTypes.h>
+#import <QueryKit/QKQueryOperators.h>
+#import <QueryKit/QKQueryParameter.h>
diff --git a/Resources/Plists/QueryKit-Info.plist b/Resources/Plists/QueryKit-Info.plist
new file mode 100644
index 00000000..b76ed0eb
--- /dev/null
+++ b/Resources/Plists/QueryKit-Info.plist
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>QueryKit</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.google.code.sequel-pro.querykit</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+</dict>
+</plist>
diff --git a/Resources/Plists/Unit Tests-Info.plist b/Resources/Plists/Unit Tests-Info.plist
index 65013556..8e85f172 100644
--- a/Resources/Plists/Unit Tests-Info.plist
+++ b/Resources/Plists/Unit Tests-Info.plist
@@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
- <string>com.yourcompany.${PRODUCT_NAME:identifier}</string>
+ <string>com.google.code.sequel-pro.tests</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
diff --git a/UnitTests/QKSelectQueryTests.h b/UnitTests/QKSelectQueryTests.h
new file mode 100644
index 00000000..85f4b17f
--- /dev/null
+++ b/UnitTests/QKSelectQueryTests.h
@@ -0,0 +1,33 @@
+//
+// $Id$
+//
+// QKSelectQueryTests.h
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on September 4, 2011
+// Copyright (c) 2011 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import <SenTestingKit/SenTestingKit.h>
+
+@interface QKSelectQueryTests : SenTestCase
+{
+ QKQuery *_query;
+}
+
+@end
diff --git a/UnitTests/QKSelectQueryTests.m b/UnitTests/QKSelectQueryTests.m
new file mode 100644
index 00000000..fca26f99
--- /dev/null
+++ b/UnitTests/QKSelectQueryTests.m
@@ -0,0 +1,64 @@
+//
+// $Id$
+//
+// QKSelectQueryTests.m
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on September 4, 2011
+// Copyright (c) 2011 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import <QueryKit/QueryKit.h>
+#import "QKSelectQueryTests.h"
+
+static NSString *SPTestTableName = @"test_table";
+
+static NSString *SPTestFieldOne = @"test_field1";
+static NSString *SPTestFieldTwo = @"test_field2";
+static NSString *SPTestFieldThree = @"test_field3";
+static NSString *SPTestFieldFour = @"test_field4";
+
+@implementation QKSelectQueryTests
+
+#pragma mark -
+#pragma mark Setup & tear down
+
+- (void)setUp
+{
+ _query = [QKQuery selectQueryFromTable:SPTestTableName];
+}
+
+-(void)tearDown
+{
+ if (_query) [_query release], _query = nil;
+}
+
+#pragma mark -
+#pragma mark Tests
+
+- (void)testSelectQueryTypeIsCorrect
+{
+ [_query addField:SPTestFieldOne];
+ [_query addField:SPTestFieldTwo];
+ [_query addField:SPTestFieldThree];
+ [_query addField:SPTestFieldFour];
+
+ STAssertTrue([[_query query] hasPrefix:@"SELECT"], @"query type");
+}
+
+@end
diff --git a/sequel-pro.xcodeproj/project.pbxproj b/sequel-pro.xcodeproj/project.pbxproj
index e5cd6d32..2172a05d 100644
--- a/sequel-pro.xcodeproj/project.pbxproj
+++ b/sequel-pro.xcodeproj/project.pbxproj
@@ -179,6 +179,17 @@
17F90E2C1210B34900274C98 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 17F90E2B1210B34900274C98 /* Credits.rtf */; };
17F90E481210B42700274C98 /* SPExportFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 17F90E471210B42700274C98 /* SPExportFile.m */; };
17F90E4B1210B43A00274C98 /* SPExportFileUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 17F90E4A1210B43A00274C98 /* SPExportFileUtilities.m */; };
+ 17FC35961413CF7200AC3602 /* QKQuery.m in Sources */ = {isa = PBXBuildFile; fileRef = 17FC358E1413CF7200AC3602 /* QKQuery.m */; };
+ 17FC35C01413D13F00AC3602 /* QKQueryOperators.h in Headers */ = {isa = PBXBuildFile; fileRef = 17FC358B1413CF7200AC3602 /* QKQueryOperators.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 17FC35C21413D14000AC3602 /* QKQuery.h in Headers */ = {isa = PBXBuildFile; fileRef = 17FC358D1413CF7200AC3602 /* QKQuery.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 17FC35C31413D14100AC3602 /* QKQuery.m in Sources */ = {isa = PBXBuildFile; fileRef = 17FC358E1413CF7200AC3602 /* QKQuery.m */; };
+ 17FC35C91413D14800AC3602 /* QKQueryTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 17FC35941413CF7200AC3602 /* QKQueryTypes.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 17FC35CA1413D14A00AC3602 /* QueryKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 17FC35911413CF7200AC3602 /* QueryKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 17FC360B1413DAED00AC3602 /* QKQueryParameter.h in Headers */ = {isa = PBXBuildFile; fileRef = 17FC36091413DAED00AC3602 /* QKQueryParameter.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 17FC360C1413DAED00AC3602 /* QKQueryParameter.m in Sources */ = {isa = PBXBuildFile; fileRef = 17FC360A1413DAED00AC3602 /* QKQueryParameter.m */; };
+ 17FC3626141411B800AC3602 /* QKQueryUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 17FC3624141411B800AC3602 /* QKQueryUtilities.h */; };
+ 17FC3627141411B800AC3602 /* QKQueryUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 17FC3625141411B800AC3602 /* QKQueryUtilities.m */; };
+ 17FC3634141415F100AC3602 /* QKSelectQueryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 17FC3633141415F100AC3602 /* QKSelectQueryTests.m */; };
17FDB04C1280778B00DBBBC2 /* SPFontPreviewTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 17FDB04B1280778B00DBBBC2 /* SPFontPreviewTextField.m */; };
296DC89F0F8FD336002A3258 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 296DC89E0F8FD336002A3258 /* WebKit.framework */; };
296DC8B60F909194002A3258 /* MGTemplateEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 296DC8A70F909194002A3258 /* MGTemplateEngine.m */; };
@@ -512,6 +523,13 @@
remoteGlobalIDString = 17B7B5611016012700F057DE;
remoteInfo = MCPKit;
};
+ 17FC36351414164000AC3602 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 2A37F4A9FDCFA73011CA2CEA /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 17FC35AB1413CFE700AC3602 /* QueryKit */;
+ remoteInfo = QueryKit;
+ };
5847571D120A1C6D0057631F /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 2A37F4A9FDCFA73011CA2CEA /* Project object */;
@@ -883,6 +901,19 @@
17F90E471210B42700274C98 /* SPExportFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPExportFile.m; sourceTree = "<group>"; };
17F90E491210B43A00274C98 /* SPExportFileUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPExportFileUtilities.h; sourceTree = "<group>"; };
17F90E4A1210B43A00274C98 /* SPExportFileUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPExportFileUtilities.m; sourceTree = "<group>"; };
+ 17FC358B1413CF7200AC3602 /* QKQueryOperators.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QKQueryOperators.h; sourceTree = "<group>"; };
+ 17FC358D1413CF7200AC3602 /* QKQuery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QKQuery.h; sourceTree = "<group>"; };
+ 17FC358E1413CF7200AC3602 /* QKQuery.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QKQuery.m; sourceTree = "<group>"; };
+ 17FC35911413CF7200AC3602 /* QueryKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QueryKit.h; sourceTree = "<group>"; };
+ 17FC35941413CF7200AC3602 /* QKQueryTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QKQueryTypes.h; sourceTree = "<group>"; };
+ 17FC35A01413CFBC00AC3602 /* QueryKit-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "QueryKit-Info.plist"; path = "Plists/QueryKit-Info.plist"; sourceTree = "<group>"; };
+ 17FC35AC1413CFE700AC3602 /* QueryKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = QueryKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ 17FC36091413DAED00AC3602 /* QKQueryParameter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QKQueryParameter.h; sourceTree = "<group>"; };
+ 17FC360A1413DAED00AC3602 /* QKQueryParameter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QKQueryParameter.m; sourceTree = "<group>"; };
+ 17FC3624141411B800AC3602 /* QKQueryUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QKQueryUtilities.h; sourceTree = "<group>"; };
+ 17FC3625141411B800AC3602 /* QKQueryUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QKQueryUtilities.m; sourceTree = "<group>"; };
+ 17FC3632141415F100AC3602 /* QKSelectQueryTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QKSelectQueryTests.h; sourceTree = "<group>"; };
+ 17FC3633141415F100AC3602 /* QKSelectQueryTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QKSelectQueryTests.m; sourceTree = "<group>"; };
17FDB04A1280778B00DBBBC2 /* SPFontPreviewTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPFontPreviewTextField.h; sourceTree = "<group>"; };
17FDB04B1280778B00DBBBC2 /* SPFontPreviewTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPFontPreviewTextField.m; sourceTree = "<group>"; };
296DC89E0F8FD336002A3258 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = "<absolute>"; };
@@ -1323,6 +1354,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ 17FC35AA1413CFE700AC3602 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
584754C0120A04560057631F /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@@ -1687,8 +1725,9 @@
1740F8370FC306C900CF3699 /* Plists */ = {
isa = PBXGroup;
children = (
- 17DD52C1115074B3007D8950 /* InfoPlist.strings */,
17E641F60EF02088001BC333 /* Info.plist */,
+ 17DD52C1115074B3007D8950 /* InfoPlist.strings */,
+ 17FC35A01413CFBC00AC3602 /* QueryKit-Info.plist */,
17DA04EA0FC1A7DA00D66140 /* Unit Tests-Info.plist */,
B58731270F838C9E00087794 /* PreferenceDefaults.plist */,
17B7B58B1016022C00F057DE /* MCPKit-Info.plist */,
@@ -1736,7 +1775,7 @@
58587B4E11B4433B00D129ED /* Support files */,
);
name = MCPKit;
- path = ../Frameworks/MCPKit;
+ path = Frameworks/MCPKit;
sourceTree = "<group>";
};
17B7B5561016003F00F057DE /* MySQL */ = {
@@ -2060,8 +2099,7 @@
17E641670EF01F19001BC333 /* Views */,
17E6416E0EF01F3B001BC333 /* Other */,
17DC8825126B222D00E9AAEC /* Third Party */,
- 58B906F811BD9B34000826E5 /* PSMTabBar */,
- 17B7B5551016002900F057DE /* MCPKit */,
+ 17FC36AE141425D600AC3602 /* Frameworks */,
);
path = Source;
sourceTree = "<group>";
@@ -2346,6 +2384,60 @@
name = Model;
sourceTree = "<group>";
};
+ 17FC358A1413CF7200AC3602 /* QueryKit */ = {
+ isa = PBXGroup;
+ children = (
+ 17FC35911413CF7200AC3602 /* QueryKit.h */,
+ 17FC358D1413CF7200AC3602 /* QKQuery.h */,
+ 17FC358E1413CF7200AC3602 /* QKQuery.m */,
+ 17FC3624141411B800AC3602 /* QKQueryUtilities.h */,
+ 17FC3625141411B800AC3602 /* QKQueryUtilities.m */,
+ 17FC36091413DAED00AC3602 /* QKQueryParameter.h */,
+ 17FC360A1413DAED00AC3602 /* QKQueryParameter.m */,
+ 17FC35D31413D3BC00AC3602 /* Constants */,
+ );
+ name = QueryKit;
+ path = Frameworks/QueryKit;
+ sourceTree = "<group>";
+ };
+ 17FC35D31413D3BC00AC3602 /* Constants */ = {
+ isa = PBXGroup;
+ children = (
+ 17FC35941413CF7200AC3602 /* QKQueryTypes.h */,
+ 17FC358B1413CF7200AC3602 /* QKQueryOperators.h */,
+ );
+ name = Constants;
+ sourceTree = "<group>";
+ };
+ 17FC362C141415C200AC3602 /* QueryKit */ = {
+ isa = PBXGroup;
+ children = (
+ 17FC3632141415F100AC3602 /* QKSelectQueryTests.h */,
+ 17FC3633141415F100AC3602 /* QKSelectQueryTests.m */,
+ );
+ name = QueryKit;
+ sourceTree = "<group>";
+ };
+ 17FC366814141A4B00AC3602 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 17DC885B126B36CF00E9AAEC /* MCPKit */,
+ 17FC362C141415C200AC3602 /* QueryKit */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 17FC36AE141425D600AC3602 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 17B7B5551016002900F057DE /* MCPKit */,
+ 58B906F811BD9B34000826E5 /* PSMTabBar */,
+ 17FC358A1413CF7200AC3602 /* QueryKit */,
+ );
+ name = Frameworks;
+ path = ..;
+ sourceTree = "<group>";
+ };
17FDB0AC1280938000DBBBC2 /* Controls */ = {
isa = PBXGroup;
children = (
@@ -2365,6 +2457,7 @@
58B906E611BD989A000826E5 /* PSMTabBar.framework */,
58B9096111C3A42B000826E5 /* xibLocalizationPostprocessor */,
584754C2120A04560057631F /* Sequel Pro.qlgenerator */,
+ 17FC35AC1413CFE700AC3602 /* QueryKit.framework */,
);
name = Products;
sourceTree = "<group>";
@@ -2420,7 +2513,7 @@
380F4EF20FC0B67A00B0BFD7 /* Unit Tests */ = {
isa = PBXGroup;
children = (
- 17DC885B126B36CF00E9AAEC /* MCPKit */,
+ 17FC366814141A4B00AC3602 /* Frameworks */,
1198F5B41174EDDE00670590 /* Database Actions */,
17DC886A126B378A00E9AAEC /* Category Additions */,
);
@@ -2503,7 +2596,7 @@
);
name = PSMTabBar;
path = Frameworks/PSMTabBar;
- sourceTree = SOURCE_ROOT;
+ sourceTree = "<group>";
};
58B906F911BD9B34000826E5 /* Images */ = {
isa = PBXGroup;
@@ -2698,6 +2791,19 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ 17FC35A71413CFE700AC3602 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 17FC35C01413D13F00AC3602 /* QKQueryOperators.h in Headers */,
+ 17FC35C21413D14000AC3602 /* QKQuery.h in Headers */,
+ 17FC35C91413D14800AC3602 /* QKQueryTypes.h in Headers */,
+ 17FC35CA1413D14A00AC3602 /* QueryKit.h in Headers */,
+ 17FC360B1413DAED00AC3602 /* QKQueryParameter.h in Headers */,
+ 17FC3626141411B800AC3602 /* QKQueryUtilities.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
58B906E111BD989A000826E5 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
@@ -2748,6 +2854,23 @@
productReference = 17B7B5621016012700F057DE /* MCPKit.framework */;
productType = "com.apple.product-type.framework";
};
+ 17FC35AB1413CFE700AC3602 /* QueryKit */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 17FC35B11413CFE800AC3602 /* Build configuration list for PBXNativeTarget "QueryKit" */;
+ buildPhases = (
+ 17FC35A71413CFE700AC3602 /* Headers */,
+ 17FC35A91413CFE700AC3602 /* Sources */,
+ 17FC35AA1413CFE700AC3602 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = QueryKit;
+ productName = QueryKit;
+ productReference = 17FC35AC1413CFE700AC3602 /* QueryKit.framework */;
+ productType = "com.apple.product-type.framework";
+ };
380F4ED80FC0B50500B0BFD7 /* Unit Tests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 380F4EDE0FC0B50600B0BFD7 /* Build configuration list for PBXNativeTarget "Unit Tests" */;
@@ -2762,6 +2885,7 @@
dependencies = (
1792C2CD10AE239D00ABE758 /* PBXTargetDependency */,
1798AB0012676BAD000D946A /* PBXTargetDependency */,
+ 17FC36361414164000AC3602 /* PBXTargetDependency */,
);
name = "Unit Tests";
productName = "Unit Tests";
@@ -2887,6 +3011,7 @@
58CDB3350FCE13C900F8ACA3 /* SequelProTunnelAssistant */,
17B7B5611016012700F057DE /* MCPKit */,
58B906E511BD989A000826E5 /* PSMTabBar */,
+ 17FC35AB1413CFE700AC3602 /* QueryKit */,
58B9096011C3A42B000826E5 /* xibLocalizationPostprocessor */,
584754C1120A04560057631F /* Sequel Pro QLGenerator */,
1798AB1C12676EA0000D946A /* Localize */,
@@ -3158,6 +3283,16 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ 17FC35A91413CFE700AC3602 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 17FC35C31413D14100AC3602 /* QKQuery.m in Sources */,
+ 17FC360C1413DAED00AC3602 /* QKQueryParameter.m in Sources */,
+ 17FC3627141411B800AC3602 /* QKQueryUtilities.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
380F4ED50FC0B50500B0BFD7 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@@ -3173,6 +3308,7 @@
176059B813361D380098E162 /* SPDatabaseInfoTest.m in Sources */,
176059B913361D390098E162 /* SPTableCopyTest.m in Sources */,
176059BA13361D3A0098E162 /* SPDatabaseCopyTest.m in Sources */,
+ 17FC3634141415F100AC3602 /* QKSelectQueryTests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -3378,6 +3514,7 @@
1713C740140D8AEF00CFD461 /* SPQueryDocumentsController.m in Sources */,
1713C75F140D8D5900CFD461 /* SPQueryConsoleDataSource.m in Sources */,
17902612141025BB005F677F /* SPQueryControllerInitializer.m in Sources */,
+ 17FC35961413CF7200AC3602 /* QKQuery.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -3409,6 +3546,11 @@
target = 17B7B5611016012700F057DE /* MCPKit */;
targetProxy = 17B7B59A1016039200F057DE /* PBXContainerItemProxy */;
};
+ 17FC36361414164000AC3602 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 17FC35AB1413CFE700AC3602 /* QueryKit */;
+ targetProxy = 17FC36351414164000AC3602 /* PBXContainerItemProxy */;
+ };
5847571E120A1C6D0057631F /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 584754C1120A04560057631F /* Sequel Pro QLGenerator */;
@@ -4109,6 +4251,81 @@
};
name = Distribution;
};
+ 17FC35AE1413CFE800AC3602 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = YES;
+ COPY_PHASE_STRIP = NO;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_VERSION = A;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
+ INFOPLIST_FILE = "Resources/Plists/QueryKit-Info.plist";
+ INSTALL_PATH = "$(HOME)/Library/Frameworks";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Foundation,
+ );
+ PREBINDING = NO;
+ PRODUCT_NAME = QueryKit;
+ SDKROOT = macosx10.6;
+ };
+ name = Debug;
+ };
+ 17FC35AF1413CFE800AC3602 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = YES;
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_VERSION = A;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_MODEL_TUNING = G5;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
+ INFOPLIST_FILE = "Resources/Plists/QueryKit-Info.plist";
+ INSTALL_PATH = "$(HOME)/Library/Frameworks";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Foundation,
+ );
+ PREBINDING = NO;
+ PRODUCT_NAME = QueryKit;
+ SDKROOT = macosx10.6;
+ ZERO_LINK = NO;
+ };
+ name = Release;
+ };
+ 17FC35B01413CFE800AC3602 /* Distribution */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = YES;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_VERSION = A;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
+ INFOPLIST_FILE = "Resources/Plists/QueryKit-Info.plist";
+ INSTALL_PATH = "$(HOME)/Library/Frameworks";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Foundation,
+ );
+ PREBINDING = NO;
+ PRODUCT_NAME = QueryKit;
+ SDKROOT = macosx10.6;
+ };
+ name = Distribution;
+ };
380F4EDB0FC0B50600B0BFD7 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@@ -4136,10 +4353,11 @@
SenTestingKit,
"-framework",
MCPKit,
+ "-framework",
+ QueryKit,
);
PREBINDING = NO;
PRODUCT_NAME = "Unit Tests";
- TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = octest;
};
name = Debug;
@@ -4169,6 +4387,8 @@
SenTestingKit,
"-framework",
MCPKit,
+ "-framework",
+ QueryKit,
);
PREBINDING = NO;
PRODUCT_NAME = "Unit Tests";
@@ -4202,6 +4422,8 @@
MCPKit,
"-framework",
OCMock,
+ "-framework",
+ QueryKit,
);
PREBINDING = NO;
PRODUCT_NAME = "Unit Tests";
@@ -4717,6 +4939,16 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
+ 17FC35B11413CFE800AC3602 /* Build configuration list for PBXNativeTarget "QueryKit" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 17FC35AE1413CFE800AC3602 /* Debug */,
+ 17FC35AF1413CFE800AC3602 /* Release */,
+ 17FC35B01413CFE800AC3602 /* Distribution */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
380F4EDE0FC0B50600B0BFD7 /* Build configuration list for PBXNativeTarget "Unit Tests" */ = {
isa = XCConfigurationList;
buildConfigurations = (