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

feat!: EXPOSED-555 Allow read-only suspendable transactions #2274

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RenanKummer
Copy link

@RenanKummer RenanKummer commented Oct 14, 2024

Description

Summary of the change: Regular transaction management allow callers to configure if new transactions should be read-only. This change adds the same behavior to suspendable transactions.

Detailed description:

  • What: A readOnly parameter has been added for newSuspendTransaction.
  • Why: Regular transactions allow readOnly to be configured by callers. As per JetBrains Exposed documentation, this behavior is supposed to be the same for regular and suspendable transactions, but the parameter was missing for suspendable transactions.
  • How: The parameter was added as optional (nullable with the default value set to null) to avoid breaking changes as much as possible. It is passed ahead to internal functions in order to create the transaction either as read-only based on caller's configuration or as the original behavior for existing code.

Type of Change

Please mark the relevant options with an "X":

  • New feature

Updates/remove existing public API methods:

  • Is breaking change

Affected databases:

  • Mysql5
  • Mysql8
  • Postgres

Checklist

  • Unit tests are in place
  • The build is green (including the Detekt check)
  • All public methods affected by my PR has up to date API docs
  • Documentation for my change is up to date

Related Issues

https://youtrack.jetbrains.com/issue/EXPOSED-555/newSuspendedTransaction-support-for-readOnly

@RenanKummer RenanKummer changed the title feat(EXPOSED-555): Allow read-only suspendable transactions feat!(EXPOSED-555): Allow read-only suspendable transactions Oct 14, 2024
@RenanKummer RenanKummer changed the title feat!(EXPOSED-555): Allow read-only suspendable transactions feat!: EXPOSED-555 Allow read-only suspendable transactions Oct 14, 2024
Regular transaction management allow callers to configure if new transactions should be read-only. This change adds the same behavior to suspendable transactions.
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.

1 participant