-
Notifications
You must be signed in to change notification settings - Fork 5
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
Instances list endpoint pagination #64
Open
james-owen
wants to merge
18
commits into
master
Choose a base branch
from
jowen/paginate
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 7 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
64211e3
add postgres paginate
james-owen 2a430c0
add page size env var
james-owen 5ce0c3f
document env var
james-owen 2bd2c6a
move query around for testing
james-owen 66867d7
paginate tests
james-owen ecf1485
linting
james-owen 2be32f4
remove one-var
james-owen 57f751f
remove comments
james-owen 64e296f
fix var name
james-owen 4fcd895
doc for page size 0
james-owen 0ca7ad5
switch createReadStream to do pagination
james-owen d1bb57d
remove page size from docs
james-owen b6af182
switch createReadStream tests to paginate
james-owen 2e22107
remove references to paginate
james-owen ec7c677
remove declarations of PAGE_SIZE
james-owen 8ddf406
remove describe only
james-owen 18d5869
Merge branch 'master' into jowen/paginate
james-owen 2f8a5dd
Merge branch 'master' of github.com:clay/amphora-storage-postgres int…
james-owen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ To define where Postgres and Redis clients will connect to you can define the fo | |
- [`CLAY_STORAGE_POSTGRES_DB`](#clay_storage_postgres_db) | ||
- [`CLAY_STORAGE_POSTGRES_CACHE_ENABLED`](#clay_storage_postgres_cache_enabled) | ||
- [`CLAY_STORAGE_POSTGRES_CACHE_HOST`](#clay_storage_postgres_cache_host) | ||
- [`CLAY_STORAGE_POSTGRES_PAGE_SIZE`](#clay_storage_postgres_page_size) | ||
|
||
--- | ||
## Postgres | ||
|
@@ -43,6 +44,12 @@ The port where your Postgres instance resides on its host. | |
|
||
The database within Postgres to connect to. | ||
|
||
### `CLAY_STORAGE_PAGE_SIZE` | ||
|
||
**Default:** `null` _(Number)_ | ||
|
||
Default page size for list queries. Enables pagination by default on list endpoints. | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you should note in the docs here that a page size of |
||
--- | ||
|
||
## Redis | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is referred to everywhere else as
CLAY_STORAGE_PAGE_SIZE
.It seems that we already have an inconsistent naming scheme for the environment variables in this project, but maybe stick with the more generic
CLAY_STORAGE_PAGE_SIZE
(something that other storage back-ends could adhere to).