Skip to content

Include custom carbonite prefix in multi step name#143

Merged
maltoe merged 1 commit intomainfrom
include-prefix-in-multi-op-name
Sep 10, 2025
Merged

Include custom carbonite prefix in multi step name#143
maltoe merged 1 commit intomainfrom
include-prefix-in-multi-op-name

Conversation

@maltoe
Copy link
Collaborator

@maltoe maltoe commented Sep 10, 2025

This patch changes behaviour of Carbonite.Multi.insert_transaction/3 to include the given :carbonite_prefix option in the multi name. This allows for multi-stream setups on the same DB transaction, e.g.

Multi.new()
|> Carbonite.Multi.insert_transaction(%{type: "foo"})
|> Carbonite.Multi.insert_transaction(%{type: "foo"}, carbonite_prefix: "my_other_audits")

This patch changes behaviour of `Carbonite.Multi.insert_transaction/3` to
include the given `:carbonite_prefix` option in the multi name. This allows
for multi-stream setups on the same DB transaction, e.g.

```
Multi.new()
|> Carbonite.Multi.insert_transaction(%{type: "foo"})
|> Carbonite.Multi.insert_transaction(%{type: "foo"}, carbonite_prefix: "my_other_audits")
```
Copy link

@agatheblues agatheblues left a comment

Choose a reason for hiding this comment

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

Nice, thank you!

@maltoe maltoe merged commit 21f23f3 into main Sep 10, 2025
10 checks passed
@maltoe maltoe deleted the include-prefix-in-multi-op-name branch September 10, 2025 08:09
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