(op string, value bool)
| 324 | } |
| 325 | |
| 326 | func boolComparisonRewrite(op string, value bool) (pg_query.BoolTestType, bool) { |
| 327 | switch op { |
| 328 | case "=": |
| 329 | if value { |
| 330 | return pg_query.BoolTestType_IS_TRUE, true |
| 331 | } |
| 332 | return pg_query.BoolTestType_IS_FALSE, true |
| 333 | case "!=", "<>": |
| 334 | if value { |
| 335 | return pg_query.BoolTestType_IS_FALSE, true |
| 336 | } |
| 337 | return pg_query.BoolTestType_IS_TRUE, true |
| 338 | default: |
| 339 | return pg_query.BoolTestType_BOOL_TEST_TYPE_UNDEFINED, false |
| 340 | } |
| 341 | } |
| 342 | |
| 343 | func booleanTestNode(expr *pg_query.Node, boolTestType pg_query.BoolTestType, location int32) *pg_query.Node { |
| 344 | return &pg_query.Node{ |
no outgoing calls
no test coverage detected