Skip to content

[sqlite] SqliteDialect is unable to parse STRICT tables #898

Closed
@szymek156

Description

@szymek156

There is a newly added feature my code relies on:
https://www.sqlite.org/stricttables.html

It's a keyword STRICT that might be present at the end (after closing brace) of CREATE TABLE, currently parser returns:

ParserError("Expected end of statement, found: STRICT")

to reproduce:

#[test]
fn test_sql_parse() {
        let sql = "
        CREATE TABLE Fruits (
            id TEXT NOT NULL PRIMARY KEY,
            ) STRICT
        ";

        let dialect = SQLiteDialect {}; 
        let ast = Parser::parse_sql(&dialect, sql).unwrap();

        println!("AST: {ast:#?}");
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions