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

Generated columns with stored in SQLite are not marked as generated #1132

Closed
sualeh opened this issue Jun 18, 2024 · 2 comments · Fixed by #1133
Closed

Generated columns with stored in SQLite are not marked as generated #1132

sualeh opened this issue Jun 18, 2024 · 2 comments · Fixed by #1133
Labels
bug Something isn't working released Issue has been released

Comments

@sualeh
Copy link
Contributor

sualeh commented Jun 18, 2024

Description
Generated columns are not reported as such by database metadata.

To Reproduce
Create the following table with SQLite :

create table foo (
  id integer primary key,
  bar int not null generated always as (id + 1) stored
);

On the bar column IS_GENERATEDCOLUMN is NO with DatabaseMetaData.getColumns. Without the stored keyword, it is YES.

Expected Behavior
On the bar column IS_GENERATEDCOLUMN should be YES with DatabaseMetaData.getColumns.

Additional Context
See JDBC3DatabaseMetaData. It only checks for a value of "2", when according to the SQLite documentation, it should be checking for both 2 and 3.

@sualeh
Copy link
Contributor Author

sualeh commented Jun 18, 2024

Corresponding test is DBMetaDataTest

@sualeh sualeh changed the title Generated columns with stored in SQLite are not marked as generated Generated columns with stored in SQLite are not marked as generated Jun 18, 2024
sualeh added a commit to sualeh/sqlite-jdbc that referenced this issue Jun 18, 2024
@gotson gotson added bug Something isn't working and removed triage labels Jun 19, 2024
@gotson gotson closed this as completed in 429bbe4 Jun 20, 2024
Copy link
Contributor

🎉 This issue has been resolved in 3.46.0.1 (Release Notes)

@github-actions github-actions bot added the released Issue has been released label Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released Issue has been released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants