Skip to content

Conversation

@matthiasblaesing
Copy link
Contributor

…WCOUNT>..." construct

This is a reply to the comment:

Isn't your implementation to limited using only numbers and JdbcParameters? I am not familiar with Informix but could one use some variables there (limit @A)? Would'nt it be better to use an expression there?

The grammar for the construct in informix [1] mentions the possibility, that can be either
an integer or a host variable or local SPL variable storing the value of max. The case for plain integers and
jdbc variables is covered by the first commit While this commit adds support for constructs using SPL
variables. SPL variables must follow identifier rules [2][3].

Expressions are not supported. for example:

select skip (1 + 1) * from table

fails in informix. This also matches the described syntax in the informix documentation.

Thanks for merging and giving feedback!

Matthias

[1] http://www-01.ibm.com/support/knowledgecenter/SSGU8G_12.1.0/com.ibm.sqls.doc/ids_sqs_0156.htm
[2] http://www-01.ibm.com/support/knowledgecenter/SSGU8G_12.1.0/com.ibm.sqls.doc/ids_sqs_1306.htm?lang=de
[3] http://www-01.ibm.com/support/knowledgecenter/SSGU8G_12.1.0/com.ibm.sqls.doc/ids_sqs_1660.htm%23ids_sqs_1660?lang=de

…WCOUNT>..." construct

The grammar for the construct in informix [1] mentions the possibility, that <ROWCOUNT> can be either
an integer or a host variable or local SPL variable storing the value of max. The case for plain integers and
jdbc variables is covered by the first commit While this commit adds support for constructs using SPL
variables. SPL variables must follow identifier rules [2][3].

[1] http://www-01.ibm.com/support/knowledgecenter/SSGU8G_12.1.0/com.ibm.sqls.doc/ids_sqs_0156.htm
[2] http://www-01.ibm.com/support/knowledgecenter/SSGU8G_12.1.0/com.ibm.sqls.doc/ids_sqs_1306.htm?lang=de
[3] http://www-01.ibm.com/support/knowledgecenter/SSGU8G_12.1.0/com.ibm.sqls.doc/ids_sqs_1660.htm%23ids_sqs_1660?lang=de
wumpz added a commit that referenced this pull request Aug 5, 2015
Add support for variable support to "SELECT SKIP <ROWCOUNT> FIRST <RO…
@wumpz wumpz merged commit 0cb7484 into JSQLParser:master Aug 5, 2015
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