~ubuntu-branches/ubuntu/utopic/python-chaco/utopic

« back to all changes in this revision

Viewing changes to docs/scipy_tutorial/Scripts/shBrushSql.js

  • Committer: Package Import Robot
  • Author(s): Andrew Starr-Bochicchio
  • Date: 2014-06-01 17:04:08 UTC
  • mfrom: (7.2.5 sid)
  • Revision ID: package-import@ubuntu.com-20140601170408-m86xvdjd83a4qon0
Tags: 4.4.1-1ubuntu1
* Merge from Debian unstable. Remaining Ubuntu changes:
 - Let the binary-predeb target work on the usr/lib/python* directory
   as we don't have usr/share/pyshared anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
dp.sh.Brushes.Sql = function()
2
 
{
3
 
        var funcs       =       'abs avg case cast coalesce convert count current_timestamp ' +
4
 
                                        'current_user day isnull left lower month nullif replace right ' +
5
 
                                        'session_user space substring sum system_user upper user year';
6
 
 
7
 
        var keywords =  'absolute action add after alter as asc at authorization begin bigint ' +
8
 
                                        'binary bit by cascade char character check checkpoint close collate ' +
9
 
                                        'column commit committed connect connection constraint contains continue ' +
10
 
                                        'create cube current current_date current_time cursor database date ' +
11
 
                                        'deallocate dec decimal declare default delete desc distinct double drop ' +
12
 
                                        'dynamic else end end-exec escape except exec execute false fetch first ' +
13
 
                                        'float for force foreign forward free from full function global goto grant ' +
14
 
                                        'group grouping having hour ignore index inner insensitive insert instead ' +
15
 
                                        'int integer intersect into is isolation key last level load local max min ' +
16
 
                                        'minute modify move name national nchar next no numeric of off on only ' +
17
 
                                        'open option order out output partial password precision prepare primary ' +
18
 
                                        'prior privileges procedure public read real references relative repeatable ' +
19
 
                                        'restrict return returns revoke rollback rollup rows rule schema scroll ' +
20
 
                                        'second section select sequence serializable set size smallint static ' +
21
 
                                        'statistics table temp temporary then time timestamp to top transaction ' +
22
 
                                        'translation trigger true truncate uncommitted union unique update values ' +
23
 
                                        'varchar varying view when where with work';
24
 
 
25
 
        var operators = 'all and any between cross in join like not null or outer some';
26
 
 
27
 
        this.regexList = [
28
 
                { regex: new RegExp('--(.*)$', 'gm'),                                           css: 'comment' },                       // one line and multiline comments
29
 
                { regex: dp.sh.RegexLib.DoubleQuotedString,                                     css: 'string' },                        // double quoted strings
30
 
                { regex: dp.sh.RegexLib.SingleQuotedString,                                     css: 'string' },                        // single quoted strings
31
 
                { regex: new RegExp(this.GetKeywords(funcs), 'gmi'),            css: 'func' },                          // functions
32
 
                { regex: new RegExp(this.GetKeywords(operators), 'gmi'),        css: 'op' },                            // operators and such
33
 
                { regex: new RegExp(this.GetKeywords(keywords), 'gmi'),         css: 'keyword' }                        // keyword
34
 
                ];
35
 
 
36
 
        this.CssClass = 'dp-sql';
37
 
}
38
 
 
39
 
dp.sh.Brushes.Sql.prototype     = new dp.sh.Highlighter();
40
 
dp.sh.Brushes.Sql.Aliases       = ['sql'];