Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2021-05-25 16:33:41 +0000
committerRyan T. Baldwin2021-05-25 16:33:41 +0000
commit6657e7e15b5d46795d98b963c58981c6fe1d99f0 (patch)
treed9415c6c008ac76ce8aa06a1495167e7eeea348f /plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee
parente470e6b8a1a34e332db4898b8e16b42f13fa4552 (diff)
downloadorg.eclipse.osee-6657e7e15b5d46795d98b963c58981c6fe1d99f0.tar.gz
org.eclipse.osee-6657e7e15b5d46795d98b963c58981c6fe1d99f0.tar.xz
org.eclipse.osee-6657e7e15b5d46795d98b963c58981c6fe1d99f0.zip
feature[TW19071]: Load tx details in artifact loading
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee')
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/sql/OseeSql.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/sql/OseeSql.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/sql/OseeSql.java
index 8cc90bfa349..ca95a02308f 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/sql/OseeSql.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/sql/OseeSql.java
@@ -39,15 +39,13 @@ public enum OseeSql {
LOAD_HISTORICAL_ARTIFACTS("SELECT%s aj.id2, txs.branch_id, txs.gamma_id, txs.mod_type, art_type_id, guid, aj.id4, aj.id3 AS stripe_transaction_id, txs.app_id FROM osee_join_id4 aj, osee_artifact art, osee_txs txs WHERE aj.query_id = ? AND aj.id2 = art.art_id AND art.gamma_id = txs.gamma_id AND txs.transaction_id <= aj.id3 AND txs.branch_id = aj.id1 order by aj.id1, art.art_id, txs.transaction_id desc", Strings.HintsOrdered),
LOAD_HISTORICAL_ARCHIVED_ARTIFACTS("SELECT%s aj.id2, txs.branch_id, txs.gamma_id, txs.mod_type, art_type_id, guid, aj.id4, aj.id3 AS stripe_transaction_id, txs.app_id FROM osee_join_id4 aj, osee_artifact art, osee_txs_archived txs WHERE aj.query_id = ? AND aj.id2 = art.art_id AND art.gamma_id = txs.gamma_id AND txs.transaction_id <= aj.id3 AND txs.branch_id = aj.id1 order by aj.id1, art.art_id, txs.transaction_id desc", Strings.HintsOrdered),
- LOAD_HISTORICAL_ATTRIBUTES("SELECT att.art_id, att.attr_id, att.value, att.gamma_id, att.attr_type_id, att.uri, aj.id1, txs.mod_type, txs.transaction_id, aj.id4, aj.id3 as stripe_transaction_id, txs.app_id FROM osee_join_id4 aj, osee_attribute att, osee_txs txs WHERE aj.query_id = ? AND aj.id2 = att.art_id AND att.gamma_id = txs.gamma_id AND txs.branch_id = aj.id1 AND txs.transaction_id <= aj.id3 order by txs.branch_id, att.art_id, att.attr_id, txs.transaction_id desc"),
- LOAD_HISTORICAL_ARCHIVED_ATTRIBUTES("SELECT att.art_id, att.attr_id, att.value, att.gamma_id, att.attr_type_id, att.uri, aj.id1, txs.mod_type, txs.transaction_id, aj.id4, aj.id3 as stripe_transaction_id, txs.app_id FROM osee_join_id4 aj, osee_attribute att, osee_txs_archived txs WHERE aj.query_id = ? AND aj.id2 = att.art_id AND att.gamma_id = txs.gamma_id AND txs.branch_id = aj.id1 AND txs.transaction_id <= aj.id3 order by txs.branch_id, att.art_id, att.attr_id, txs.transaction_id desc"),
+ LOAD_HISTORICAL_ATTRIBUTES("SELECT att.art_id, att.attr_id, att.value, att.gamma_id, att.attr_type_id, att.uri, aj.id1, txs.mod_type, aj.id4, aj.id3 as stripe_transaction_id, txs.app_id, txd.* FROM osee_join_id4 aj, osee_attribute att, osee_txs txs, osee_tx_details txd WHERE aj.query_id = ? AND aj.id2 = att.art_id AND att.gamma_id = txs.gamma_id AND txs.branch_id = aj.id1 AND txs.transaction_id <= aj.id3 AND txs.branch_id = txd.branch_id AND txs.transaction_id = txd.transaction_id ORDER BY txs.branch_id, att.art_id, att.attr_id, txs.transaction_id desc"),
+ LOAD_HISTORICAL_ARCHIVED_ATTRIBUTES("SELECT att.art_id, att.attr_id, att.value, att.gamma_id, att.attr_type_id, att.uri, aj.id1, txs.mod_type, aj.id4, aj.id3 as stripe_transaction_id, txs.app_id, txd.* FROM osee_join_id4 aj, osee_attribute att, osee_txs_archived txs, osee_tx_details txd WHERE aj.query_id = ? AND aj.id2 = att.art_id AND att.gamma_id = txs.gamma_id AND txs.branch_id = aj.id1 AND txs.transaction_id <= aj.id3 AND txs.branch_id = txd.branch_id AND txs.transaction_id = txd.transaction_id order by txs.branch_id, att.art_id, att.attr_id, txs.transaction_id desc"),
LOAD_CURRENT_ATTRIBUTES(Strings.SELECT_CURRENT_ATTRIBUTES_PREFIX + "= 1 order by al1.id2, al1.id1, att1.attr_id, txs.transaction_id desc", Strings.HintsOrdered),
LOAD_CURRENT_ATTRIBUTES_WITH_DELETED(Strings.SELECT_CURRENT_ATTRIBUTES_PREFIX + "IN (1, 3) order by al1.id2, al1.id1, att1.attr_id, txs.transaction_id desc", Strings.HintsOrdered),
- LOAD_ALL_CURRENT_ATTRIBUTES(Strings.SELECT_CURRENT_ATTRIBUTES_PREFIX + "IN (1, 2, 3) order by al1.branch_id, al1.art_id, att1.attr_id, txs.transaction_id desc", Strings.HintsOrdered),
LOAD_CURRENT_ARCHIVED_ATTRIBUTES(Strings.SELECT_CURRENT_ARCHIVED_ATTRIBUTES_PREFIX + "= 1 order by al1.id2, al1.id1, att1.attr_id, txs.transaction_id desc", Strings.HintsOrdered),
LOAD_CURRENT_ARCHIVED_ATTRIBUTES_WITH_DELETED(Strings.SELECT_CURRENT_ARCHIVED_ATTRIBUTES_PREFIX + "IN (1, 3) order by al1.id2, al1.id1, att1.attr_id, txs.transaction_id desc", Strings.HintsOrdered),
- LOAD_ALL_CURRENT_ARCHIVED_ATTRIBUTES(Strings.SELECT_CURRENT_ARCHIVED_ATTRIBUTES_PREFIX + "IN (1, 2, 3) order by al1.id2, al1.id1, att1.attr_id, txs.transaction_id desc", Strings.HintsOrdered),
LOAD_RELATIONS("SELECT%s txs.mod_type, rel_link_id, a_art_id, b_art_id, rel_link_type_id, rel.gamma_id, rationale, txs.branch_id, aj.id4, txs.app_id FROM osee_join_id4 aj, osee_relation_link rel, osee_txs txs WHERE aj.query_id = ? AND (aj.id2 = rel.a_art_id OR aj.id2 = rel.b_art_id) AND rel.gamma_id = txs.gamma_id AND txs.tx_current = " + TxCurrent.CURRENT + " AND aj.id1 = txs.branch_id", Strings.HintsOrdered),
LOAD_CURRENT_ARTIFACTS(Strings.SELECT_CURRENT_ARTIFACTS_PREFIX + "= 1", Strings.HintsOrdered),
@@ -136,13 +134,13 @@ public enum OseeSql {
" /*+ ordered index(atr1) index(atr2) index(txs2) */";
private static final String SELECT_CURRENT_ATTRIBUTES_PREFIX =
- "SELECT%s att1.art_id, att1.attr_id, att1.value, att1.gamma_id, att1.attr_type_id, att1.uri, al1.id1, al1.id4, txs.mod_type, txs.transaction_id, txs.app_id FROM osee_join_id4 al1, osee_attribute att1, osee_txs txs WHERE al1.query_id = ? AND al1.id2 = att1.art_id AND att1.gamma_id = txs.gamma_id AND txs.branch_id = al1.id1 AND txs.tx_current ";
+ "SELECT%s att1.art_id, att1.attr_id, att1.value, att1.gamma_id, att1.attr_type_id, att1.uri, al1.id1, al1.id4, txs.mod_type, txs.app_id, txd.* FROM osee_join_id4 al1, osee_attribute att1, osee_txs txs, osee_tx_details txd WHERE al1.query_id = ? AND al1.id2 = att1.art_id AND att1.gamma_id = txs.gamma_id AND txs.branch_id = al1.id1 AND txs.branch_id = txd.branch_id AND txs.transaction_id = txd.transaction_id AND txs.tx_current ";
private static final String SELECT_CURRENT_ARTIFACTS_PREFIX =
"SELECT%s aj.id2, txs.gamma_id, mod_type, art_type_id, guid, txs.branch_id, txs.app_id, aj.id4 FROM osee_join_id4 aj, osee_artifact art, osee_txs txs WHERE aj.query_id = ? AND aj.id2 = art.art_id AND art.gamma_id = txs.gamma_id AND txs.branch_id = aj.id1 AND txs.tx_current ";
private static final String SELECT_CURRENT_ARCHIVED_ATTRIBUTES_PREFIX =
- "SELECT%s att1.art_id, att1.attr_id, att1.value, att1.gamma_id, att1.attr_type_id, att1.uri, al1.id1, txs.mod_type, txs.transaction_id, txs.app_id, al1.id4 FROM osee_join_id4 al1, osee_attribute att1, osee_txs_archived txs WHERE al1.query_id = ? AND al1.id2 = att1.art_id AND att1.gamma_id = txs.gamma_id AND txs.branch_id = al1.id1 AND txs.tx_current ";
+ "SELECT%s att1.art_id, att1.attr_id, att1.value, att1.gamma_id, att1.attr_type_id, att1.uri, al1.id1, txs.mod_type, txs.app_id, al1.id4, txd.* FROM osee_join_id4 al1, osee_attribute att1, osee_txs_archived txs, osee_tx_details txd WHERE al1.query_id = ? AND al1.id2 = att1.art_id AND att1.gamma_id = txs.gamma_id AND txs.branch_id = al1.id1 AND txs.branch_id = txd.branch_id AND txs.transaction_id = txd.transaction_id AND txs.tx_current ";
private static final String SELECT_CURRENT_ARCHIVED_ARTIFACTS_PREFIX =
"SELECT%s aj.id2, txs.gamma_id, mod_type, art_type_id, guid, txs.branch_id, txs.app_id, aj.id4 FROM osee_join_id4 aj, osee_artifact art, osee_txs_archived txs WHERE aj.query_id = ? AND aj.id2 = art.art_id AND art.gamma_id = txs.gamma_id AND txs.branch_id = aj.id1 AND txs.tx_current ";

Back to the top