Parse the part relative to a Function in the SQL query.
(sql, example, anonymize_values)
| 130 | |
| 131 | |
| 132 | def _parse_function(sql, example, anonymize_values): |
| 133 | """Parse the part relative to a Function in the SQL query.""" |
| 134 | successful_copy = True |
| 135 | for item in sql: |
| 136 | if _is_parenthesis(item): |
| 137 | successful_copy = populate_sql(item, example, |
| 138 | anonymize_values) and successful_copy |
| 139 | continue |
| 140 | if _is_identifier(item) and item.value.lower() in ('count', 'avg', 'min', |
| 141 | 'max', 'sum', |
| 142 | 'distinct'): |
| 143 | _add_simple_step(item, example) |
| 144 | continue |
| 145 | |
| 146 | _debug_state(item, example) |
| 147 | raise ParseError('Incomplete _parse_function') |
| 148 | return successful_copy |
| 149 | |
| 150 | |
| 151 | def _find_all_entities(token, |
no test coverage detected
searching dependent graphs…