/
hsqldb.xml
84 lines (79 loc) · 3.83 KB
/
hsqldb.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd"
default-lazy-init="true">
<bean id="stringTemplate" class="java.lang.String">
<constructor-arg>
<value>
<![CDATA[ case when $(tableAlias).$(columnName) is null then '' else concat(concat('"',replace(replace($(tableAlias).$(columnName),'\','\\'),'"','\"')),'"') end ||','||]]>
</value>
</constructor-arg>
</bean>
<bean id="hsqldbDialect"
class="org.jumpmind.symmetric.db.hsqldb.HsqlDbDialect"
scope="prototype">
<property name="tablePrefix" value="${sync.table.prefix}" />
<property name="engineName"
value="${symmetric.runtime.engine.name}" />
<property name="streamingResultsFetchSize"
value="${db.jdbc.streaming.results.fetch.size}" />
<property name="sqlTemplate">
<bean class="org.jumpmind.symmetric.db.SqlTemplate">
<property name="triggerPrefix"
value="${symmetric.runtime.trigger.prefix}" />
<property name="stringColumnTemplate"
ref="stringTemplate" />
<property name="clobColumnTemplate"
ref="stringTemplate" />
<property name="blobColumnTemplate">
<value>
<![CDATA['unsupported'||','||]]>
</value>
</property>
<property name="numberColumnTemplate">
<value>
<![CDATA[coalesce(cast($(tableAlias).$(columnName) as varchar(50)), '')||','||]]>
</value>
</property>
<property name="datetimeColumnTemplate">
<value>
<![CDATA[ case when $(tableAlias).$(columnName) is null then '' else concat(concat('"',to_char($(tableAlias).$(columnName), 'YYYY-MM-DD HH24:MI:SS')),'"') end ||','||]]>
</value>
</property>
<property name="triggerConcatCharacter" value="||" />
<property name="sqlTemplates">
<map>
<entry key="insertTriggerTemplate">
<value>
<![CDATA[
CREATE TRIGGER $(triggerName)_$(engineName)_$(triggerHistoryId) AFTER INSERT ON $(tableName) FOR EACH ROW QUEUE 0 CALL "org.jumpmind.symmetric.db.hsqldb.HsqlDbTrigger"
]]>
</value>
</entry>
<entry key="updateTriggerTemplate">
<value>
<![CDATA[
]]>
</value>
</entry>
<entry key="deleteTriggerTemplate">
<value>
<![CDATA[
]]>
</value>
</entry>
<entry key="initialLoadSqlTemplate">
<value>
<![CDATA[select $(columns) from $(schemaName)$(tableName) t where $(whereClause)]]>
</value>
</entry>
</map>
</property>
</bean>
</property>
</bean>
</beans>