Update comments after the renaming done in PR #105

This commit is contained in:
Nickolay Ponomarev 2019-07-01 04:45:08 +03:00
parent cdba43682f
commit 7d4b488336
8 changed files with 26 additions and 26 deletions

View file

@ -77,27 +77,27 @@ impl TestedDialects {
only_statement
}
/// Ensures that `sql` parses as a single SQLStatement, and is not modified
/// Ensures that `sql` parses as a single [Statement], and is not modified
/// after a serialization round-trip.
pub fn verified_stmt(&self, query: &str) -> Statement {
self.one_statement_parses_to(query, query)
}
/// Ensures that `sql` parses as a single SQLQuery, and is not modified
/// Ensures that `sql` parses as a single [Query], and is not modified
/// after a serialization round-trip.
pub fn verified_query(&self, sql: &str) -> Query {
match self.verified_stmt(sql) {
Statement::Query(query) => *query,
_ => panic!("Expected SQLQuery"),
_ => panic!("Expected Query"),
}
}
/// Ensures that `sql` parses as a single SQLSelect, and is not modified
/// Ensures that `sql` parses as a single [Select], and is not modified
/// after a serialization round-trip.
pub fn verified_only_select(&self, query: &str) -> Select {
match self.verified_query(query).body {
SetExpr::Select(s) => *s,
_ => panic!("Expected SQLSetExpr::Select"),
_ => panic!("Expected SetExpr::Select"),
}
}