Skip to content

Fix #3998: insert stmt with 'default values' doesn't work in SQLite #4002

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ororsatti
Copy link

@ororsatti ororsatti commented Jun 27, 2025

Issue

Fixes #3998

Description

Fixing 2 issues:

  • insert statement with 'default values': insert into <table_name> default values;
  • insert statement with 'default values' and a returning statement: insert into <table_name> default values returning *;

The sqlite parser grammer was incorrect.

Tests

  • tested locally
  • added insert with values test case

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jun 27, 2025
@dosubot dosubot bot added the 🔧 golang label Jun 27, 2025
@ororsatti
Copy link
Author

I would also suggest taking a look on the new Sqlite parser grammar by Antlr: https://github.com/antlr/grammars-v4/tree/master/sql/sqlite

I can migrate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:S This PR changes 10-29 lines, ignoring generated files. 🔧 golang
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DEFAULT VALUES doesn't work on sqlite
1 participant