Git Product home page Git Product logo

Comments (8)

cdhowie avatar cdhowie commented on July 16, 2024 2

You are right, I missed that when scanning the source code. In that case, there's nothing to do here. (Though I would like to add a next() method to the result object that will encapsulate this logic.)

from dynogels.

sid88in avatar sid88in commented on July 16, 2024

hey @ccverak did you figure this out? I am trying to understand pagination in dynamodb as well. https://forums.aws.amazon.com/thread.jspa?threadID=262177&tstart=0

from dynogels.

cdhowie avatar cdhowie commented on July 16, 2024

@ccverak The object returned from query/scan operations includes LastEvaluatedKey alongside Items, but I don't think query/scan provides an API to provide this value.

Honestly, pagination should just be something we provide as a method on the returned object. There's no reason for developers to have to deal with directly passing that value around.

from dynogels.

apalaniuk avatar apalaniuk commented on July 16, 2024

Does startKey() not provide this?

from dynogels.

iDVB avatar iDVB commented on July 16, 2024

Does startKey() completely solve this?
Just thinking about this now. Does this not mean the frontend needs to track all keys, in order to know which is the first of a block of say 20?

Example: What if a user goes directly to this link domain.com/search?page=3&pagesize=10

How would the front end know what startkey() to send if they want to go back a single page?

from dynogels.

cdhowie avatar cdhowie commented on July 16, 2024

from dynogels.

iDVB avatar iDVB commented on July 16, 2024

@cdhowie Ya I think my disconnect here was that from an architecture point of view, DynamoDB itself is not the type of DB to handle backward paging lookups like this. We're getting around this by using ElasticSearch for things like this.

So naturally any ORM is not going to correct the underlining arch consideration.

from dynogels.

cdhowie avatar cdhowie commented on July 16, 2024

Right. Any workaround would be something at the application level, not the ORM. (Though dynogels isn't even an ORM, it's just an OM.)

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.