jablonka.czprosek.czf

websvn

Subversion Repositories:
[/] [templates/] [calm/] [star-light/] [star-tsql.htc] - Rev 6 Go to most recent revision

Compare with Previous - Blame - Download


<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
    star-light - version 1.0.3 (2005/06/24)
    Copyright 2005, Dean Edwards
    License: http://creativecommons.org/licenses/LGPL/2.1/
-->

<!-- SQL module by Rob Eberhardt -->

<public:component xmlns:public="urn:HTMLComponent" lightweight="true">
<public:attach event="ondocumentready" handler="init"/>
<script type="text/javascript">
//<![CDATA[

var KEYWORDS =
        "ADD|ALL|ALTER|AND|ANY|AS|ASC|AUTHORIZATION|BACKUP|BEGIN|BETWEEN|BREAK|BROWSE|BULK|BY|CASCADE|CASE|CHECK|CHECKPOINT|COALESCE|" +
        "COLLATE|COLUMN|COMMIT|COMPUTE|CONSTRAINT|CONTAINS|CLOSE|CLUSTERED|CONTAINSTABLE|CONTINUE|CONVERT|CREATE|CROSS|CURRENT|" +
        "CURRENT_DATE|CURRENT_TIME|CURRENT_TIMESTAMP|CURRENT_USER|CURSOR|DATABASE|DBCC|DEALLOCATE|DECLARE|DEFAULT|DELETE|DENY|DESC|" +
        "DISK|DISTINCT|DISTRIBUTED|DOUBLE|DROP|DUMMY|DUMP|ELSE|END|ERRLVL|ESCAPE|EXCEPT|EXEC|EXECUTE|EXISTS|EXIT|" +
        "FETCH|FILE|FILLFACTOR|FOR|FOREIGN|FREETEXT|FREETEXTTABLE|FROM|FULL|FUNCTION|GOTO|GRANT|GROUP|HAVING|HOLDLOCK|" +
        "IDENTITY|IDENTITY_INSERT|IDENTITYCOL|IF|IN|INDEX|INNER|INSERT|INTERSECT|INTO|IS|JOIN|KEY|KILL|LEFT|LIKE|LINENO|LOAD|" +
        "NATIONAL|NOCHECK|NONCLUSTERED|NOT|NULL|NULLIF|OF|OFF|OFFSETS|ON|OPEN|OPENDATASOURCE|OPENQUERY|OPENROWSET|OPENXML|OPTION|OR|" +
        "ORDER|OUTER|OVER|PERCENT|PLAN|PRECISION|PRIMARY|PRINT|PROC|PROCEDURE|PUBLIC|RAISERROR|READ|READTEXT|RECONFIGURE|REFERENCES|" +
        "REPLICATION|RESTORE|RESTRICT|RETURN|REVOKE|RIGHT|ROLLBACK|ROWCOUNT|ROWGUIDCOL|RULE|SAVE|SCHEMA|SELECT|SESSION_USER|SET|" +
        "SETUSER|SHUTDOWN|SOME|STATISTICS|SYSTEM_USER|TABLE|TEXTSIZE|THEN|TO|TOP|TRAN|TRANSACTION|TRIGGER|TRUNCATE|TSEQUAL|" +
        "UNION|UNIQUE|UPDATE|UPDATETEXT|USE|USER|VALUES|VARYING|VIEW|WAITFOR|WHEN|WHERE|WHILE|WITH|WRITETEXT";

var DATA_TYPES =
        "bigint|int|smallint|tinyint|bit|decimal|numeric|money|smallmoney|float|real|datetime|smalldatetime|char|varchar|text" +
        "nchar|nvarchar|ntext|binary|varbinary|image|cursor|sql_variant|table|timestamp|uniqueidentifier";

var GLOBAL =
        "@@DATEFIRST|@@DBTS|@@LANGID|@@LANGUAGE|@@LOCK_TIMEOUT|@@MAX_CONNECTIONS|@@MAX_PRECISION|@@NESTLEVEL|@@OPTIONS|@@REMSERVER|@@SERVERNAME|@@SERVICENAME|@@SPID|@@TEXTSIZE|@@VERSION|" +
        "@@CURSOR_ROWS|CURSOR_STATUS|@@FETCH_STATUS|" +
        "DATEADD|DATEDIFF|DATENAME|DATEPART|DAY|GETDATE|GETUTCDATE|MONTH|YEAR|" +
        "ABS|DEGREES|RAND|ACOS|EXP|ROUND|ASIN|FLOOR|SIGN|ATAN|LOG|SIN|ATN2|LOG10|SQUARE|CEILING|PI|SQRT|COS|POWER|TAN|COT|RADIANS|" +
        "COL_LENGTH|fn_listextendedproperty|COL_NAME|FULLTEXTCATALOGPROPERTY|COLUMNPROPERTY|FULLTEXTSERVICEPROPERTY|DATABASEPROPERTY|INDEX_COL|DATABASEPROPERTYEX|INDEXKEY_PROPERTY|DB_ID|INDEXPROPERTY|DB_NAME|OBJECT_ID|FILE_ID|OBJECT_NAME|FILE_NAME|OBJECTPROPERTY|FILEGROUP_ID|@@PROCID|FILEGROUP_NAME|SQL_VARIANT_PROPERTY|FILEGROUPPROPERTY|TYPEPROPERTY|FILEPROPERTY|" +
        "fn_trace_geteventinfo|IS_SRVROLEMEMBER|fn_trace_getfilterinfo|SUSER_SID|fn_trace_getinfo|SUSER_SNAME|fn_trace_gettable|USER_ID|HAS_DBACCESS|USER|IS_MEMBER|" +
        "ASCII|NCHAR|SOUNDEX|CHAR|PATINDEX|SPACE|CHARINDEX|REPLACE|STR|DIFFERENCE|QUOTENAME|STUFF|LEFT|REPLICATE|SUBSTRING|LEN|REVERSE|UNICODE|LOWER|RIGHT|UPPER|LTRIM|RTRIM|" +
        "APP_NAME|CASE|CAST|CONVERT|COALESCE|COLLATIONPROPERTY|CURRENT_TIMESTAMP|CURRENT_USER|DATALENGTH|@@ERROR|fn_helpcollations|fn_servershareddrives|fn_virtualfilestats|FORMATMESSAGE|GETANSINULL|HOST_ID|HOST_NAME|IDENT_CURRENT|IDENT_INCR|IDENT_SEED|@@IDENTITY|IDENTITY|ISDATE|ISNULL|ISNUMERIC|NEWID|NULLIF|PARSENAME|PERMISSIONS|@@ROWCOUNT|ROWCOUNT_BIG|SCOPE_IDENTITY|SERVERPROPERTY|SESSIONPROPERTY|SESSION_USER|STATS_DATE|SYSTEM_USER|@@TRANCOUNT|USER_NAME|" +
        "@@CONNECTIONS|@@PACK_RECEIVED|@@CPU_BUSY|@@PACK_SENT|fn_virtualfilestats|@@TIMETICKS|@@IDLE|@@TOTAL_ERRORS|@@IO_BUSY|@@TOTAL_READ|@@PACKET_ERRORS|@@TOTAL_WRITE|" +
        "PATINDEX|TEXTPTR|TEXTVALID";

function init() {
        parser.ignoreCase = true;

        // default text colour
        style.color = "black";

        // comments
        var LINE_COMMENT = /(--)[^\n]*\n/;
        parser.add(BLOCK_COMMENT, "color:green");
        parser.add(LINE_COMMENT, "color:green");

        // strings
        parser.add(STRING1, "color:maroon");    // single quotes
        parser.add(STRING2, "color:maroon");    // double quotes

        // numbers
        parser.add(NUMBER, "color:maroon");

        // urls/email
        urls = true;
        email = true;

        tabStop = 4;

        // vbcript keywords
        parser.add(KEYWORDS, "color:blue");
        parser.add(DATA_TYPES, "color:orange");
        parser.add(GLOBAL, "color:#ff0099");
};
//]]>
</script>
</public:component>

Powered by WebSVN 2.2.1