Skip to content

Support setting request preconditions #389

Description

@tolzhabayev

TL;DR

Why?

Add support for passing request precondition arguments to storage client in order to be able to perform safe read-modify-write updates and conditional operations.

How

The storage already supports precondition options, example:
https://github.com/googleapis/nodejs-storage/blob/77070b565bf3a347902d38ed46206b86fbf4ffe8/samples/copyFile.js#L62-L66

It could be a new inputs of type number called:

  • preconditionOptionsIfGenerationMatch
  • preconditionOptionsIfGenerationNotMatch
  • preconditionOptionsIfMetagenerationMatch
  • preconditionOptionsIfMetagenerationNotMatch

Detailed design

No response

Additional information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions