Skip to content

🚀 Feature Request: D1 Transaction support #2733

@codehz

Description

@codehz

Describe the solution

Has the procedures feature mentioned in this article been shipped?
This feature does not seem to be available in the current version sdk, either locally or remotely. Is there another plan for this? I really want this feature.

One of my use cases is to cascade insert data into two (or more) tables, where the generated id obtained by the first insert statement is used as a parameter in the second insert statement. These two inserts need to be done in the same transaction, otherwise the inconsistent state may cause some problem. (In other database engines, such as postgresql, we can achieve this through subqueries or cte with returning clauses in one statement. Unfortunately, this method does not work in sqlite)

Metadata

Metadata

Assignees

No one assigned

    Labels

    d1Relating to D1enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions