keyword sequence filter. a filter for elements that are intended to represent keyword sequences, such as "INITIALLY", "INITIALLY DEFERRED", etc. no special characters should be present.
(self, element, reg)
| 7999 | return value.replace(self.escape_to_quote, self.escape_quote) |
| 8000 | |
| 8001 | def validate_sql_phrase(self, element, reg): |
| 8002 | """keyword sequence filter. |
| 8003 | |
| 8004 | a filter for elements that are intended to represent keyword sequences, |
| 8005 | such as "INITIALLY", "INITIALLY DEFERRED", etc. no special characters |
| 8006 | should be present. |
| 8007 | |
| 8008 | """ |
| 8009 | |
| 8010 | if element is not None and not reg.match(element): |
| 8011 | raise exc.CompileError( |
| 8012 | "Unexpected SQL phrase: %r (matching against %r)" |
| 8013 | % (element, reg.pattern) |
| 8014 | ) |
| 8015 | return element |
| 8016 | |
| 8017 | def quote_identifier(self, value: str) -> str: |
| 8018 | """Quote an identifier. |
no test coverage detected