Giter VIP home page Giter VIP logo

Comments (6)

tywalch avatar tywalch commented on May 24, 2024

Hey @jpmtrabbold! I assume the issue you ran into was the validation on key field names? I started a feature branch (#124) to help with this. I will need to add more tests but it is a pretty minor change to implement. Thank you for creating a ticket!

from electrodb.

jpmtrabbold avatar jpmtrabbold commented on May 24, 2024

@tywalch yeah, I didn’t find a way of doing LSI’s. Sounds good! Thanks for such a well thought off library!

from electrodb.

tywalch avatar tywalch commented on May 24, 2024

When this change is in, there won't be any difference in how you implement and map LSIs vs GSIs 👍

from electrodb.

jpmtrabbold avatar jpmtrabbold commented on May 24, 2024

@tywalch I updated to the latest version, but it seems like you didn't update the typescript definitions, so typescript is still complaining when I do a new Entity(...).

Here's the Schema type that still requires a pk:

image

from electrodb.

tywalch avatar tywalch commented on May 24, 2024

Hi @jpmtrabbold! Yes it's still necessary to map the PK in your model, the backing index type (LSI vs GSI) is opaque to ElectroDB so it only knows what is mapped in the model. In the case of your LSI, it would be the same PK definition as your table.

Let me know if that helps, or if you have any cases where things don't update correctly; the PR has tests that check operations against an LSI.

from electrodb.

jpmtrabbold avatar jpmtrabbold commented on May 24, 2024

I see! Yeah man it worked a charm, 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.