maressyl / R.ODB

R package to create, query and update OpenDocument Database (.odb) files.
http://bioinformatics.ovsa.fr/ODB
GNU General Public License v3.0
1 stars 1 forks source link

Allows read-only access or do not save when reading only #12

Open mayeulk opened 3 years ago

mayeulk commented 3 years ago

From R package documentation: "Both manual and automatic modifications can be done on the same .odb file, but users are strongly recommended to not use the two methods simultaneously. This R package works on a copy of the file made at the odb.open call, and this copy will replace the original file at the odb.close call, regardless of what happened between the two calls."

This makes sense in many cases but is annoying for data cleaning, when manual edits are needed to be done in LibreOffice base, depending on data quality tests scripted in R. Use case: a user would write R code accessing the data from an odb file (reading only) and, as they find typos or issues in the data, would manually correct these issus in the odb file. When odb.close() is called, these changes get overwritten.

Possible changes (to be discussed):

Also, note that somehow the documentation for odb.close is misleading at "Closes the connection to the embedded HSQLDB, removing temporary files and updating the .odb file if asked to do so." as it may foul a quick reader into believing this is not the default. (I will propose to fix this in a pull request).