-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Support pagination #247
Merged
Merged
Support pagination #247
Commits on May 26, 2015
-
Configuration menu - View commit details
-
Copy full SHA for 3d60d13 - Browse repository at this point
Copy the full SHA 3d60d13View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8e3d0cb - Browse repository at this point
Copy the full SHA 8e3d0cbView commit details -
Configuration menu - View commit details
-
Copy full SHA for d7bec60 - Browse repository at this point
Copy the full SHA d7bec60View commit details -
Add initial implementation of pagination
This change adds a <Operation>Pages() operation to each operation with pagination configuration to return an iterator that can be used like slice iteration: db := dynamodb.New(nil) for resp := range db.ListTablesPages() { fmt.Println(resp) } References #58
Configuration menu - View commit details
-
Copy full SHA for 3664ecc - Browse repository at this point
Copy the full SHA 3664eccView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8afc35d - Browse repository at this point
Copy the full SHA 8afc35dView commit details -
Update pagination API to take a function callback instead.
New API: func main() { db := dynamodb.New(nil) params := &dynamodb.ListTablesInput{Limit: aws.Long(2)} i := 0 db.ListTablesPages(params, func(p *dynamodb.ListTablesOutput, err error) bool { if err != nil { fmt.Println("An error occurred", err) } else if p != nil { i++ fmt.Println(i, awsutil.StringValue(p)) } else { fmt.Println("Finished paging!") } return true // return false to stop paging }) } Also adds pagination tests. References #58
Configuration menu - View commit details
-
Copy full SHA for 6e04917 - Browse repository at this point
Copy the full SHA 6e04917View commit details -
Configuration menu - View commit details
-
Copy full SHA for 85eb3ca - Browse repository at this point
Copy the full SHA 85eb3caView commit details -
Configuration menu - View commit details
-
Copy full SHA for b707d11 - Browse repository at this point
Copy the full SHA b707d11View commit details -
Configuration menu - View commit details
-
Copy full SHA for f48654a - Browse repository at this point
Copy the full SHA f48654aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8856ba3 - Browse repository at this point
Copy the full SHA 8856ba3View commit details -
Update pagination API to return error from operation.
New API: numPages := 0 err := req.EachPage(func(p *dynamodb.ListTablesOutput, last bool) { // Print a page of data numPages++ fmt.Printf("Page %d: %x\n", numPages, p.TableNames) if last { // We are on the last page fmt.Println("Got to last page") } }) if err != nil { panic(err) }
Configuration menu - View commit details
-
Copy full SHA for a1152b9 - Browse repository at this point
Copy the full SHA a1152b9View commit details -
Configuration menu - View commit details
-
Copy full SHA for c6c3091 - Browse repository at this point
Copy the full SHA c6c3091View commit details -
- Document use of nil reflect.Value with Call() - Rename "result" to "shouldContinue" - Use "SetValueAtAnyPath" to match case insensitive matches - Copy parameters when sending new request (add test assertion for this)
Configuration menu - View commit details
-
Copy full SHA for 0eea626 - Browse repository at this point
Copy the full SHA 0eea626View commit details
Commits on May 28, 2015
-
Add support for multi-token pagination rules
Also refactor and add tests for truncation logic
Configuration menu - View commit details
-
Copy full SHA for bad551f - Browse repository at this point
Copy the full SHA bad551fView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.