PageSourceSearch

https://wild-cards.net/wc/wp-content/plugins/syntaxhighlighter/syn…/scripts/shBrushSql.js?ver=2.1.364

js wild-cards.net collected 2026-10-03 22:10:56 UTC 3,576 bytes, 68 lines download raw bytes

1/**
2 * SyntaxHighlighter
3 * http://alexgorbatchev.com/
4 *
5 * SyntaxHighlighter is donationware. If you are using it, please donate.
6 * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
7 *
8 * @version
9 * 2.1.364 (October 15 2009)
10 * 
11 * @copyright
12 * Copyright (C) 2004-2009 Alex Gorbatchev.
13 *
14 * @license
15 * This file is part of SyntaxHighlighter.
16 * 
17 * SyntaxHighlighter is free software: you can redistribute it and/or modify
18 * it under the terms of the GNU Lesser General Public License as published by
19 * the Free Software Foundation, either version 3 of the License, or
20 * (at your option) any later version.
21 * 
22 * SyntaxHighlighter is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25 * GNU General Public License for more details.
26 * 
27 * You should have received a copy of the GNU General Public License
28 * along with SyntaxHighlighter.  If not, see <http://www.gnu.org/copyleft/lesser.html>.
29 */
30SyntaxHighlighter.brushes.Sql = function()
31{
32	var funcs	=	'abs avg case cast coalesce convert count current_timestamp ' +
33					'current_user day isnull left lower month nullif replace right ' +
34					'session_user space substring sum system_user upper user year';
35
36	var keywords =	'absolute action add after alter as asc at authorization begin bigint ' +
37					'binary bit by cascade char character check checkpoint close collate ' +
38					'column commit committed connect connection constraint contains continue ' +
39					'create cube current current_date current_time cursor database date ' +
40					'deallocate dec decimal declare default delete desc distinct double drop ' +
41					'dynamic else end end-exec escape except exec execute false fetch first ' +
42					'float for force foreign forward free from full function global goto grant ' +
43					'group grouping having hour ignore index inner insensitive insert instead ' +
44					'int integer intersect into is isolation key last level load local max min ' +
45					'minute modify move name national nchar next no numeric of off on only ' +
46					'open option order out output partial password precision prepare primary ' +
47					'prior privileges procedure public read real references relative repeatable ' +
48					'restrict return returns revoke rollback rollup rows rule schema scroll ' +
49					'second section select sequence serializable set size smallint static ' +
50					'statistics table temp temporary then time timestamp to top transaction ' +
51					'translation trigger true truncate uncommitted union unique update values ' +
52					'varchar varying view when where with work';
53
54	var operators =	'all and any between cross in join like not null or outer some';
55
56	this.regexList = [
57		{ regex: /--(.*)$/gm,												css: 'comments' },			// one line and multiline comments
58		{ regex: SyntaxHighlighter.regexLib.multiLineDoubleQuotedString,	css: 'string' },			// double quoted strings
59		{ regex: SyntaxHighlighter.regexLib.multiLineSingleQuotedString,	css: 'string' },			// single quoted strings
60		{ regex: new RegExp(this.getKeywords(funcs), 'gmi'),				css: 'color2' },			// functions
61		{ regex: new RegExp(this.getKeywords(operators), 'gmi'),			css: 'color1' },			// operators and such
62		{ regex: new RegExp(this.getKeywords(keywords), 'gmi'),				css: 'keyword' }			// keyword
63		];
64};
65
66SyntaxHighlighter.brushes.Sql.prototype	= new SyntaxHighlighter.Highlighter();
67SyntaxHighlighter.brushes.Sql.aliases	= ['sql'];
68

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.