Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Transactions Support #2622

@msfidelis

Description

@msfidelis

The project does support transactions?
I think it would be interesting to offer support for SQL Transactions to simulate the behavior of a "Plan/Apply" using terraform as a parallel. This would ensure the safety of using iasql in pipelines.

Example:

sequenceDiagram
    participant Client
    participant Database

    Client->>Database: BEGIN TRANSACTION
    activate Database

    Client->>Database:  INSERT INTO dynamo_table (table_name, table_class, throughput, primary_key, region) VALUES (...)
    Database-->>Client: Success
    Client->>Database: INSERT INTO queue (name, fifo_queue, region) VALUES (...)
    Database-->>Client: Success

    alt Check resource as a `plan` - All operations successful
        Client->>Database: COMMIT (apply)
        Database-->>Client: Transaction Committed
    else Any operation fails
        Client->>Database: ROLLBACK
        Database-->>Client: Transaction Rolled Back
    end
    deactivate Database

Loading

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions