Merge branch '2.0'
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / js / 3rdParty / codemirror / mode / sql / index.html
1 <!doctype html>
2
3 <title>CodeMirror: SQL Mode for CodeMirror</title>
4 <meta charset="utf-8"/>
5 <link rel=stylesheet href="../../doc/docs.css">
6
7 <link rel="stylesheet" href="../../lib/codemirror.css" />
8 <script src="../../lib/codemirror.js"></script>
9 <script src="sql.js"></script>
10 <style>
11 .CodeMirror {
12 border-top: 1px solid black;
13 border-bottom: 1px solid black;
14 }
15 </style>
16 <div id=nav>
17 <a href="http://codemirror.net"><img id=logo src="../../doc/logo.png"></a>
18
19 <ul>
20 <li><a href="../../index.html">Home</a>
21 <li><a href="../../doc/manual.html">Manual</a>
22 <li><a href="https://github.com/marijnh/codemirror">Code</a>
23 </ul>
24 <ul>
25 <li><a href="../index.html">Language modes</a>
26 <li><a class=active href="#">SQL Mode for CodeMirror</a>
27 </ul>
28 </div>
29
30 <article>
31 <h2>SQL Mode for CodeMirror</h2>
32 <form>
33 <textarea id="code" name="code">-- SQL Mode for CodeMirror
34 SELECT SQL_NO_CACHE DISTINCT
35 @var1 AS `val1`, @'val2', @global.'sql_mode',
36 1.1 AS `float_val`, .14 AS `another_float`, 0.09e3 AS `int_with_esp`,
37 0xFA5 AS `hex`, x'fa5' AS `hex2`, 0b101 AS `bin`, b'101' AS `bin2`,
38 DATE '1994-01-01' AS `sql_date`, { T "1994-01-01" } AS `odbc_date`,
39 'my string', _utf8'your string', N'her string',
40 TRUE, FALSE, UNKNOWN
41 FROM DUAL
42 -- space needed after '--'
43 # 1 line comment
44 /* multiline
45 comment! */
46 LIMIT 1 OFFSET 0;
47 </textarea>
48 </form>
49 <p><strong>MIME types defined:</strong>
50 <code><a href="?mime=text/x-sql">text/x-sql</a></code>,
51 <code><a href="?mime=text/x-mysql">text/x-mysql</a></code>,
52 <code><a href="?mime=text/x-mariadb">text/x-mariadb</a></code>,
53 <code><a href="?mime=text/x-cassandra">text/x-cassandra</a></code>,
54 <code><a href="?mime=text/x-plsql">text/x-plsql</a></code>,
55 <code><a href="?mime=text/x-mssql">text/x-mssql</a></code>,
56 <code><a href="?mime=text/x-hive">text/x-hive</a></code>.
57 </p>
58 <script>
59 window.onload = function() {
60 var mime = 'text/x-mariadb';
61 // get mime type
62 if (window.location.href.indexOf('mime=') > -1) {
63 mime = window.location.href.substr(window.location.href.indexOf('mime=') + 5);
64 }
65 window.editor = CodeMirror.fromTextArea(document.getElementById('code'), {
66 mode: mime,
67 indentWithTabs: true,
68 smartIndent: true,
69 lineNumbers: true,
70 matchBrackets : true,
71 autofocus: true
72 });
73 };
74 </script>
75
76 </article>