Skip to content

Commit

Permalink
Hsql: Support using DEFAULT for generated columns in Insert (#3372)
Browse files Browse the repository at this point in the history
Co-authored-by: hfhbd <hfhbd@users.noreply.github.com>
  • Loading branch information
hfhbd and hfhbd committed Jul 15, 2022
1 parent 52b2c85 commit af1e044
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions dialects/hsql/src/test/fixtures_hsql/insert/insert.s
Expand Up @@ -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');
INSERT INTO InsertTbl(name) VALUES ('john');

0 comments on commit af1e044

Please sign in to comment.