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

Trasanctional for raw SQL query #1835

Open
aronDev22-EarthTrack opened this issue Sep 12, 2024 · 0 comments
Open

Trasanctional for raw SQL query #1835

aronDev22-EarthTrack opened this issue Sep 12, 2024 · 0 comments

Comments

@aronDev22-EarthTrack
Copy link

aronDev22-EarthTrack commented Sep 12, 2024

Hi, is there a way to do transaction for raw query for rollback incase there is an error?

code below

await database.adapter.unsafeExecute(
 { 
    sqls: [ 
        [ 'INSERT INTO tag (id, data, type) VALUES (?, ?, ?);', [ '1', 'New Tag Name 35', 'active' ]], 
    ] 
  }
)

@aronDev22-EarthTrack aronDev22-EarthTrack changed the title Trasanction for raw SQL query Trasanctional for raw SQL query Sep 12, 2024
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

No branches or pull requests

1 participant