diff --git a/dialects/hsql/src/main/kotlin/app/cash/sqldelight/dialects/hsql/grammar/hsql.bnf b/dialects/hsql/src/main/kotlin/app/cash/sqldelight/dialects/hsql/grammar/hsql.bnf index a5768634594..6b0da743552 100644 --- a/dialects/hsql/src/main/kotlin/app/cash/sqldelight/dialects/hsql/grammar/hsql.bnf +++ b/dialects/hsql/src/main/kotlin/app/cash/sqldelight/dialects/hsql/grammar/hsql.bnf @@ -6,7 +6,7 @@ implements="com.alecstrong.sql.psi.core.psi.SqlCompositeElement" extends="com.alecstrong.sql.psi.core.psi.SqlCompositeElementImpl" psiClassPrefix = "Hsql" - + parserImports=[ "static com.alecstrong.sql.psi.core.psi.SqlTypes.CONSTRAINT" "static com.alecstrong.sql.psi.core.psi.SqlTypes.PRIMARY" @@ -61,7 +61,7 @@ column_constraint ::= [ CONSTRAINT {identifier} ] ( implements = "com.alecstrong.sql.psi.core.psi.SqlColumnConstraint" override = true } -bind_parameter ::= ( '?' | ':' {identifier} ) { +bind_parameter ::= ( 'DEFAULT' | '?' | ':' {identifier} ) { extends = "com.alecstrong.sql.psi.core.psi.impl.SqlBindParameterImpl" implements = "com.alecstrong.sql.psi.core.psi.SqlBindParameter" override = true diff --git a/dialects/hsql/src/test/fixtures_hsql/insert/insert.s b/dialects/hsql/src/test/fixtures_hsql/insert/insert.s index b6a8643df65..cc36a4751f4 100644 --- a/dialects/hsql/src/test/fixtures_hsql/insert/insert.s +++ b/dialects/hsql/src/test/fixtures_hsql/insert/insert.s @@ -3,6 +3,6 @@ CREATE TABLE InsertTbl ( name VARCHAR(255) NOT NULL ); -INSERT INTO InsertTbl VALUES (1, 'john'); +INSERT INTO InsertTbl VALUES (DEFAULT, 'john'); -INSERT INTO InsertTbl(name) VALUES ('john'); \ No newline at end of file +INSERT INTO InsertTbl(name) VALUES ('john');