@@ -49,11 +49,12 @@ public class PlainSelect extends ASTNodeAccessImpl implements SelectBody {
4949 private boolean useBrackets = false ;
5050 private Wait wait ;
5151 private boolean mySqlSqlCalcFoundRows = false ;
52- private boolean sqlNoCacheFlag = false ;
52+ private MySqlSqlCacheFlags mySqlCacheFlag = null ;
5353 private String forXmlPath ;
5454 private KSQLWindow ksqlWindow = null ;
5555 private boolean noWait = false ;
5656 private boolean emitChanges = false ;
57+ private WithIsolation withIsolation ;
5758
5859 public boolean isUseBrackets () {
5960 return useBrackets ;
@@ -330,6 +331,15 @@ public boolean isEmitChanges() {
330331 return emitChanges ;
331332 }
332333
334+
335+ public WithIsolation getWithIsolation () {
336+ return withIsolation ;
337+ }
338+
339+ public void setWithIsolation (WithIsolation withIsolation ) {
340+ this .withIsolation = withIsolation ;
341+ }
342+
333343 @ Override
334344 @ SuppressWarnings ({"PMD.CyclomaticComplexity" , "PMD.ExcessiveMethodLength" , "PMD.NPathComplexity" })
335345 public String toString () {
@@ -361,8 +371,8 @@ public String toString() {
361371 if (top != null ) {
362372 sql .append (top ).append (" " );
363373 }
364- if (sqlNoCacheFlag ) {
365- sql .append ("SQL_NO_CACHE" ).append (" " );
374+ if (mySqlCacheFlag != null ) {
375+ sql .append (mySqlCacheFlag . name () ).append (" " );
366376 }
367377 if (mySqlSqlCalcFoundRows ) {
368378 sql .append ("SQL_CALC_FOUND_ROWS" ).append (" " );
@@ -421,6 +431,10 @@ public String toString() {
421431 if (fetch != null ) {
422432 sql .append (fetch );
423433 }
434+
435+ if (withIsolation != null ) {
436+ sql .append (withIsolation );
437+ }
424438 if (isForUpdate ()) {
425439 sql .append (" FOR UPDATE" );
426440
@@ -455,6 +469,9 @@ public String toString() {
455469 if (fetch != null ) {
456470 sql .append (fetch );
457471 }
472+ if (withIsolation != null ) {
473+ sql .append (withIsolation );
474+ }
458475 }
459476 if (forXmlPath != null ) {
460477 sql .append (" FOR XML PATH(" ).append (forXmlPath ).append (")" );
@@ -544,25 +561,25 @@ public PlainSelect withMySqlSqlCalcFoundRows(boolean mySqlCalcFoundRows) {
544561 return this ;
545562 }
546563
547- public PlainSelect withMySqlSqlNoCache (boolean sqlNoCacheFlagSet ) {
548- this .setMySqlSqlNoCache ( sqlNoCacheFlagSet );
564+ public PlainSelect withMySqlSqlNoCache (MySqlSqlCacheFlags mySqlCacheFlag ) {
565+ this .setMySqlSqlCacheFlag ( mySqlCacheFlag );
549566 return this ;
550567 }
551568
552569 public void setMySqlSqlCalcFoundRows (boolean mySqlCalcFoundRows ) {
553570 this .mySqlSqlCalcFoundRows = mySqlCalcFoundRows ;
554571 }
555572
556- public void setMySqlSqlNoCache ( boolean sqlNoCacheFlagSet ) {
557- this .sqlNoCacheFlag = sqlNoCacheFlagSet ;
573+ public void setMySqlSqlCacheFlag ( MySqlSqlCacheFlags sqlCacheFlag ) {
574+ this .mySqlCacheFlag = sqlCacheFlag ;
558575 }
559576
560577 public boolean getMySqlSqlCalcFoundRows () {
561578 return this .mySqlSqlCalcFoundRows ;
562579 }
563580
564- public boolean getMySqlSqlNoCache () {
565- return this .sqlNoCacheFlag ;
581+ public MySqlSqlCacheFlags getMySqlSqlCacheFlag () {
582+ return this .mySqlCacheFlag ;
566583 }
567584
568585 public void setNoWait (boolean noWait ) {
0 commit comments