This will strip "save named query" command in the beginning of the line: '\ns zzz SELECT * FROM abc' -> 'SELECT * FROM abc' ' \ns zzz SELECT * FROM abc' -> 'SELECT * FROM abc'
(txt)
| 150 | |
| 151 | |
| 152 | def _strip_named_query(txt): |
| 153 | """ |
| 154 | This will strip "save named query" command in the beginning of the line: |
| 155 | '\ns zzz SELECT * FROM abc' -> 'SELECT * FROM abc' |
| 156 | ' \ns zzz SELECT * FROM abc' -> 'SELECT * FROM abc' |
| 157 | """ |
| 158 | |
| 159 | if named_query_regex.match(txt): |
| 160 | txt = named_query_regex.sub("", txt) |
| 161 | return txt |
| 162 | |
| 163 | |
| 164 | function_body_pattern = re.compile(r"(\$.*?\$)([\s\S]*?)\1", re.M) |