Store views timestamps

This commit is contained in:
antonkomarev
2020-07-12 23:55:43 +03:00
parent c1d0a540ed
commit e0147d3ca1
5 changed files with 29 additions and 11 deletions

View File

@@ -25,7 +25,7 @@ final class CounterDatabaseRepository implements CounterRepositoryInterface
$this->connection = $connection;
}
public function getCountByUsername(string $username): int
public function getViewsCountByUsername(string $username): int
{
$statement = $this->connection->prepare(
'SELECT COUNT(*)
@@ -38,7 +38,7 @@ final class CounterDatabaseRepository implements CounterRepositoryInterface
return (int) $statement->fetchColumn(0);
}
public function incrementCountByUsername(string $username): void
public function addViewByUsername(string $username): void
{
$statement = $this->connection->prepare(
'INSERT INTO github_profile_views