aboutsummaryrefslogtreecommitdiff
path: root/imports/codemirror/mode/plsql/index.html
diff options
context:
space:
mode:
authorValerio Virgillito2012-02-14 11:07:21 -0800
committerValerio Virgillito2012-02-14 11:07:21 -0800
commitf060190a3bffd9a16718f2ce0499699103d46372 (patch)
treea308fe7eacec2156c8212dff0892a3de925d5f9a /imports/codemirror/mode/plsql/index.html
parentf766cc203f30ea43ae8b83cf4b65d45cc4435ee9 (diff)
parent33bc9d62b8e6694500bf14d5b18187bd99a520a3 (diff)
downloadninja-f060190a3bffd9a16718f2ce0499699103d46372.tar.gz
Merge branch 'FileIO' of https://github.com/joseeight/ninja-internal into integration
Diffstat (limited to 'imports/codemirror/mode/plsql/index.html')
-rwxr-xr-ximports/codemirror/mode/plsql/index.html62
1 files changed, 62 insertions, 0 deletions
diff --git a/imports/codemirror/mode/plsql/index.html b/imports/codemirror/mode/plsql/index.html
new file mode 100755
index 00000000..be603d99
--- /dev/null
+++ b/imports/codemirror/mode/plsql/index.html
@@ -0,0 +1,62 @@
1<!doctype html>
2<html>
3 <head>
4 <title>CodeMirror: Oracle PL/SQL mode</title>
5 <link rel="stylesheet" href="../../lib/codemirror.css">
6 <script src="../../lib/codemirror.js"></script>
7 <script src="plsql.js"></script>
8 <link rel="stylesheet" href="../../doc/docs.css">
9 <style>.CodeMirror {border: 2px inset #dee;}</style>
10 </head>
11 <body>
12 <h1>CodeMirror: Oracle PL/SQL mode</h1>
13
14<form><textarea id="code" name="code">
15-- Oracle PL/SQL Code Demo
16/*
17 based on c-like mode, adapted to PL/SQL by Peter Raganitsch ( http://www.oracle-and-apex.com/ )
18 April 2011
19*/
20DECLARE
21 vIdx NUMBER;
22 vString VARCHAR2(100);
23 cText CONSTANT VARCHAR2(100) := 'That''s it! Have fun with CodeMirror 2';
24BEGIN
25 vIdx := 0;
26 --
27 FOR rDATA IN
28 ( SELECT *
29 FROM EMP
30 ORDER BY EMPNO
31 )
32 LOOP
33 vIdx := vIdx + 1;
34 vString := rDATA.EMPNO || ' - ' || rDATA.ENAME;
35 --
36 UPDATE EMP
37 SET SAL = SAL * 101/100
38 WHERE EMPNO = rDATA.EMPNO
39 ;
40 END LOOP;
41 --
42 SYS.DBMS_OUTPUT.Put_Line (cText);
43END;
44--
45</textarea></form>
46
47 <script>
48 var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
49 lineNumbers: true,
50 matchBrackets: true,
51 indentUnit: 4,
52 mode: "text/x-plsql"
53 });
54 </script>
55
56 <p>
57 Simple mode that handles Oracle PL/SQL language (and Oracle SQL, of course).
58 </p>
59
60 <p><strong>MIME type defined:</strong> <code>text/x-plsql</code>
61 (PLSQL code)
62</html>