xerial / sqlite-jdbc

SQLite JDBC Driver
Apache License 2.0
2.86k stars 619 forks source link

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

Closed sualeh closed 5 months ago

sualeh commented 5 months ago

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 commented 5 months ago

Corresponding test is DBMetaDataTest

github-actions[bot] commented 4 months ago

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