Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hsql: Support using DEFAULT for generated columns in Insert #3372

Merged
merged 1 commit into from Jul 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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');