从这个SQL 中可以 快速定位到xml中的脚本的地方。
仔细分析下就知道了。但是这个sql 不能查any 状态下的transition 。
查询方式:
select hs_uuid,f_value from hs_text_blob where f_value like .......
查出的f_value 栏位就是脚本代码。
然后就是扩充下这个sql,可以快速定位到xml中的脚本的地方。
select DISTINCT st.f_text as fromstate, st1.f_text as tostate , tr.f_name from hs_transition tr
LEFT JOIN hs_locale AS st on tr.f_from_state_uuid = left(st.f_item_id,36)
LEFT JOIN hs_locale AS st1 on tr.f_to_state_uuid = left(st1.f_item_id,36)
where st.f_locale_name='zh_CN' and st1.f_locale_name='zh_CN' and (
tr.f_field_script_id in (
select hs_uuid from hs_text_blob where f_value like '%SATConstants.SQL_OP_NOT_EQUAL, "")%'
UNION
select hs_uuid from hs_text_blob where f_value like '%SATConstants.SQL_OP_EQUAL, "")%'
UNION
select hs_uuid from hs_text_blob where f_value like '%SATConstants.SQL_OP_IS_NULL%'
UNION
select hs_uuid from hs_text_blob where f_value like '%SATConstants.SQL_OP_IS_NOT_NULL%'
)
or tr.f_tr_script_id IN
(
select hs_uuid from hs_text_blob where f_value like '%SATConstants.SQL_OP_NOT_EQUAL, "")%'
UNION
select hs_uuid from hs_text_blob where f_value like '%SATConstants.SQL_OP_EQUAL, "")%'
UNION
select hs_uuid from hs_text_blob where f_value like '%SATConstants.SQL_OP_IS_NULL%'
UNION
select hs_uuid from hs_text_blob where f_value like '%SATConstants.SQL_OP_IS_NOT_NULL%'
)
);
最后加上一段话:
转换脚本和域脚本在表hs_text_blob的f_value字段中,其中hs_uuid与hs_transition表中的f_tr_script_id和f_tr_script_id字段对应,这两个字段分别代表域脚本和转换脚本的唯一标识。全局脚本在表hs_global_scipt的f_script字段中