PySimpleSQL / pysimplesql

SQLite3 binding for PySimpleGUI
GNU Lesser General Public License v3.0
45 stars 16 forks source link

TODO: capture generated columns in all sqldrivers #314

Closed ssweber closed 1 year ago

ssweber commented 1 year ago

We now add generated columns in Datasets, , don’t try to update or insert into generated columns, and make generated columns “readonly” in CellEdit.

Just putting this here for future reminder.

PySimpleSQL commented 1 year ago

Thanks for this, it's actually something I use often in my own projects and have been trying to think of a good work around. Doing them at the driver level makes a lot of sense!

ssweber commented 1 year ago

For sure! I found it super useful in the orders example

I didn’t see the need to distinguish between stored vs virtual generated, but I went ahead and copied it over as-is (eg hidden = 1 or 2 for SQLite), but it still works for generated, not generated.

I’ll probably do the same for the other drivers (MySQL stores it as “, AND EXTRA = 'VIRTUAL GENERATED' OR EXTRA = 'STORED GENERATED' ) unless you want to standardize on a constant convention.

ssweber commented 1 year ago

330

I also standardized on True/False

Msaccess doesn't have generated columns, correct? we can then close this out.

ssweber commented 1 year ago

nevermind, they do have 'calculated'. and added that to sqldriver.