mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-31 03:07:20 +00:00
Move the rest of tests not specific to PG from the sqlparser_postgres.rs
This commit is contained in:
parent
478dbe940d
commit
1347ca0825
3 changed files with 33 additions and 28 deletions
|
@ -3,7 +3,7 @@
|
|||
use matches::assert_matches;
|
||||
|
||||
use sqlparser::sqlast::*;
|
||||
use sqlparser::sqlparser::ParserError;
|
||||
use sqlparser::sqlparser::*;
|
||||
use sqlparser::test_utils::{all_dialects, expr_from_projection, only};
|
||||
|
||||
#[test]
|
||||
|
@ -58,6 +58,18 @@ fn parse_insert_invalid() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_invalid_table_name() {
|
||||
let ast = all_dialects().run_parser_method("db.public..customer", Parser::parse_object_name);
|
||||
assert!(ast.is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_no_table_name() {
|
||||
let ast = all_dialects().run_parser_method("", Parser::parse_object_name);
|
||||
assert!(ast.is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_delete_statement() {
|
||||
let sql = "DELETE FROM \"table\"";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue