Comments (8)
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.
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.
@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.
Does startKey()
not provide this?
from dynogels.
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.
from dynogels.
@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.
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)
- Does not enforce required() on nested property HOT 6
- What is the best way to convert a list of objects HOT 1
- Provide access to the AWS request object
- Model.validate not in latest release HOT 1
- Add transactions support HOT 1
- A method which returns the raw DynamoDB params for creating an item
- When I do an .updateAsync() with ReturnValues I recieve a type error
- Item.set doesn't work as advertised HOT 3
- Security question?
- while updating the model getting validationException HOT 1
- Project is dead? HOT 27
- using reserved word in schema causes silent error
- Enable On-Demand Billing Mode
- Cannot use "startKey" when using an index HOT 1
- 'updatedAt' field doesn't change once set.
- ValidationException on .destroy() method HOT 3
- Update joi dependency to use @hapi/joi HOT 6
- Keep getting Error: Invalid schema content when I use define HOT 3
- Stale library? HOT 1
- Is it possible to run dynogels with version 3 of AWS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dynogels.