Description: I use jdbcDriverOOo[1] for connecting to database with Base. With the latest version I can modify the columns of a table in Base with the different drivers embedded in the extension (HsqlDB, H2, SQLite, Derby, MariaDB, PostgreSQL) On the other hand, I cannot recover the description assigned to the column, nor the non-null constraint, nor the default value. Is it possible to remedy this? Steps to Reproduce: 1.Put description on column in Base. 2.Save your modification. 3.Recreate a new connection to the same database but with new odb file. 4.Your comment on column have been lost... Actual Results: The comment on column in Base are put in the odb file. Expected Results: For database supporting comment on column, it will be possible to commit the description on database. Reproducible: Always User Profile Reset: No Additional Info: No
I forgot the URL: [1] https://prrvchr.github.io/jdbcDriverOOo/
Title of this bug seems to be a little bit misleading. The description in a Base database file will be saved inside the Base database file. Might be you want to summarize with the other information in the table editor, which are only saved in GUI, not send as SQL-code to the database. Remember: Base GUI has been created for using many different kind of "data sources". There are also text tables, address books …. Some data source won't save a "description", others wont save "NOT NULL" or a real default value for new rows. But Base GUI will be able to do this for those data sources. Users of other database systems will need to use direct SQL. But the result won't be shown in the Base GUI. Don't know if it is possible to save inside of the Base File, if it isn't possible to save in the database - and to see both results inside the GUI for creating tables. I will set this one to NEW, because it is an ask for an enhancement.
Hi Robert, It seems that everything happens in the descriptors. Base uses descriptors to talk to the underlying driver. Besides, at one point I managed to obtain a value in the Description property of the descriptors with the comments on the column. Unfortunately I never understood how I managed to obtain the comments and in any case reproduce. If anyone knows a little more, I'm interested...
Besides, to be more precise. Base offers two modes of displaying a table in edition. A mode where there is only one column for the description and a mode where there are two description columns, which makes 4 columns in total in the table editor (Field name, Field type, Description, Description). I don't know how Base intends to display only one description column or two?
Ok, I just found out why I couldn't get the comments on the columns. The SupportsColumnDescription option must be present in the Driver.xcu file and must be under the XML node <MetaData> and not <Properties>. It is a property attached to the driver and not to the connection info. And I confirm that as soon as this option is in place, Base offers two description columns to enter comments. Well, on the other hand, I haven't made any progress on how to assign a default value or a non-null constraint.