PageRenderTime 37ms CodeModel.GetById 35ms app.highlight 1ms RepoModel.GetById 0ms app.codeStats 0ms

/src/test/java/com/t11e/discovery/datatool/FeedProviderTest.xml

http://github.com/t11e/discovery_datatool
XML | 80 lines | 78 code | 2 blank | 0 comment | 0 complexity | c66033c56fe69f9fb86377d4eb8eafa7 MD5 | raw file
 1<?xml version="1.0" encoding="utf-8"?>
 2<config xmlns="http://transparensee.com/schema/datatool-config-7"
 3  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 4  xsi:schemaLocation="
 5  http://transparensee.com/schema/datatool-config-7
 6  http://transparensee.com/schema/datatool-config-7.xsd">
 7  <dataSources>
 8    <driver name="dataSource" class="org.apache.derby.jdbc.EmbeddedDriver">
 9      <url>jdbc:derby:memory:test;create=true</url>
10    </driver>
11  </dataSources>
12  <publishers>
13    <sqlPublisher name="test-simple" dataSource="dataSource">
14      <snapshot>
15        <set-item idColumn="id" providerColumn="pROVIder" kindColumn="kINd">
16          <query><![CDATA[
17            SELECT id, provider, kind, value as "value"
18            FROM feed_provider_data
19            ORDER BY id, provider, kind
20        ]]></query>
21        </set-item>
22        <remove-item idColumn="id" providerColumn="pROVIder" kindColumn="kINd">
23          <query><![CDATA[
24            SELECT id, provider, kind
25            FROM feed_provider_deleted
26            ORDER BY id, provider, kind
27        ]]></query>
28        </remove-item>
29      </snapshot>
30    </sqlPublisher>
31
32    <sqlPublisher name="test-multi" dataSource="dataSource">
33      <snapshot>
34        <set-item idColumn="id" providerColumn="pROVIder" kindColumn="kINd">
35          <query><![CDATA[
36            SELECT id, provider, kind, value
37            FROM feed_provider_data
38            ORDER BY id, provider, kind
39        ]]></query>
40        </set-item>
41        <set-item idColumn="id" providerColumn="pROVIder" kindColumn="kINd">
42          <query><![CDATA[
43            SELECT id, 'calcp' as provider, 'calck' as kind, value
44            FROM feed_provider_data
45            ORDER BY id, provider, kind
46        ]]></query>
47        </set-item>
48        <set-item idColumn="id">
49          <query><![CDATA[
50            SELECT id, value
51            FROM feed_provider_data
52            ORDER BY id, provider, kind
53        ]]></query>
54        </set-item>
55        <remove-item idColumn="id" providerColumn="pROVIder" kindColumn="kINd">
56          <query><![CDATA[
57            SELECT id, provider, kind
58            FROM feed_provider_deleted
59            ORDER BY id, provider, kind
60        ]]></query>
61        </remove-item>
62        <remove-item idColumn="id" providerColumn="pROVIder" kindColumn="kINd">
63          <query><![CDATA[
64            SELECT id, 'calcp' as provider, 'calck' as kind
65            FROM feed_provider_deleted
66            ORDER BY id, provider, kind
67        ]]></query>
68        </remove-item>
69        <remove-item idColumn="id">
70          <query><![CDATA[
71            SELECT id, provider, kind
72            FROM feed_provider_deleted
73            ORDER BY id, provider, kind
74        ]]></query>
75        </remove-item>
76      </snapshot>
77    </sqlPublisher>
78
79  </publishers>
80</config>