-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Implements #509 #504
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
Implements #509 #504
Conversation
…issing copyright.ˆ
public class MySqlSqlCalcFoundRowsTest { | ||
@Test | ||
public void testPossibleParsingWithSqlCalcFoundRowsHint() throws JSQLParserException { | ||
AtomicReference<MySqlSqlCalcFoundRows> ref = new AtomicReference<MySqlSqlCalcFoundRows>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you really need it to be an atomic reference? could you just assign it to a variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will do that.
@@ -0,0 +1,54 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could both of these live in just your test class? (otherwise the name might throw people off since it is quite generic)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's created only for unit test.
I'll change the class name to containing means of test.
package net.sf.jsqlparser.expression; | ||
|
||
/** | ||
* @author sam |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add the reference link here? And that this object supports: SQL_CALC_FOUND_ROWS
for the MySQL driver?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. SQL_CALC_FOUND_ROWS keyword is hint syntax only for MySQL driver.
You can find here.
https://dev.mysql.com/doc/refman/5.7/en/select.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mind adding this to the doc:
Supports the {@code SQL_CALC_FOUND_ROWS} keyword for <a href="https://dev.mysql.com/doc/refman/5.7/en/select.html">MySQL driver.</a>
Just so there's a reference in case future devs want to know more about what this does (then they don't have to track this PR down) :)
…odify field type to boolean for prevent memory consumption by creating object and try assertSqlCanBeParsedAndDeparsed on unit test.
Changes Unknown when pulling 11b62e1 on KyongSik-Yoon:master into ** on JSQLParser:master**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine to me 👍 (i'd love if you make that one last javadoc update)
all up to @wumpz !
Parsing failed when sql contain MySql hint SQL_CALC_FOUND_ROWS so I added rule for parsing that.
I referred following documents.
https://dev.mysql.com/doc/refman/5.7/en/select.html