GNOME Bugzilla – Bug 630286
Please add handling code for GDate kvp values in SQL, too
Last modified: 2018-06-29 22:44:59 UTC
I've added a GDate kvp value in r18924 earlier this year, and I also added the XML serialization. However, I both forgot and was unable to implement the SQL in/output as well. This GDate kvp value is subsequently being used e.g. in the "posted-date" kvp_slot of a transaction, r18925, which is my attempt to finally fix bug#137017. However, this requires the correct serialization of that kvp value, which currently doesn't happen in the SQL backend. @Phil: Could you add a suitable serialization there? The GDate type in general is already being handled as CT_GDATE in gnc-backend-sql.c, so I guess this can't be too hard.# An example file is in bug#627831 attachment#169522 [details] which contains one transaction with this "posted-date" slot. Currently, after saving to sqlite3 and again saving to XML the posted-date slot has disappeared because the GDate kvp value isn't being handled so far. Once it is implemented, I guess the transaction from that attachment will keep its posted-date slot. Thanks!
For testing, I have started to add test cases to: 1) create a session 2) store the session to sqlite3 file 3) create new session 4) load 2nd session from the sqlite3 file 5) compare all objects in session1/session2 For completeness, there should be all object types, kvp types, but I'm not there yet. This will test some of this.
Turns out that sqlite has changed so that the way I used to modify a table to add a column no longer works. Will require a bit more work than I thought of to fix this. Still, not too hard.
r19647
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=630286. Please update any external references or bookmarks.