Giter VIP home page Giter VIP logo

Comments (5)

tywalch avatar tywalch commented on June 16, 2024

Hi @metuuu 👋

First of all, how dare you.

Second of all, this is a good find.

In most cases the library strives limit the surface area of the validation and constraints it adds. This is typically because DynamoDB changes their own limits and constraints all the time, so it wouldn't be right for the library to try match/duplicate those.

I'll note this change see about improving the formatting of these expression attributes/names 👍

Does DynamoDB even allow for spaces in their field names? I've never tried.

from electrodb.

metuuu avatar metuuu commented on June 16, 2024

My example was a bit over the top I agree 😄 I'm sure you don't have to worry about spaces.

Thank you!

from electrodb.

metuuu avatar metuuu commented on June 16, 2024

Just to note that in my actual case I was storing images to an object and the image IDs were generated with nanoid which can include hyphens and underscore. UUIDs would also have the same issue.

images: {
  // { <image-id>: <s3-key> }
  type: CustomAttributeType<{ [imageId: string]: string }>>('any'),
}

from electrodb.

tywalch avatar tywalch commented on June 16, 2024

I just published the fix with 2.10.6. You can use the same playground link you created to see the change in action

We can close this ticket when you've verified your use case 👍

from electrodb.

metuuu avatar metuuu commented on June 16, 2024

All seems good! I agree with your solution, that if someone wants to shoot themselves in the leg by trying to store two items like test-item & testitem to same map its completely their own fault.

Thank you 🙏🏻

from electrodb.

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.