diff options
Diffstat (limited to 'Source/CMTextView.m')
-rw-r--r-- | Source/CMTextView.m | 322 |
1 files changed, 317 insertions, 5 deletions
diff --git a/Source/CMTextView.m b/Source/CMTextView.m index 767a98d1..dcb5f2b6 100644 --- a/Source/CMTextView.m +++ b/Source/CMTextView.m @@ -591,7 +591,7 @@ YY_BUFFER_STATE yy_scan_string (const char *); if([[self textStorage] attribute:kQuote atIndex:charRange.location effectiveRange:nil]) return [[NSSpellChecker sharedSpellChecker] completionsForPartialWordRange:NSMakeRange(0,charRange.length) inString:[[self string] substringWithRange:charRange] language:nil inSpellDocumentWithTag:0]; - NSCharacterSet *separators = [NSCharacterSet characterSetWithCharactersInString:@" \t\r\n,()\"'`-!;"]; + NSCharacterSet *separators = [NSCharacterSet characterSetWithCharactersInString:@" \t\r\n,()\"'`-!;=+|?:~"]; NSArray *textViewWords = [[self string] componentsSeparatedByCharactersInSet:separators]; NSString *partialString = [[self string] substringWithRange:charRange]; unsigned int partialLength = [partialString length]; @@ -1048,6 +1048,7 @@ YY_BUFFER_STATE yy_scan_string (const char *); @"PRIMARY", @"PRIVILEGES", @"PROCEDURE", + @"PROCEDURE ANALYSE", @"PROCESS", @"PROCESSLIST", @"PURGE", @@ -1179,15 +1180,23 @@ YY_BUFFER_STATE yy_scan_string (const char *); @"SOUNDS", @"SPATIAL", @"SPECIFIC", - @"SQL", - @"SQLEXCEPTION", - @"SQLSTATE", - @"SQLWARNING", + @"SQL_AUTO_IS_NULL", @"SQL_BIG_RESULT", + @"SQL_BIG_SELECTS", + @"SQL_BIG_TABLES", @"SQL_BUFFER_RESULT", @"SQL_CACHE", @"SQL_CALC_FOUND_ROWS", + @"SQL_LOG_BIN", + @"SQL_LOG_OFF", + @"SQL_LOG_UPDATE", + @"SQL_LOW_PRIORITY_UPDATES", + @"SQL_MAX_JOIN_SIZE", @"SQL_NO_CACHE", + @"SQL_QUOTE_SHOW_CREATE", + @"SQL_SAFE_UPDATES", + @"SQL_SELECT_LIMIT", + @"SQL_SLAVE_SKIP_COUNTER", @"SQL_SMALL_RESULT", @"SQL_THREAD", @"SQL_TSI_DAY", @@ -1199,6 +1208,7 @@ YY_BUFFER_STATE yy_scan_string (const char *); @"SQL_TSI_SECOND", @"SQL_TSI_WEEK", @"SQL_TSI_YEAR", + @"SQL_WARNINGS", @"SSL", @"START", @"START TRANSACTION", @@ -1288,6 +1298,308 @@ YY_BUFFER_STATE yy_scan_string (const char *); @"YEAR", @"YEAR_MONTH", @"ZEROFILL", + //functions + + @"ABS", + @"ACOS", + @"ADDDATE", + @"ADDTIME", + @"AES_DECRYPT", + @"AES_ENCRYPT", + @"AREA", + @"ASBINARY", + @"ASCII", + @"ASIN", + @"ASTEXT", + @"ATAN", + @"ATAN2", + @"AVG", + @"BDMPOLYFROMTEXT", + @"BDMPOLYFROMWKB", + @"BDPOLYFROMTEXT", + @"BDPOLYFROMWKB", + @"BENCHMARK", + @"BIN", + @"BIT_AND", + @"BIT_COUNT", + @"BIT_LENGTH", + @"BIT_OR", + @"BIT_XOR", + @"BOUNDARY", + @"BUFFER", + @"CAST", + @"CEIL", + @"CEILING", + @"CENTROID", + @"CHAR", + @"CHARACTER_LENGTH", + @"CHARSET", + @"CHAR_LENGTH", + @"COALESCE", + @"COERCIBILITY", + @"COLLATION", + @"COMPRESS", + @"CONCAT", + @"CONCAT_WS", + @"CONNECTION_ID", + @"CONTAINS", + @"CONV", + @"CONVERT", + @"CONVERT_TZ", + @"CONVEXHULL", + @"COS", + @"COT", + @"COUNT", + @"COUNT(*)", + @"CRC32", + @"CROSSES", + @"CURDATE", + @"CURRENT_DATE", + @"CURRENT_TIME", + @"CURRENT_TIMESTAMP", + @"CURRENT_USER", + @"CURTIME", + @"DATABASE", + @"DATE", + @"DATEDIFF", + @"DATE_ADD", + @"DATE_DIFF", + @"DATE_FORMAT", + @"DATE_SUB", + @"DAY", + @"DAYNAME", + @"DAYOFMONTH", + @"DAYOFWEEK", + @"DAYOFYEAR", + @"DECODE", + @"DEFAULT", + @"DEGREES", + @"DES_DECRYPT", + @"DES_ENCRYPT", + @"DIFFERENCE", + @"DIMENSION", + @"DISJOINT", + @"DISTANCE", + @"ELT", + @"ENCODE", + @"ENCRYPT", + @"ENDPOINT", + @"ENVELOPE", + @"EQUALS", + @"EXP", + @"EXPORT_SET", + @"EXTERIORRING", + @"EXTRACT", + @"EXTRACTVALUE", + @"FIELD", + @"FIND_IN_SET", + @"FLOOR", + @"FORMAT", + @"FOUND_ROWS", + @"FROM_DAYS", + @"FROM_UNIXTIME", + @"GEOMCOLLFROMTEXT", + @"GEOMCOLLFROMWKB", + @"GEOMETRYCOLLECTION", + @"GEOMETRYCOLLECTIONFROMTEXT", + @"GEOMETRYCOLLECTIONFROMWKB", + @"GEOMETRYFROMTEXT", + @"GEOMETRYFROMWKB", + @"GEOMETRYN", + @"GEOMETRYTYPE", + @"GEOMFROMTEXT", + @"GEOMFROMWKB", + @"GET_FORMAT", + @"GET_LOCK", + @"GLENGTH", + @"GREATEST", + @"GROUP_CONCAT", + @"GROUP_UNIQUE_USERS", + @"HEX", + @"HOUR", + @"IF", + @"IFNULL", + @"INET_ATON", + @"INET_NTOA", + @"INSERT", + @"INSERT_ID", + @"INSTR", + @"INTERIORRINGN", + @"INTERSECTION", + @"INTERSECTS", + @"INTERVAL", + @"ISCLOSED", + @"ISEMPTY", + @"ISNULL", + @"ISRING", + @"ISSIMPLE", + @"IS_FREE_LOCK", + @"IS_USED_LOCK", + @"LAST_DAY", + @"LAST_INSERT_ID", + @"LCASE", + @"LEAST", + @"LEFT", + @"LENGTH", + @"LINEFROMTEXT", + @"LINEFROMWKB", + @"LINESTRING", + @"LINESTRINGFROMTEXT", + @"LINESTRINGFROMWKB", + @"LN", + @"LOAD_FILE", + @"LOCALTIME", + @"LOCALTIMESTAMP", + @"LOCATE", + @"LOG", + @"LOG10", + @"LOG2", + @"LOWER", + @"LPAD", + @"LTRIM", + @"MAKEDATE", + @"MAKETIME", + @"MAKE_SET", + @"MASTER_POS_WAIT", + @"MAX", + @"MBRCONTAINS", + @"MBRDISJOINT", + @"MBREQUAL", + @"MBRINTERSECTS", + @"MBROVERLAPS", + @"MBRTOUCHES", + @"MBRWITHIN", + @"MD5", + @"MICROSECOND", + @"MID", + @"MIN", + @"MINUTE", + @"MLINEFROMTEXT", + @"MLINEFROMWKB", + @"MOD", + @"MONTH", + @"MONTHNAME", + @"NOW", + @"MPOINTFROMTEXT", + @"MPOINTFROMWKB", + @"MPOLYFROMTEXT", + @"MPOLYFROMWKB", + @"MULTILINESTRING", + @"MULTILINESTRINGFROMTEXT", + @"MULTILINESTRINGFROMWKB", + @"MULTIPOINT", + @"MULTIPOINTFROMTEXT", + @"MULTIPOINTFROMWKB", + @"MULTIPOLYGON", + @"MULTIPOLYGONFROMTEXT", + @"MULTIPOLYGONFROMWKB", + @"NAME_CONST", + @"NOW", + @"NULLIF", + @"NUMGEOMETRIES", + @"NUMINTERIORRINGS", + @"NUMPOINTS", + @"OCT", + @"OCTET_LENGTH", + @"OLD_PASSWORD", + @"ORD", + @"OVERLAPS", + @"PASSWORD", + @"PERIOD_ADD", + @"PERIOD_DIFF", + @"PI", + @"POINT", + @"POINTFROMTEXT", + @"POINTFROMWKB", + @"POINTN", + @"POINTONSURFACE", + @"POLYFROMTEXT", + @"POLYFROMWKB", + @"POLYGON", + @"POLYGONFROMTEXT", + @"POLYGONFROMWKB", + @"POSITION", + @"POW", + @"POWER", + @"QUARTER", + @"QUOTE", + @"RADIANS", + @"RAND", + @"RELATED", + @"RELEASE_LOCK", + @"REPEAT", + @"REPLACE", + @"REVERSE", + @"RIGHT", + @"ROUND", + @"ROW_COUNT", + @"RPAD", + @"RTRIM", + @"SCHEMA", + @"SECOND", + @"SEC_TO_TIME", + @"SESSION_USER", + @"SHA", + @"SHA1", + @"SIGN", + @"SIN", + @"SLEEP", + @"SOUNDEX", + @"SPACE", + @"SQRT", + @"SRID", + @"STARTPOINT", + @"STD", + @"STDDEV", + @"STDDEV_POP", + @"STDDEV_SAMP", + @"STRCMP", + @"STR_TO_DATE", + @"SUBDATE", + @"SUBSTR", + @"SUBSTRING", + @"SUBSTRING_INDEX", + @"SUBTIME", + @"SUM", + @"SYMDIFFERENCE", + @"SYSDATE", + @"SYSTEM_USER", + @"TAN", + @"TIME", + @"TIMEDIFF", + @"TIMESTAMP", + @"TIMESTAMPADD", + @"TIMESTAMPDIFF", + @"TIME_FORMAT", + @"TIME_TO_SEC", + @"TOUCHES", + @"TO_DAYS", + @"TRIM", + @"TRUNCATE", + @"UCASE", + @"UNCOMPRESS", + @"UNCOMPRESSED_LENGTH", + @"UNHEX", + @"UNIQUE_USERS", + @"UNIX_TIMESTAMP", + @"UPDATEXML", + @"UPPER", + @"USER", + @"UTC_DATE", + @"UTC_TIME", + @"UTC_TIMESTAMP", + @"UUID", + @"VARIANCE", + @"VAR_POP", + @"VAR_SAMP", + @"VERSION", + @"WEEK", + @"WEEKDAY", + @"WEEKOFYEAR", + @"WITHIN", + @"YEAR", + @"YEARWEEK", + nil]; } |