Skip to content

Performing batch transactions #922

Closed
@JeromeDeLeon

Description

@JeromeDeLeon

Is your feature request related to a problem? Please describe.
This was already supported in the PServer, but in JS-SDK, it limits us to only perform either save or delete but not both.

Describe the solution you'd like
It would be better if we could constructr a batch operation like:

await Parse.Object.performTransaction(
  [
    { method: "PUT", objects: [PObject] },
    { method: "DELETE", object: PObject },
    { method: "POST", objects: [PObject, PObject] }
  ],
  { transaction: true, useMasterKey: true }
);

and performs that sequentially.

Describe alternatives you've considered

Additional context
Also, using relations when doing batch operation is not allowed because you cannot add something to relation when it is new. I don't know if there's already a solution to this but my current implementation is to use forkJoin([DeleteObjects(), SaveObjects()]) using RxJS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bounty:$100Bounty applies for fixing this issue (Parse Bounty Program)state:releasedReleased as stable versionstate:released-alphaReleased as alpha versiontype:featureNew feature or improvement of existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions