Count the values for each of the provided keys. :param iterable[byte|str] keys: list of keys :rtype: dict[byte|str,int] :return: the number of values per key
(self, keys)
| 666 | } |
| 667 | |
| 668 | def select_count(self, keys): |
| 669 | """ |
| 670 | Count the values for each of the provided keys. |
| 671 | |
| 672 | :param iterable[byte|str] keys: list of keys |
| 673 | :rtype: dict[byte|str,int] |
| 674 | :return: the number of values per key |
| 675 | """ |
| 676 | statements_and_parameters = [ |
| 677 | (self._stmt_get_count, (self._key_encoder(key), )) |
| 678 | for key in keys |
| 679 | ] |
| 680 | return { |
| 681 | self._key_decoder(row.key): row.count |
| 682 | for rows in self._select(statements_and_parameters) |
| 683 | for row in rows |
| 684 | } |
| 685 | |
| 686 | def one(self, key): |
| 687 | """ |