Parse `CURRENT ROW` or `{ | UNBOUNDED } { PRECEDING | FOLLOWING }`
(&mut self)
| 924 | |
| 925 | /// Parse `CURRENT ROW` or `{ <positive number> | UNBOUNDED } { PRECEDING | FOLLOWING }` |
| 926 | fn parse_window_frame_bound(&mut self) -> Result<WindowFrameBound, ParserError> { |
| 927 | if self.parse_keywords(&[CURRENT, ROW]) { |
| 928 | Ok(WindowFrameBound::CurrentRow) |
| 929 | } else { |
| 930 | let rows = if self.parse_keyword(UNBOUNDED) { |
| 931 | None |
| 932 | } else { |
| 933 | Some(self.parse_literal_uint()?) |
| 934 | }; |
| 935 | if self.parse_keyword(PRECEDING) { |
| 936 | Ok(WindowFrameBound::Preceding(rows)) |
| 937 | } else if self.parse_keyword(FOLLOWING) { |
| 938 | Ok(WindowFrameBound::Following(rows)) |
| 939 | } else { |
| 940 | self.expected(self.peek_pos(), "PRECEDING or FOLLOWING", self.peek_token()) |
| 941 | } |
| 942 | } |
| 943 | } |
| 944 | |
| 945 | fn parse_case_expr(&mut self) -> Result<Expr<Raw>, ParserError> { |
| 946 | let mut operand = None; |
no test coverage detected