Skip to content

Commit

Permalink
PostgreSQL Add NOT operator (#3504)
Browse files Browse the repository at this point in the history
Co-authored-by: hfhbd <hfhbd@users.noreply.github.com>
  • Loading branch information
hfhbd and hfhbd committed Sep 19, 2022
1 parent 39c0be5 commit 0d7e644
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Expand Up @@ -242,12 +242,14 @@ compound_select_stmt ::= [ {with_clause} ] {select_stmt} ( {compound_operator}
override = true
}

extension_expr ::= json_expression | boolean_literal {
extension_expr ::= json_expression | boolean_literal | boolean_not_expression {
extends = "com.alecstrong.sql.psi.core.psi.impl.SqlExtensionExprImpl"
implements = "com.alecstrong.sql.psi.core.psi.SqlExtensionExpr"
override = true
}

boolean_not_expression ::= NOT (boolean_literal | {column_name})

boolean_literal ::= TRUE | FALSE

json_expression ::= {column_name} ( jsona_binary_operator | jsonb_binary_operator ) <<expr '-1'>> {
Expand Down
Expand Up @@ -62,3 +62,6 @@ CREATE TABLE all_types(

some_int2_array INT2[]
);

SELECT * FROM all_types
WHERE NOT some_boolean AND NOT some_bool = some_boolean AND NOT TRUE;

0 comments on commit 0d7e644

Please sign in to comment.