annotate runtime/syntax/sqlhana.vim @ 6140:cb3218a69c2f v7.4.408

updated for version 7.4.408 Problem: Visual block insert breaks a multi-byte character. Solution: Calculate the position properly. (Yasuhiro Matsumoto)
author Bram Moolenaar <bram@vim.org>
date Sat, 16 Aug 2014 18:36:43 +0200
parents c53344bacabf
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3920
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 " Vim syntax file
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2 " Language: SQL, SAP HANA In Memory Database
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 " Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4 " Last Change: 2012 Oct 23
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5 " Version: SP4 b (Q2 2012)
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6 " Homepage: http://www.vim.org/scripts/script.php?script_id=4275
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 " Description: Updated to SAP HANA SP4
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 "
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 " For version 5.x: Clear all syntax items
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 " For version 6.x: Quit when a syntax file was already loaded
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12 if version < 600
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 syntax clear
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 elseif exists("b:current_syntax")
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 finish
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 endif
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 syn case ignore
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 " The SQL reserved words, defined as keywords.
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 " These were pulled from the following SQL reference:
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 " http://help.sap.com/hana/hana_sql_en.pdf
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 " An easy approach is to copy all text from the PDF
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 " into a Vim buffer. The keywords are in UPPER case,
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 " so you can run the following commands to be left with
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 " mainly the UPPER case words:
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 " 1. Delete all words that do not begin with a Capital
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 " %s/\(\<[^A-Z]\w*\>\)//g
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 " 2. Remove all words where the 2nd letter is not a Capital
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 " %s/\(\<[A-Z][^A-Z]\w*\>\)//g
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 " 3. Remove all non-word (or space) characters
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 " %s/[^0-9A-Za-z_ ]*//g
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 " 4. Remove some known words
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 " %s/\<\(SAP\|HANA\|OK\|AG\|IBM\|DB2\|AIX\|POWER\d\+\|UNIX\)\>//g
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 " 5. Remove blank lines and trailing spaces
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 " %s/\s\+$//g
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37 " %s/^\s\+//g
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
38 " %s/^$\n//g
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
39 " 6. Convert spaces to newlines remove single character
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
40 " %s/[ ]\+/\r/g
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
41 " %g/^\w$/d
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42 " 7. Sort and remove duplicates
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43 " :sort
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
44 " :Uniq
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
45 " 8. Use the WhatsMissing plugin against the sqlhana.vim file.
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
46 " 9. Generated a file of all UPPER cased words which should not
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
47 " be in the syntax file. These items should be removed
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
48 " from the list in step 7. You can use WhatsNotMissing
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
49 " between step 7 and this new file to weed out the words
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
50 " we know are not syntax related.
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
51 " 10. Use the WhatsMissingRemoveMatches to remove the words
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
52 " from step 9.
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
53
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
54 syn keyword sqlSpecial false null true
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
55
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
56 " Supported Functions for Date/Time types
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
57 syn keyword sqlFunction ADD_DAYS ADD_MONTHS ADD_SECONDS ADD_YEARS COALESCE
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
58 syn keyword sqlFunction CURRENT_DATE CURRENT_TIME CURRENT_TIMESTAMP CURRENT_UTCDATE
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
59 syn keyword sqlFunction CURRENT_UTCTIME CURRENT_UTCTIMESTAMP
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
60 syn keyword sqlFunction DAYNAME DAYOFMONTH DAYOFYEAR DAYS_BETWEEN EXTRACT
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
61 syn keyword sqlFunction GREATEST HOUR IFNULL ISOWEEK LAST_DAY LEAST LOCALTOUTC
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
62 syn keyword sqlFunction MINUTE MONTH MONTHNAME NEXT_DAY NOW QUARTER SECOND
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
63 syn keyword sqlFunction SECONDS_BETWEEN UTCTOLOCAL WEEK WEEKDAY YEAR
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
64
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
65 syn keyword sqlFunction TO_CHAR TO_DATE TO_DATS TO_NCHAR TO_TIME TO_TIMESTAMP UTCTOLOCAL
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
66
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
67 " Aggregate
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
68 syn keyword sqlFunction COUNT MIN MAX SUM AVG STDDEV VAR
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
69
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
70 " Datatype conversion
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
71 syn keyword sqlFunction CAST TO_ALPHANUM TO_BIGINT TO_BINARY TO_BLOB TO_CHAR TO_CLOB
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
72 syn keyword sqlFunction TO_DATE TO_DATS TO_DECIMAL TO_DOUBLE TO_INT TO_INTEGER TO_NCHAR
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
73 syn keyword sqlFunction TO_NCLOB TO_NVARCHAR TO_REAL TO_SECONDDATE TO_SMALLDECIMAL
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
74 syn keyword sqlFunction TO_SMALLINT TO_TIME TO_TIMESTAMP TO_TINYINT TO_VARCHAR TO_VARBINARY
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
75
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
76 " Number functions
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
77 syn keyword sqlFunction ABS ACOS ASIN ATAN ATAN2 BINTOHEX BITAND CEIL COS COSH COT
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
78 syn keyword sqlFunction EXP FLOOR GREATEST HEXTOBIN LEAST LN LOG MOD POWER ROUND
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
79 syn keyword sqlFunction SIGN SIN SINH SQRT TAN TANH UMINUS
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
80
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
81 " String functions
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
82 syn keyword sqlFunction ASCII CHAR CONCAT LCASE LENGTH LOCATE LOWER LPAD LTRIM
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
83 syn keyword sqlFunction NCHAR REPLACE RPAD RTRIM SUBSTR_AFTER SUBSTR_BEFORE
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
84 syn keyword sqlFunction SUBSTRING TRIM UCASE UNICODE UPPER
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
85
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
86 " Miscellaneous functions
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
87 syn keyword sqlFunction COALESCE CURRENT_CONNECTION CURRENT_SCHEMA CURRENT_USER
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
88 syn keyword sqlFunction GROUPING_ID IFNULL MAP NULLIF SESSION_CONTEXT SESSION_USER SYSUUIDSQL
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
89 syn keyword sqlFunction GET_NUM_SERVERS
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
90
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
91
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
92 " sp_ procedures
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
93 " syn keyword sqlFunction sp_addalias
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
94
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
95
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
96 " Reserved keywords
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
97 syn keyword sqlkeyword ALL AS AT BEFORE
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
98 syn keyword sqlkeyword BEGIN BOTH BY
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
99 syn keyword sqlkeyword CONDITION
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
100 syn keyword sqlkeyword CURRVAL CURSOR DECLARE
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
101 syn keyword sqlkeyword DISTINCT DO ELSE ELSEIF ELSIF
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
102 syn keyword sqlkeyword END EXCEPTION EXEC
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
103 syn keyword sqlkeyword FOR FROM GROUP
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
104 syn keyword sqlkeyword HAVING IN
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
105 syn keyword sqlkeyword INOUT INTO IS
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
106 syn keyword sqlkeyword LEADING
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
107 syn keyword sqlkeyword LOOP MINUS NATURAL NEXTVAL
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
108 syn keyword sqlkeyword OF ON ORDER OUT
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
109 syn keyword sqlkeyword PRIOR RETURN RETURNS REVERSE
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
110 syn keyword sqlkeyword ROWID SELECT
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
111 syn keyword sqlkeyword SQL START STOP SYSDATE
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
112 syn keyword sqlkeyword SYSTIME SYSTIMESTAMP SYSUUID
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
113 syn keyword sqlkeyword TRAILING USING UTCDATE
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
114 syn keyword sqlkeyword UTCTIME UTCTIMESTAMP VALUES
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
115 syn keyword sqlkeyword WHILE
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
116 syn keyword sqlkeyword ANY SOME EXISTS ESCAPE
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
117
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
118 " IF keywords
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
119 syn keyword sqlkeyword IF
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
120
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
121 " CASE keywords
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
122 syn keyword sqlKeyword WHEN THEN
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
123
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
124 " Syntax rules common to TEXT and SHORTTEXT keywords
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
125 syn keyword sqlKeyword LANGUAGE DETECTION LINGUISTIC
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
126 syn keyword sqlkeyword MIME TYPE
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
127 syn keyword sqlkeyword EXACT WEIGHT FUZZY FUZZINESSTHRESHOLD SEARCH
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
128 syn keyword sqlkeyword PHRASE INDEX RATIO REBUILD
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
129 syn keyword sqlkeyword CONFIGURATION
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
130 syn keyword sqlkeyword SEARCH ONLY
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
131 syn keyword sqlkeyword FAST PREPROCESS
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
132 syn keyword sqlkeyword SYNC SYNCHRONOUS ASYNC ASYNCHRONOUS FLUSH QUEUE
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
133 syn keyword sqlkeyword EVERY AFTER MINUTES DOCUMENTS SUSPEND
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
134
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
135 " Statement keywords (i.e. after ALTER or CREATE)
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
136 syn keyword sqlkeyword AUDIT POLICY
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
137 syn keyword sqlkeyword FULLTEXT
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
138 syn keyword sqlkeyword SEQUENCE RESTART
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
139 syn keyword sqlkeyword TABLE
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
140 syn keyword sqlkeyword PROCEDURE STATISTICS
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
141 syn keyword sqlkeyword SCHEMA
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
142 syn keyword sqlkeyword SYNONYM
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
143 syn keyword sqlkeyword VIEW
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
144 syn keyword sqlkeyword COLUMN
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
145 syn keyword sqlkeyword SYSTEM LICENSE
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
146 syn keyword sqlkeyword SESSION
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
147 syn keyword sqlkeyword CANCEL WORK
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
148 syn keyword sqlkeyword PLAN CACHE
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
149 syn keyword sqlkeyword LOGGING NOLOGGING RETENTION
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
150 syn keyword sqlkeyword RECONFIGURE SERVICE
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
151 syn keyword sqlkeyword RESET MONITORING
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
152 syn keyword sqlkeyword SAVE DURATION PERFTRACE FUNCTION_PROFILER
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
153 syn keyword sqlkeyword SAVEPOINT
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
154 syn keyword sqlkeyword USER
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
155 syn keyword sqlkeyword ROLE
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
156 syn keyword sqlkeyword ASC DESC
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
157 syn keyword sqlkeyword OWNED
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
158 syn keyword sqlkeyword DEPENDENCIES SCRAMBLE
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
159
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
160 " Create sequence
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
161 syn keyword sqlkeyword INCREMENT MAXVALUE MINVALUE CYCLE
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
162
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
163 " Create table
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
164 syn keyword sqlkeyword HISTORY GLOBAL LOCAL TEMPORARY
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
165
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
166 " Create trigger
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
167 syn keyword sqlkeyword TRIGGER REFERENCING EACH DEFAULT
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
168 syn keyword sqlkeyword SIGNAL RESIGNAL MESSAGE_TEXT OLD NEW
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
169 syn keyword sqlkeyword EXIT HANDLER SQL_ERROR_CODE
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
170 syn keyword sqlkeyword TARGET CONDITION SIGNAL
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
171
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
172 " Alter table
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
173 syn keyword sqlkeyword ADD DROP MODIFY GENERATED ALWAYS
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
174 syn keyword sqlkeyword UNIQUE BTREE CPBTREE PRIMARY KEY
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
175 syn keyword sqlkeyword CONSTRAINT PRELOAD NONE
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
176 syn keyword sqlkeyword ROW THREADS BATCH
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
177 syn keyword sqlkeyword MOVE PARTITION TO LOCATION PHYSICAL OTHERS
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
178 syn keyword sqlkeyword ROUNDROBIN PARTITIONS HASH RANGE VALUE
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
179 syn keyword sqlkeyword PERSISTENT DELTA AUTO AUTOMERGE
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
180
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
181 " Create audit policy
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
182 syn keyword sqlkeyword AUDITING SUCCESSFUL UNSUCCESSFUL
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
183 syn keyword sqlkeyword PRIVILEGE STRUCTURED CHANGE LEVEL
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
184 syn keyword sqlkeyword EMERGENCY ALERT CRITICAL WARNING INFO
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
185
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
186 " Privileges
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
187 syn keyword sqlkeyword DEBUG EXECUTE
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
188
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
189 " Schema
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
190 syn keyword sqlkeyword CASCADE RESTRICT PARAMETERS SCAN
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
191
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
192 " Traces
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
193 syn keyword sqlkeyword CLIENT CRASHDUMP EMERGENCYDUMP
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
194 syn keyword sqlkeyword INDEXSERVER NAMESERVER DAEMON
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
195 syn keyword sqlkeyword CLEAR REMOVE TRACES
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
196
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
197 " Reclaim
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
198 syn keyword sqlkeyword RECLAIM DATA VOLUME VERSION SPACE DEFRAGMENT SPARSIFY
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
199
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
200 " Join
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
201 syn keyword sqlkeyword INNER OUTER LEFT RIGHT FULL CROSS JOIN
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
202 syn keyword sqlkeyword GROUPING SETS ROLLUP CUBE
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
203 syn keyword sqlkeyword BEST LIMIT OFFSET
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
204 syn keyword sqlkeyword WITH SUBTOTAL BALANCE TOTAL
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
205 syn keyword sqlkeyword TEXT_FILTER FILL UP SORT MATCHES TOP
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
206 syn keyword sqlkeyword RESULT OVERVIEW PREFIX MULTIPLE RESULTSETS
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
207
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
208 " Lock
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
209 syn keyword sqlkeyword EXCLUSIVE MODE NOWAIT
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
210
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
211 " Transaction
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
212 syn keyword sqlkeyword TRANSACTION ISOLATION READ COMMITTED
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
213 syn keyword sqlkeyword REPEATABLE SERIALIZABLE WRITE
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
214
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
215 " Saml
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
216 syn keyword sqlkeyword SAML ASSERTION PROVIDER SUBJECT ISSUER
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
217
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
218 " User
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
219 syn keyword sqlkeyword PASSWORD IDENTIFIED EXTERNALLY ATTEMPTS ATTEMPTS
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
220 syn keyword sqlkeyword ENABLE DISABLE OFF LIFETIME FORCE DEACTIVATE
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
221 syn keyword sqlkeyword ACTIVATE IDENTITY KERBEROS
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
222
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
223 " Grant
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
224 syn keyword sqlkeyword ADMIN BACKUP CATALOG SCENARIO INIFILE MONITOR
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
225 syn keyword sqlkeyword OPTIMIZER OPTION
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
226 syn keyword sqlkeyword RESOURCE STRUCTUREDPRIVILEGE TRACE
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
227
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
228 " Import
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
229 syn keyword sqlkeyword CSV FILE CONTROL NO CHECK SKIP FIRST LIST
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
230 syn keyword sqlkeyword RECORD DELIMITED FIELD OPTIONALLY ENCLOSED FORMAT
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
231
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
232 " Roles
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
233 syn keyword sqlkeyword PUBLIC CONTENT_ADMIN MODELING MONITORING
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
234
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
235 " Miscellaneous
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
236 syn keyword sqlkeyword APPLICATION BINARY IMMEDIATE COREFILE SECURITY DEFINER
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
237 syn keyword sqlkeyword DUMMY INVOKER MATERIALIZED MESSEGE_TEXT PARAMETER PARAMETERS
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
238 syn keyword sqlkeyword PART
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
239 syn keyword sqlkeyword CONSTANT SQLEXCEPTION SQLWARNING
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
240
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
241 syn keyword sqlOperator WHERE BETWEEN LIKE NULL CONTAINS
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
242 syn keyword sqlOperator AND OR NOT CASE
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
243 syn keyword sqlOperator UNION INTERSECT EXCEPT
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
244
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
245 syn keyword sqlStatement ALTER CALL CALLS CREATE DROP RENAME TRUNCATE
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
246 syn keyword sqlStatement DELETE INSERT UPDATE EXPLAIN
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
247 syn keyword sqlStatement MERGE REPLACE UPSERT SELECT
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
248 syn keyword sqlStatement SET UNSET LOAD UNLOAD
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
249 syn keyword sqlStatement CONNECT DISCONNECT COMMIT LOCK ROLLBACK
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
250 syn keyword sqlStatement GRANT REVOKE
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
251 syn keyword sqlStatement EXPORT IMPORT
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
252
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
253
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
254 syn keyword sqlType DATE TIME SECONDDATE TIMESTAMP TINYINT SMALLINT
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
255 syn keyword sqlType INT INTEGER BIGINT SMALLDECIMAL DECIMAL
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
256 syn keyword sqlType REAL DOUBLE FLOAT
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
257 syn keyword sqlType VARCHAR NVARCHAR ALPHANUM SHORTTEXT VARBINARY
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
258 syn keyword sqlType BLOB CLOB NCLOB TEXT DAYDATE
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
259
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
260 syn keyword sqlOption Webservice_namespace_host
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
261
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
262 " Strings and characters:
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
263 syn region sqlString start=+"+ end=+"+ contains=@Spell
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
264 syn region sqlString start=+'+ end=+'+ contains=@Spell
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
265
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
266 " Numbers:
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
267 syn match sqlNumber "-\=\<\d*\.\=[0-9_]\>"
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
268
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
269 " Comments:
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
270 syn region sqlDashComment start=/--/ end=/$/ contains=@Spell
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
271 syn region sqlSlashComment start=/\/\// end=/$/ contains=@Spell
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
272 syn region sqlMultiComment start="/\*" end="\*/" contains=sqlMultiComment,@Spell
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
273 syn cluster sqlComment contains=sqlDashComment,sqlSlashComment,sqlMultiComment,@Spell
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
274 syn sync ccomment sqlComment
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
275 syn sync ccomment sqlDashComment
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
276 syn sync ccomment sqlSlashComment
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
277
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
278 hi def link sqlDashComment Comment
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
279 hi def link sqlSlashComment Comment
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
280 hi def link sqlMultiComment Comment
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
281 hi def link sqlNumber Number
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
282 hi def link sqlOperator Operator
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
283 hi def link sqlSpecial Special
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
284 hi def link sqlKeyword Keyword
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
285 hi def link sqlStatement Statement
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
286 hi def link sqlString String
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
287 hi def link sqlType Type
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
288 hi def link sqlFunction Function
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
289 hi def link sqlOption PreProc
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
290
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
291 let b:current_syntax = "sqlhana"
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
292
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
293 " vim:sw=4: