rouge-ruby / rouge

A pure Ruby code highlighter that is compatible with Pygments
https://rouge.jneen.net/
Other
3.32k stars 733 forks source link

SQL Windowing keywords #1753

Closed hawkfish closed 2 years ago

hawkfish commented 2 years ago

Is your enhancement request related to a problem? Please describe. WINDOW, PARTITION and RANGE are not recognised as keywords in the syntax highlighting right now.

Describe the solution you'd like Add them to the list.

Additional context Here is a fairly complete windowing query using common syntax:

SELECT "Plant", "Date",
    AVG("MWh") OVER seven AS "MWh 7-day Moving Average"
FROM "Generation History"
WINDOW seven AS (
    PARTITION BY "Plant"
    ORDER BY "Date" ASC
    RANGE BETWEEN INTERVAL 3 DAYS PRECEDING
              AND INTERVAL 3 DAYS FOLLOWING)
ORDER BY 1, 2
tancnle commented 2 years ago

Resolved by https://github.com/rouge-ruby/rouge/pull/1754.