objective-c-sql-query-builder
|
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 00019 #define ZIMSqlTokenError @"ERROR" 00020 #define ZIMSqlTokenHexadecimal @"HEXADECIMAL" 00021 #define ZIMSqlTokenIdentifier @"IDENTIFIER" 00022 #define ZIMSqlTokenInteger @"NUMBER:INTEGER" 00023 #define ZIMSqlTokenKeyword @"KEYWORD" 00024 #define ZIMSqlTokenLiteral @"LITERAL" 00025 #define ZIMSqlTokenOperator @"OPERATOR" 00026 #define ZIMSqlTokenParameter @"PARAMETER" 00027 #define ZIMSqlTokenReal @"NUMBER:REAL" 00028 #define ZIMSqlTokenTerminal @"TERMINAL" 00029 #define ZIMSqlTokenWhitespace @"WHITESPACE" 00030 00037 @interface ZIMSqlTokenizer : NSObject <NSFastEnumeration, ZIMSqlStatement> { 00038 00039 @protected 00040 NSMutableArray *_tuples; 00041 00042 } 00051 - (instancetype) initWithSqlStatement: (NSString *)sql; 00059 - (id) objectAtIndex: (NSUInteger)index; 00066 - (NSUInteger) count; 00073 - (NSString *) statement; 00087 + (BOOL) isKeyword: (NSString *)token; 00088 00089 @end