Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

sahilsharma011
Copy link
Contributor

@sahilsharma011 sahilsharma011 commented Oct 1, 2019

Fixes #201

@scrutinizer-notifier
Copy link

The inspection completed: 2 new issues, 1 updated code elements

@JackPriceBurns
Copy link
Collaborator

JackPriceBurns commented Feb 6, 2020

@rennokki @baopham tests only fail on PHP 7.1 which we don't support anymore, good to merge?

@@ -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)
Copy link
Owner

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()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

itemCount?

Comment on lines +473 to +476
$describeTable = $model->getClient()->describeTable([
'TableName' => $model->getTable()
]);
return $describeTable->get('Table')['ItemCount'];
Copy link
Owner

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();

Copy link
Owner

@baopham baopham left a 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?

@JackPriceBurns
Copy link
Collaborator

This PR has been stale for a over a year, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: ItemCount from DescribeTable
4 participants