You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is this new feature called generated columns in SQLite 3.31.0. See here for details. We should add support for this in the future. As far as I can tell these parts of DB4S need to be changed:
Parser and SQL object representation classes
Disable writing to these columns in the Browse Data tab
Automatically refresh contents of generated columns when other columns are changed in the Browse Data tab
Add support for this in the Edit Table dialog
The first item is the most important one since it is required for even opening these databases.
Reacted by Tony Papadimitriou, Zesen Qian, Justin Clift, burkasaurusrex, Randall "Randy" Forbes, Tom and ewojda
👍 I just spent some time figuring out why my DB would not load due to a syntax error, when it's working fine otherwise. How's this issue moving forward? I tried the latest nightly build for Mac OS and it still could not load the DB. Can I help?
@mnmkng This should work in the latest nightly build and in the release candidate for version 3.12.0 of DB4S. Can you check again? If you still can't open the DB with that this is an issue we should investigate 😄
Automatically refresh contents of generated columns when other columns are changed in the Browse Data tab
the column value is refreshed when a query act on the column, for example applying a filter. So is it really necessary?
I would say that the fourth point:
Add support for this in the Edit Table dialog
is really important since by now one can only create or modify a table with a GENERATED column through issuing a SQL statement. An Idea to implement this in the editor would be to add a column in the edit dialog called "generated" which adds a GENERATED columns set automatically as VIRTUAL, and a checkbox which allows to change it from VIRTUAL to STORED.
Activity
parser: Add support for parsing GENERATED ALWAYS AS columns
Fix inserting into tables with generated columns
Disable editing of generated columns in Browse Data tab
mnmkng commentedon Mar 26, 2020
👍 I just spent some time figuring out why my DB would not load due to a syntax error, when it's working fine otherwise. How's this issue moving forward? I tried the latest nightly build for Mac OS and it still could not load the DB. Can I help?
MKleusberg commentedon Jun 10, 2020
@mnmkng This should work in the latest nightly build and in the release candidate for version 3.12.0 of DB4S. Can you check again? If you still can't open the DB with that this is an issue we should investigate 😄
mnmkng commentedon Jun 11, 2020
Sorry, I removed the generated columns and replaced them with Node.js side calculations shortly after. So it’s been working fine for some time. 🙂
justinclift commentedon Jun 11, 2020
@laqrix Would you be ok to test our recent release candidate, or one of our recent nightly builds, and let us know if this is working for you?
laqrix commentedon Jun 11, 2020
The release candidate appears to work. My test was not extensive, just attempt to load and browse a database with generated columns. Thanks!
justinclift commentedon Jun 11, 2020
Awesome, thanks heaps @laqrix. 😄
@MKleusberg Guessing we should add this to the list of v3.12.x improvements?
MKleusberg commentedon Jun 12, 2020
@justinclift It's already mentioned in the Enhancements section of the Alpha release notes 😄
justinclift commentedon Jun 12, 2020
Cool. Looks like we can close this then. Good work @MKleusberg. 😄
MKleusberg commentedon Jun 12, 2020
Let me reopen this issue for now as there is still some work to do as mentioned in the original issue text 😄
justinclift commentedon Jun 12, 2020
Oops. 😉
mate377 commentedon Aug 29, 2020
Regarding the third point:
the column value is refreshed when a query act on the column, for example applying a filter. So is it really necessary?
I would say that the fourth point:
is really important since by now one can only create or modify a table with a
GENERATEDcolumn through issuing aSQLstatement. An Idea to implement this in the editor would be to add a column in the edit dialog called "generated" which adds aGENERATEDcolumns set automatically asVIRTUAL, and a checkbox which allows to change it fromVIRTUALtoSTORED.lilygthb commentedon Sep 10, 2026
is there any news regarding the support of generated column via the GUI?