private function runQuery(array $query, int $limit): Result
    {
        $query['Limit']  = $limit + 1;
        $result          = $this->dynamoDbClient->query($query);
        $result['Items'] = array_slice($result['Items'], 0, $limit);

        return $result;
    }