acf60b88c3a0ea33e4b1118d90270fd2a00274f3
[myslice.git] / third-party / codemirror-3.15 / mode / sql / index.html
1 <!doctype html>
2 <html>
3     <head>
4         <meta charset="utf-8">
5         <title>SQL Mode for CodeMirror</title>
6         <link rel="stylesheet" href="../../lib/codemirror.css" />
7         <script src="../../lib/codemirror.js"></script>
8         <script src="sql.js"></script>
9         <style>
10 .CodeMirror {
11     border-top: 1px solid black;
12     border-bottom: 1px solid black;
13 }
14         </style>
15         <link rel="stylesheet" href="../../doc/docs.css">
16         <script>
17 var init = function() {
18     var mime = 'text/x-mariadb';
19
20     // get mime type
21     if (window.location.href.indexOf('mime=') > -1) {
22         mime = window.location.href.substr(window.location.href.indexOf('mime=') + 5);
23     }
24
25     window.editor = CodeMirror.fromTextArea(document.getElementById('code'), {
26         mode: mime,
27         indentWithTabs: true,
28         smartIndent: true,
29         lineNumbers: true,
30         matchBrackets : true,
31         autofocus: true
32     });
33 };
34         </script>
35     </head>
36     <body onload="init();">
37         <h1>SQL Mode for CodeMirror</h1>
38         <form>
39             <textarea id="code" name="code">-- SQL Mode for CodeMirror
40 SELECT SQL_NO_CACHE DISTINCT
41                 @var1 AS `val1`, @'val2', @global.'sql_mode',
42                 1.1 AS `float_val`, .14 AS `another_float`, 0.09e3 AS `int_with_esp`,
43                 0xFA5 AS `hex`, x'fa5' AS `hex2`, 0b101 AS `bin`, b'101' AS `bin2`,
44                 DATE '1994-01-01' AS `sql_date`, { T "1994-01-01" } AS `odbc_date`,
45                 'my string', _utf8'your string', N'her string',
46         TRUE, FALSE, UNKNOWN
47         FROM DUAL
48         -- space needed after '--'
49         # 1 line comment
50         /* multiline
51         comment! */
52         LIMIT 1 OFFSET 0;
53 </textarea>
54             </form>
55             <p><strong>MIME types defined:</strong> 
56             <code><a href="?mime=text/x-sql">text/x-sql</a></code>,
57             <code><a href="?mime=text/x-mysql">text/x-mysql</a></code>,
58             <code><a href="?mime=text/x-mariadb">text/x-mariadb</a></code>,
59             <code><a href="?mime=text/x-cassandra">text/x-cassandra</a></code>,
60             <code><a href="?mime=text/x-plsql">text/x-plsql</a></code>.
61         </p>
62         <p>
63             <strong>Tests:</strong>
64             <a href="../../test/index.html#sql_*">normal</a>,
65             <a href="../../test/index.html#verbose,sql_*">verbose</a>.
66         </p>
67     </body>
68 </html>