Skip to content

Add OFFSET to LIMIT clause, updated active pull requests#8

Merged
andykent merged 3 commits intoforward:masterfrom
FocusSchoolSoftware:update
Mar 17, 2015
Merged

Add OFFSET to LIMIT clause, updated active pull requests#8
andykent merged 3 commits intoforward:masterfrom
FocusSchoolSoftware:update

Conversation

@numtel
Copy link
Copy Markdown
Contributor

@numtel numtel commented Mar 17, 2015

Hello @andykent

Thanks so much for this project! I have merged the pull request from @davidcrawford as well as the one from @bjornharrtell (Including the necessary changes to the grammar file and added a test).

Along with the already existing pull requests, I have added support for OFFSET on the LIMIT clause. MySQL style LIMIT offset, row_count is also now supported. As well as MS SQL style OFFSET/FETCH syntax.

Also, although not fixed in this PR, the toString() method seems to only support MySQL style identifiers being wrapped in backticks. Postgres (and I think MSSQL) use double-quotes. It may be helpful to have some kind of option to toggle this output.

If you would be kind enough to release a new version to NPM, that would be much appreciated.

-Ben

davidcrawford and others added 3 commits March 16, 2015 22:19
…N, ANY, ALL, SOME, EXISTS. Allow COUNT(DISTINCT columns). Allow <=, >=, <>, !=.
* @numtel Added grammar changes and test case
* MySQL style LIMIT Number, Number also now supported
andykent added a commit that referenced this pull request Mar 17, 2015
Add OFFSET to LIMIT clause, updated active pull requests
@andykent andykent merged commit 6900534 into forward:master Mar 17, 2015
@andykent
Copy link
Copy Markdown
Contributor

Thanks for sorting this. Sorry for the neglect to the project. I'll bump the version and re-release now.

@andykent
Copy link
Copy Markdown
Contributor

I forgot to say. With regards to the backtick escaping...

I'm not sure what the right move is here. So far Things have been fairly non-specific to particular DBs but I guess at some point things will need to get more directed. I just really don't want to have to maintain different forks of the Grammer for different DBs. Escaping is an easy one to solve but different keywords in queries starts to be come quite awkward to manage.

I'll have a go at escaping support now.

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.

4 participants