mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-22 06:54:07 +00:00
update parse STRICT tables (#903)
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
This commit is contained in:
parent
8877cbafa6
commit
04c9fbaead
5 changed files with 30 additions and 1 deletions
|
@ -242,6 +242,15 @@ fn parse_similar_to() {
|
|||
chk(true);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_create_table_with_strict() {
|
||||
let sql = "CREATE TABLE Fruits (id TEXT NOT NULL PRIMARY KEY) STRICT";
|
||||
if let Statement::CreateTable { name, strict, .. } = sqlite().verified_stmt(sql) {
|
||||
assert_eq!(name.to_string(), "Fruits");
|
||||
assert!(strict);
|
||||
}
|
||||
}
|
||||
|
||||
fn sqlite() -> TestedDialects {
|
||||
TestedDialects {
|
||||
dialects: vec![Box::new(SQLiteDialect {})],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue