-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Support flush statement SQL bind #36036
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
base: master
Are you sure you want to change the base?
Support flush statement SQL bind #36036
Conversation
| if (sqlStatement instanceof ExplainStatement) { | ||
| return new ExplainStatementContext(metaData, (ExplainStatement) sqlStatement, params, currentDatabaseName); | ||
| } | ||
| if (sqlStatement instanceof FlushStatement) { |
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.
Please use CommonSQLStatementContext.
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.
done
| * Flush statement context. | ||
| */ | ||
| @Getter | ||
| public final class FlushStatementContext implements SQLStatementContext { |
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.
Maybe you can use CommonSQLStatementContext.
| if (tables.isEmpty()) { | ||
| return sqlStatement; | ||
| } | ||
|
|
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.
Please remove useless blank line.
| Collection<SimpleTableSegment> boundTables = tables.stream() | ||
| .map(each -> SimpleTableSegmentBinder.bind(each, binderContext, tableBinderContexts)) | ||
| .collect(Collectors.toList()); | ||
|
|
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.
Please remove useless blank line.
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.
done
|
Hi @strongduanmu , I’ve made the updates, could u take a quick look at this PR? Thanks! |
| } | ||
|
|
||
| private FlushStatement copyFlushStatement(final FlushStatement sqlStatement, final Collection<SimpleTableSegment> tables) { | ||
| FlushStatement result = new FlushStatement(sqlStatement.getDatabaseType()) { |
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.
Hi @chakkk309, can you merge the latest branch. There is no FlushStatement now.
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 created FlushStatement in this pr, please have a check ~
Ref #34029
Changes proposed in this pull request:
Before committing this PR, I'm sure that I have checked the following options:
./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e.