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

Add Transaction to lifecycle hooks for #1530 #1531

Merged
merged 1 commit into from
Jul 16, 2022

Conversation

rsromanowski
Copy link
Contributor

Adding transaction to lifecycle hooks to support #1530.

Note:

  • This is a breaking change to the StatementInterceptor interface

@rsromanowski rsromanowski reopened this Jun 13, 2022
@rsromanowski rsromanowski marked this pull request as ready for review June 13, 2022 13:47
@SchweinchenFuntik
Copy link
Contributor

why not:

interface StatementInterceptor {
    // ...
    fun afterCommit(transaction: Transaction) {}
    fun afterRollback(transaction: Transaction) {}

    @Deprecated("using afterCommit with transaction")
    //@Deprecated("using afterRollback with transaction", level = DeprecationLevel.ERROR) \\ next version
    //@Deprecated("using afterRollback with transaction", level = DeprecationLevel.HIDDEN) \\ next version, backward compatibility
    fun afterCommit() {}

    @Deprecated("using afterRollback with transaction")
    fun afterRollback() {}
}

Is it safe to pass a Transaction object at this stage?

@Tapac Tapac merged commit e4d18db into JetBrains:master Jul 16, 2022
@Tapac
Copy link
Contributor

Tapac commented Jul 16, 2022

@SchweinchenFuntik , nice catch, I'll make such change in code.

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.

4 participants