Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SQL2003 window function syntax #82

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

chanmix51
Copy link

Window functions keywords like WINDOW, OVER, PARTITION were not recognized and the SQL formatting was bad when these functions were used.

Window function declarations were not indented correctly:

```
  from
    pomm.news window published_at_wdw as (
      order by
        published_at desc
    )
```

Configuring WINDOW as a top level reserved keyword makes the job:

```
  from
    pomm.news
  window
    published_at_wdw as (
      order by
        published_at desc
    )
```
@stof
Copy link
Contributor

stof commented Aug 14, 2015

The fact that you reformat the arrays of keywords/functions make it quite hard to see what is new in them

@chanmix51
Copy link
Author

@stof true, I have made a diff of before and after:

  • added WINDOW after INTERSECT
  • added OVER after OUTFILE

I have tested it in my own project's web debug toolbar and it works well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants