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

Use execute() instead of executeUpdate() for afterLoad/beforeLoad #313

Merged

Conversation

hiroyuki-sato
Copy link
Member

@hiroyuki-sato hiroyuki-sato commented Apr 13, 2023

@hiroyuki-sato hiroyuki-sato force-pushed the topic/update-instead-of-updateexecute branch from 71560a2 to 80e6eb2 Compare July 23, 2023 11:25
@hiroyuki-sato hiroyuki-sato marked this pull request as ready for review July 23, 2023 11:52
@hiroyuki-sato hiroyuki-sato changed the title [WIP] Use execute method instead of executeUpdate Use execute method instead of executeUpdate Jul 23, 2023
@dmikurube dmikurube requested review from dmikurube and hito4t July 24, 2023 02:12
Copy link
Member

@dmikurube dmikurube left a comment

Choose a reason for hiding this comment

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

I'm not 100% confident about the difference between execute and executeUpdate, but it looks good from @hito4t's comment on Zulip.

One inline comment left about naming.

Also, how about naming this pull request's subject: Use execute() instead of executeUpdate() for afterLoad/beforeLoad

@@ -383,6 +383,19 @@ protected void executeSql(String sql) throws SQLException
}
}

protected void executeSqlStatement(String sql) throws SQLException
Copy link
Member

Choose a reason for hiding this comment

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

It would be hard to tell the difference between executeSql and executeSqlStatement...

How about:

  • Name this method executeInNewStatement
  • Create another method executeUpdateInNewStatement to be the same as executeSql
  • Mark executeSql @Deprecated, and change it to just call executeUpdateInNewStatement

@hiroyuki-sato hiroyuki-sato changed the title Use execute method instead of executeUpdate Use execute() instead of executeUpdate() for afterLoad/beforeLoad Jul 24, 2023
@hiroyuki-sato
Copy link
Member Author

@dmikurube Thank you for your comment! I'll change the code.

@dmikurube
Copy link
Member

@hiroyuki-sato Once you address the comment, I'll include it in the next v0.10.3.

@hiroyuki-sato
Copy link
Member Author

@dmikurube Thanks. I'll fix as far as possible.

@dmikurube dmikurube added this to the v0.10.3 milestone Oct 5, 2023
@dmikurube
Copy link
Member

Okay, I tagged the v0.10.3 milestone on this pull request.

@dmikurube
Copy link
Member

I think I'll release v0.10.3 next Tuesday. I'll include it if it's ready by then.

@hiroyuki-sato hiroyuki-sato requested a review from a team as a code owner October 8, 2023 03:52
@hiroyuki-sato
Copy link
Member Author

@dmikurube Could you check when you have time?

Copy link
Member

@dmikurube dmikurube left a comment

Choose a reason for hiding this comment

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

@dmikurube dmikurube merged commit bf0448d into embulk:master Oct 9, 2023
@hiroyuki-sato hiroyuki-sato deleted the topic/update-instead-of-updateexecute branch October 9, 2023 06:57
@naka-sho
Copy link
Contributor

naka-sho commented Oct 11, 2023

Thanks!
Next time I will fix it myself and send a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants