Merge pull request #73 from benesch/option-vec

Replace Option<Vec<T>> with Vec<T>
This commit is contained in:
Nickolay Ponomarev 2019-05-30 02:32:35 +03:00 committed by GitHub
commit 80f594e8d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 25 deletions

View file

@ -1214,9 +1214,9 @@ impl Parser {
let body = self.parse_query_body(0)?;
let order_by = if self.parse_keywords(vec!["ORDER", "BY"]) {
Some(self.parse_order_by_expr_list()?)
self.parse_order_by_expr_list()?
} else {
None
vec![]
};
let limit = if self.parse_keyword("LIMIT") {
@ -1334,9 +1334,9 @@ impl Parser {
};
let group_by = if self.parse_keywords(vec!["GROUP", "BY"]) {
Some(self.parse_expr_list()?)
self.parse_expr_list()?
} else {
None
vec![]
};
let having = if self.parse_keyword("HAVING") {
@ -1367,9 +1367,9 @@ impl Parser {
let name = self.parse_object_name()?;
// Postgres, MSSQL: table-valued functions:
let args = if self.consume_token(&Token::LParen) {
Some(self.parse_optional_args()?)
self.parse_optional_args()?
} else {
None
vec![]
};
let alias = self.parse_optional_alias(keywords::RESERVED_FOR_TABLE_ALIAS)?;
// MSSQL-specific table hints: