-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
after() should accept a raw "lastEvaluatedKey" value #127
Comments
How about add a |
That would work. Could we also add in I can make these edits and create a PR before end of day, if you'd like. |
|
Except that afterKey returns an instance of the QueryBuilder for chaining, and get/setLastEvaluatedKy are just methods for accessing the value. As for use case, it's mainly for testing/debugging on my end to make sure that the correct values are being set, etc. It doesn't need to be a documented method, and could be for internal use only... any references to $this->lastEvaluatedKey could use getLastEvaluatedKey which could eventually have some validation logic in it... especially if we allow the user to set the key manually. |
Let me think about it, my immediate thought is why not use |
Sometimes, you may not have an instance of a model available (for example, when paginating server side or using scripts) and instead only have the "lastEvaluatedKey" available. It seems inefficient to use this key to query for a single model to pass to
after()
. Instead, I propose thatafter()
supports accepting aDynamoDbModel
to maintain the currentafter()
functionality but also allowing you to just setlastEvaluatedKey
to whatever was passed in if it is not a DynamoDbModel.Something like this, where
$after
could be the value of$model->getLastEvaluatedKey()
The text was updated successfully, but these errors were encountered: