Git Product home page Git Product logo

Comments (3)

deedw avatar deedw commented on July 16, 2024

See comments against pull request #50. I believe existing functionality is as expected for DynamoDb and changes to this would break existing code.

from dynogels.

jkav77 avatar jkav77 commented on July 16, 2024

@deedw Given the underlying behavior of DynamoDB.updateItem(), I agree that the current behavior is as expected. In my projects, attempting to update a non-existent item has always represented an error case I would want to know about. This issue made sense to me in that context.

Having looked through the code now, it appears that you can do this easily with the param object like { expected: { id: { Exists: true } } }. I don't see this in the documentation, so I will change the PR to add this to the docs after I finish testing to make sure this actually works as I think it does.

from dynogels.

jkav77 avatar jkav77 commented on July 16, 2024

I updated the documentation in #53. This provides an easy way to modify the behavior of .update() to fail for items that don't exist. In fact, this was an undocumented feature already in the code. I added two tests to check the behavior works and described the parameter in the README.md.

from dynogels.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.