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 documentation about transaction modes #155

Merged
merged 4 commits into from
Nov 4, 2024

Conversation

egze
Copy link
Contributor

@egze egze commented Nov 4, 2024

Added docs how to use different transaction modes:

  1. Pass mode: :immediate to Repo.transaction/2: Use this approach to set the transaction mode for individual transactions.
  2. Define custom transaction functions: Create wrappers, such as Repo.immediate_transaction/2 or Repo.deferred_transaction/2, to easily apply different modes where needed.
  3. Set a global default: Configure :default_transaction_mode to apply a preferred mode for all transactions.

@egze
Copy link
Contributor Author

egze commented Nov 4, 2024

@warmwaffles Seems like a flaky test is broken

@warmwaffles warmwaffles merged commit 97c9cb4 into elixir-sqlite:main Nov 4, 2024
13 checks passed
@egze egze deleted the default_transaction_mode branch November 4, 2024 13:57
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.

2 participants