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

Feature: Transaction support #409

Open
2 tasks done
knackstedt opened this issue Apr 1, 2025 · 0 comments
Open
2 tasks done

Feature: Transaction support #409

knackstedt opened this issue Apr 1, 2025 · 0 comments

Comments

@knackstedt
Copy link
Contributor

Is your feature request related to a problem?

I need to run database queries and provide some context variables to table Events. A solution I have identified is having SDK support for Transactions which I can add variables to.

Describe the solution

A Transaction class that lets a developer group database calls together into one query that can be executed with variables which can be propagated to the table Event.

In my case, I need to share OTEL span and trace IDs to the events to map traces to updates in the system.

Alternative methods

Using db.let (which isn't synchronous -- it would easily have consistency issues and pollute other record mutations)
Writing a custom Surreal wrapper that converts each method into a surql query.

SurrealDB version

n/a

JavaScript SDK version

1.2.1

Contact Details

No response

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant