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 #1589

Open
fdietze opened this issue Jun 18, 2024 · 5 comments
Open

Generated columns with stored in sqlite are not marked as generated #1589

fdietze opened this issue Jun 18, 2024 · 5 comments
Assignees
Labels

Comments

@fdietze
Copy link

fdietze commented Jun 18, 2024

Description

It seems like generated columns with stored in sqlite are not marked as generated.

How to Reproduce

create the following schema with sqlite:

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

Then, on that column .isGenerated is false. Without the stored keyword, it is true.

Relevant log output

No response

SchemaCrawler Version

16.21.1

Java Version

21

Operating System and Version

NixOS unstable

Relational Database System and Version

sqlite

JDBC Driver and Version

org.xerial:sqlite-jdbc::3.46.0.0

@sualeh
Copy link
Collaborator

sualeh commented Jun 18, 2024

@fdietze This is not a SchemaCrawler issue, since SchemaCrawler simply reports the information that the SQLite JDBC driver provides.

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
Collaborator

sualeh commented Jun 18, 2024

I created issue xerial/sqlite-jdbc#1132 to make the fix.

@sualeh
Copy link
Collaborator

sualeh commented Jun 18, 2024

@fdietze Here is the PR I submitted: xerial/sqlite-jdbc#1133

@fdietze
Copy link
Author

fdietze commented Jun 19, 2024

That was quick. Thank you so much for your work!

@sualeh
Copy link
Collaborator

sualeh commented Jun 20, 2024

@fdietze The SQLite JDBC driver team has merged the PR. Once they release, I will release a new version of SchemaCrawler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants