-
Notifications
You must be signed in to change notification settings - Fork 128
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
Fixes #201: Implements get approximate item count for dynamodb table #209
Conversation
The inspection completed: 2 new issues, 1 updated code elements |
@@ -19,6 +19,7 @@ Supports all key types - primary hash key and composite keys. | |||
* [find() and delete()](#find-and-delete) | |||
* [Conditions](#conditions) | |||
* [all() and first()](#all-and-first) | |||
* [getItemCount()](#getItemCount) |
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.
How about just itemCount
?
* | ||
* @return int | ||
*/ | ||
public static function getItemCount() |
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.
itemCount
?
$describeTable = $model->getClient()->describeTable([ | ||
'TableName' => $model->getTable() | ||
]); | ||
return $describeTable->get('Table')['ItemCount']; |
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.
I prefer that the query is actually done in the DynamoDbQueryBuilder. And that would allow us to do:
return $model->newQuery()->getTableItemCount();
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.
Thanks for working on this!
We should never merge something that breaks the test. Not sure why travis is still running 7.1 though. @sahilsharma011 did you pull in the latest changes?
This PR has been stale for a over a year, closing. |
Fixes #201