objective-c-sql-query-builder
ZIMSqlSelectStatement.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2011-2015 Ziminji
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at:
00007  * 
00008  *    http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #import "ZIMSqlStatement.h"
00018 #import "ZIMSqlDataManipulationCommand.h"
00019 
00026 @interface ZIMSqlSelectStatement : NSObject <ZIMSqlStatement, ZIMSqlDataManipulationCommand> {
00027 
00028         @protected
00029                 BOOL _distinct;
00030                 NSMutableArray *_column;
00031                 NSMutableArray *_table;
00032                 NSMutableArray *_join;
00033                 NSMutableArray *_where;
00034                 NSMutableArray *_groupBy;
00035                 NSMutableArray *_having;
00036                 NSMutableArray *_orderBy;
00037                 NSUInteger _limit;
00038                 NSUInteger _offset;
00039                 NSMutableArray *_combine;
00040 
00041 }
00048 - (void) distinct: (BOOL)distinct;
00055 - (void) column: (id)column;
00063 - (void) column: (id)column alias: (NSString *)alias;
00070 - (void) from: (id)table;
00078 - (void) from: (id)table alias: (NSString *)alias;
00085 - (void) join: (id)table;
00093 - (void) join: (id)table alias: (NSString *)alias;
00101 - (void) join: (id)table type: (NSString *)type;
00110 - (void) join: (id)table alias: (NSString *)alias type: (NSString *)type;
00119 - (void) joinOn: (id)column1 operator: (NSString *)operator column: (id)column2;
00129 - (void) joinOn: (id)column1 operator: (NSString *)operator column: (id)column2 connector: (NSString *)connector;
00138 - (void) joinOn: (id)column operator: (NSString *)operator value: (id)value;
00148 - (void) joinOn: (id)column operator: (NSString *)operator value: (id)value connector: (NSString *)connector;
00155 - (void) joinUsing: (NSString *)column;
00162 - (void) whereBlock: (NSString *)brace;
00170 - (void) whereBlock: (NSString *)brace connector: (NSString *)connector;
00179 - (void) where: (id)column1 operator: (NSString *)operator column: (id)column2;
00189 - (void) where: (id)column1 operator: (NSString *)operator column: (id)column2 connector: (NSString *)connector;
00198 - (void) where: (id)column operator: (NSString *)operator value: (id)value; // wrap primitives with NSNumber
00208 - (void) where: (id)column operator: (NSString *)operator value: (id)value connector: (NSString *)connector; // wrap primitives with NSNumber
00215 - (void) groupBy: (NSString *)column;
00222 - (void) groupByHavingBlock: (NSString *)brace;
00230 - (void) groupByHavingBlock: (NSString *)brace connector: (NSString *)connector;
00239 - (void) groupByHaving: (id)column1 operator: (NSString *)operator column: (id)column2;
00249 - (void) groupByHaving: (id)column1 operator: (NSString *)operator column: (id)column2 connector: (NSString *)connector;
00258 - (void) groupByHaving: (id)column operator: (NSString *)operator value: (id)value; // wrap primitives with NSNumber
00268 - (void) groupByHaving: (id)column operator: (NSString *)operator value: (id)value connector: (NSString *)connector; // wrap primitives with NSNumber
00275 - (void) orderBy: (NSString *)column; // ORDER BY [COLUMN] ASC
00283 - (void) orderBy: (NSString *)column descending: (BOOL)descending; // ORDER BY [COLUMN] [ASC | DESC]
00294 - (void) orderBy: (NSString *)column nulls: (NSString *)weight; // ORDER BY [COLUMN] ASC [NULLS FIRST | NULLS LAST]
00306 - (void) orderBy: (NSString *)column descending: (BOOL)descending nulls: (NSString *)weight; // ORDER BY [COLUMN] [ASC | DESC] [NULLS FIRST | NULLS LAST]
00313 - (void) limit: (NSUInteger)limit;
00321 - (void) limit: (NSUInteger)limit offset: (NSUInteger)offset;
00328 - (void) offset: (NSUInteger)offset;
00336 - (void) combine: (NSString *)statement operator: (NSString *)operator;
00343 - (NSString *) statement;
00344 
00345 @end
 All Classes Files Functions Variables Properties Defines