Order of events in sqlite exported database

I’m extracting some data from a database generated by SQLite export.
One thing that is not clear to me is the order of events etc. In Gramps you can move e.g. events for a person up or down to get a specific order. In the exported database there will be corresponding rows in the “link” table from “person” to “event_ref” but I don’t see any column related to the order.

A database normally doesn’t have a “default row order”. However it seems like SQLite has a “hidden” column named “rowid”. So maybe the rows in the links table are added in the same order as in Gramps and sorting by rowid will result in the correct order?

Can anyone confirm that or tell me if there is another way to get the correct sort order?

FYI the thirdparty SQLite export and import addons are experimental and don’t support everything in the database.

A request was made to support everything

I did a quick test in which I verified that the rowid values in the link table (in this case, linking a family handle to its child_ref handles) do indeed correspond to the order of the children as shown in the user interface. I’m not a python developer, but I can see in the code that it is creating the link rows within a construct headed by the statement “for child_ref in ref_list:”.

By the way, when working with the export, you may have noticed that some column values are not populated; see this thread for details.

It looks like I can get all “important” stuff. Grouping surnames for names where “Group all people with the same name” has been selected does not seem present in any table, but that’s a minor issue. And I copied the standard types from the source code.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.