Adds the attribute to the $select parameter :param str attributes: the attributes tuple to select. If empty, the on_attribute previously set is added. :rtype: Query
(self, *attributes)
| 659 | |
| 660 | @fluent |
| 661 | def select(self, *attributes): |
| 662 | """ Adds the attribute to the $select parameter |
| 663 | |
| 664 | :param str attributes: the attributes tuple to select. |
| 665 | If empty, the on_attribute previously set is added. |
| 666 | :rtype: Query |
| 667 | """ |
| 668 | if attributes: |
| 669 | for attribute in attributes: |
| 670 | attribute = self.protocol.convert_case( |
| 671 | attribute) if attribute and isinstance(attribute, |
| 672 | str) else None |
| 673 | if attribute: |
| 674 | if '/' in attribute: |
| 675 | # only parent attribute can be selected |
| 676 | attribute = attribute.split('/')[0] |
| 677 | self._selects.add(attribute) |
| 678 | else: |
| 679 | if self._attribute: |
| 680 | self._selects.add(self._attribute) |
| 681 | |
| 682 | return self |
| 683 | |
| 684 | @fluent |
| 685 | def expand(self, *relationships): |
no test coverage detected