Return `true` if `op` appears verbatim inside any `Text` segment of `sql`. The comparison is byte-exact (case-sensitive). Occurrences inside string literals, quoted identifiers, or comments are ignored.
(sql: &str, op: &str)
| 221 | /// The comparison is byte-exact (case-sensitive). Occurrences inside string |
| 222 | /// literals, quoted identifiers, or comments are ignored. |
| 223 | pub fn has_operator_outside_literals(sql: &str, op: &str) -> bool { |
| 224 | for seg in segments(sql) { |
| 225 | if let SqlSegment::Text(t) = seg |
| 226 | && t.contains(op) |
| 227 | { |
| 228 | return true; |
| 229 | } |
| 230 | } |
| 231 | false |
| 232 | } |
| 233 | |
| 234 | /// Return the byte positions (relative to the start of `sql`) of every |
| 235 | /// occurrence of `op` that falls inside a `Text` segment. |
no test coverage detected