(cls, element)
| 876 | |
| 877 | @classmethod |
| 878 | def _roll_down_to_literal(cls, element): |
| 879 | is_clause_element = hasattr(element, "__clause_element__") |
| 880 | |
| 881 | if is_clause_element: |
| 882 | while not isinstance( |
| 883 | element, (elements.ClauseElement, schema.SchemaItem, type) |
| 884 | ): |
| 885 | try: |
| 886 | element = element.__clause_element__() |
| 887 | except AttributeError: |
| 888 | break |
| 889 | |
| 890 | if not is_clause_element: |
| 891 | insp = inspection.inspect(element, raiseerr=False) |
| 892 | if insp is not None: |
| 893 | try: |
| 894 | return insp.__clause_element__() |
| 895 | except AttributeError: |
| 896 | return insp |
| 897 | |
| 898 | # TODO: should we coerce consts None/True/False here? |
| 899 | return element |
| 900 | else: |
| 901 | return element |
| 902 | |
| 903 | def _bound_parameter_getter_func_globals(self, name): |
| 904 | """Return a getter that will extend a list of bound parameters |
no test coverage detected