You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
knackstedt
added a commit
to knackstedt/surrealdb.js
that referenced
this issue
Apr 1, 2025
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?
Code of Conduct
The text was updated successfully, but these errors were encountered: