Skip to content
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

Invoke addBatch of targetStatement if not in global transaction #1265

Merged

Conversation

iapplejohn
Copy link
Contributor

@iapplejohn iapplejohn commented Jul 3, 2019

Currently when it is not in global transaction, invoking DefaultSqlSession.insert method of ibatis with a list of records would eventually call AbstractPreparedStatementProxy.addBatch method, which overrides parent with empty statement.

I added the logic within the method: Invoke addBatch of targetStatement if not in global transaction.

@codecov-io
Copy link

codecov-io commented Jul 3, 2019

Codecov Report

Merging #1265 into develop will decrease coverage by 0.01%.
The diff coverage is 0%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #1265      +/-   ##
=============================================
- Coverage      49.47%   49.45%   -0.02%     
  Complexity      1651     1651              
=============================================
  Files            326      326              
  Lines          11439    11442       +3     
  Branches        1415     1415              
=============================================
  Hits            5659     5659              
- Misses          5153     5156       +3     
  Partials         627      627
Impacted Files Coverage Δ Complexity Δ
.../rm/datasource/AbstractPreparedStatementProxy.java 0% <0%> (ø) 0 <0> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1c5bf9d...7171ccd. Read the comment docs.

Copy link
Member

@slievrly slievrly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@CoffeeLatte007 CoffeeLatte007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@CoffeeLatte007 CoffeeLatte007 merged commit 21759b1 into apache:develop Jul 3, 2019
@iapplejohn iapplejohn deleted the no_global_transaction_batch branch July 4, 2019 01:40
@leizhiyuan leizhiyuan modified the milestone: 0.7.0 Jul 10, 2019
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.

None yet

6 participants