|
Re: Enumerations used in the OSEE database [message #525241 is a reply to message #522605] |
Mon, 05 April 2010 19:32 |
Ryan Schmitt Messages: 16 Registered: July 2009 |
Junior Member |
|
|
The tx_current values have the following meanings:
0 - not current
1 - current
2 - deleted
3 - artifact deleted
When an item has been deleted, you'll see a tx_current of 2 as the last entry in its history, because there is no way to undelete items currently. A tx_current of 3, "artifact deleted," means that the item (an attribute or relation) was deleted because its associated artifact was deleted.
For historical reasons, there is duplicate logic going on here (both the tx_current and the modtype indicate deletion). Originally, there was no tx_current column at all, and the current row in the txs table was determined by finding the row with the highest transaction ID. The performance of this solution was so poor as to render OSEE completely unusable, so tx_current was introduced as an indexable value that could be used to quickly find the current row.
The reason this is not documented outside of the source code is that it is very, very low level stuff--only a few framework developers ever have to know this stuff, since it's supposed to be encapsulated for the benefit of application developers writing against the OSEE API. Are you trying to insert data directly into the database?
|
|
|
|
|
Re: Enumerations used in the OSEE database [message #576477 is a reply to message #522605] |
Mon, 05 April 2010 19:32 |
Ryan Schmitt Messages: 16 Registered: July 2009 |
Junior Member |
|
|
The tx_current values have the following meanings:
0 - not current
1 - current
2 - deleted
3 - artifact deleted
When an item has been deleted, you'll see a tx_current of 2 as the last entry in its history, because there is no way to undelete items currently. A tx_current of 3, "artifact deleted," means that the item (an attribute or relation) was deleted because its associated artifact was deleted.
For historical reasons, there is duplicate logic going on here (both the tx_current and the modtype indicate deletion). Originally, there was no tx_current column at all, and the current row in the txs table was determined by finding the row with the highest transaction ID. The performance of this solution was so poor as to render OSEE completely unusable, so tx_current was introduced as an indexable value that could be used to quickly find the current row.
The reason this is not documented outside of the source code is that it is very, very low level stuff--only a few framework developers ever have to know this stuff, since it's supposed to be encapsulated for the benefit of application developers writing against the OSEE API. Are you trying to insert data directly into the database?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04288 seconds