Last active
December 10, 2015 02:48
-
-
Save ivv-private/4370155 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin | |
refresh_mviews; | |
end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dataConfig> | |
<dataSource driver="org.hsqldb.jdbcDriver" url="jdbc:hsqldb:/temp/example/ex" user="sa" /> | |
<function name="decode" class="solr.f.Decode"/> | |
<function name="load" class="solr.f.LoadQuery"/> | |
<function name="run" class="solr.f.RunQuery"/> | |
<document> | |
<entity | |
name="item" | |
query="${dataimporter.functions.load( | |
dataimporter.functions.decode( | |
dataimporter.request.clean, | |
'false', 'delta.sql', | |
'full.sql'))}"> | |
<field column="ID" name="id" /> | |
<field column="NAME" name="name" /> | |
<field column="MANU" name="manu" /> | |
<field column="WEIGHT" name="weight" /> | |
<field column="PRICE" name="price" /> | |
<field column="POPULARITY" name="popularity" /> | |
<field column="INSTOCK" name="inStock" /> | |
<field column="INCLUDES" name="includes" /> | |
</entity> | |
</document> | |
</dataConfig> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select * | |
from | |
v_index_delta | |
where id in | |
(select id from t_item i | |
where ( | |
'${dataimporter.request.id}' is null | |
and i.updated >= to_date( | |
'${dataimporter.last_index_time}', 'yyyy-mm-dd hh24:mi:ss'))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Run material views updating | |
${dataimporter.functions.run('before-full.sql')} */ | |
select * from v_index_full |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<entity name="item" pk="ID" | |
query="SELECT * | |
FROM v_index | |
WHERE '${dataimporter.request.clean}' != 'false' | |
OR id IN | |
(SELECT id | |
FROM t_item i | |
WHERE ('${dataimporter.request.id}' IS NULL | |
AND i.updated >= TO_DATE ('${dataimporter.last_index_time}', 'yyyy-mm-dd hh24:mi:ss')))"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment