sql-parser-cst
sql-parser-cst copied to clipboard
Postgres support (operators)
Operators
- [ ] 100% correct operator precedence
- [x]
OPERATOR(...)syntax, likeOPERATOR(+)orOPERATOR(schema.table.|//) - [x]
~can be both a unary or binary operator (bitwise negation or string match) - [x] Array-access:
- [x] element access
foo[1] - [x] slice operator:
foo[1:5],foo[2:],foo[:5],foo[:]
- [x] element access
- [ ] Type casts
- [x]
CAST(expr AS type) - [x]
expr::type - [x]
type(expr)e.g.float8(125) - [ ]
type 'string'e.g.TIME (6) WITH TIME ZONE '15:30'orVARCHAR(100) 'Hello'
- [x]
- [x] Logical operators:
OR,AND,NOT - [x] Comparison operators:
- [x]
>,<,>=,<=,=,<>,!= - [x]
[NOT] BETWEEN ... AND ... - [x]
[NOT] BETWEEN SYMMETRIC ... AND ... - [x]
IS [NOT] DISTINCT FROM - [x]
IS [NOT] {NULL | TRUE | FALSE | UNKNOWN} - [x]
ISNULL - [x]
NOTNULL - [x] row constructor comparison
- [x]
- [x] Math operators:
- [x] Unary
+ - [x] Unary
- - [x] Unary
~ - [x]
+,-,*,/ - [x]
% - [x]
^ - [x] Others:
|/,||/,@,&,|,>>,<< - [x]
#works as bitwise XOR, not as comment
- [x] Unary
- [x] String operators:
- [x]
|| - [x]
IS [NOT] [form] NORMALIZED - [x]
^@ - [x] COLLATE
- [x]
- [x] Pattern matching:
- [x]
[NOT] LIKE - [x]
[NOT] ILIKE - [x]
ESCAPEwith LIKE & ILIKE - [x]
SIMILAR TO - [x]
ESCAPEwith SIMILAR TO - [x] Regex and like operators:
~,!~,~*,!~*,~~,!~~,~~*,!~~*
- [x]
- [x] JSON and JSONB operators:
- [x]
->,->>,#>,#>> - [x]
@>,<@,?,?|,?&,||,-,#-,@?,@@
- [x]
- [x] Subquery operators:
- [x]
EXISTS - [x]
[NOT] IN - [x]
ANY,SOME,ALL
- [x]
- [x] Date manipulation:
- [x]
EXTRACT(... FROM ...) - [x]
AT TIME ZONE
- [x]
- [x] Function calls:
- [x] Named function arguments.
- [x] Old
:=syntax for named function arguments. - [x] parenthesis-less date-time functions
- [x] session information functions