xerial/sqlite-jdbc

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

sualeh opened this issue · 2 comments

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.

Corresponding test is DBMetaDataTest

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