Giter VIP home page Giter VIP logo

Comments (4)

jeremydaly avatar jeremydaly commented on September 26, 2024 1

Fixed the documentation.

from dynamodb-toolbox.

jeremydaly avatar jeremydaly commented on September 26, 2024

Were you just expecting the parsed object? Not wrapped in the Item?

from dynamodb-toolbox.

aldebout avatar aldebout commented on September 26, 2024

Yes, because of this section of the readme

You can then get the data:

// Specify my item
let item = {
id: 123,
status: 'active',
date_added: '2019-04-24'
}

// Use the 'get' method of Customer
let response = await Customer.get(item)
This will return the object mapped to your aliases and composite key mappings:

{
id: 123,
name: 'Jane Smith',
company: 'ACME',
age: 35,
status: 'active',
date_added: '2020-04-24'
}

I think you haven't touched it in a "long" time (the paragraph just above uses schema instead of attributes) but it's the only indication of the return type of get().

from dynamodb-toolbox.

jeremydaly avatar jeremydaly commented on September 26, 2024

You're totally right! I copied in those examples and need to update them. The behavior needs to return the data wrapped in an Item because it is possible for the ConsumedCapacity to be returned. I'll update the docs.

from dynamodb-toolbox.

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.