Fix samples for Derby after upgrade

This commit is contained in:
Dave Syer
2011-01-05 15:51:21 +00:00
parent 677c0be465
commit a8e16c6421
9 changed files with 17 additions and 11 deletions

View File

@@ -1,4 +1,5 @@
-- Autogenerated: do not edit this file
-- You might need to remove this section the first time you run against a clean database
DROP TABLE BATCH_STAGING_SEQ ;
DROP TABLE TRADE_SEQ ;
DROP TABLE CUSTOMER_SEQ ;
@@ -12,12 +13,9 @@ DROP TABLE ERROR_LOG ;
-- Autogenerated: do not edit this file
CREATE TABLE CUSTOMER_SEQ (ID BIGINT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, DUMMY VARCHAR(1));
INSERT INTO CUSTOMER_SEQ (ID) values (5);
CREATE TABLE BATCH_STAGING_SEQ (ID BIGINT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, DUMMY VARCHAR(1));
INSERT INTO BATCH_STAGING_SEQ (ID) values (0);
CREATE TABLE TRADE_SEQ (ID BIGINT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, DUMMY VARCHAR(1));
INSERT INTO TRADE_SEQ (ID) values (0);
CREATE TABLE CUSTOMER_SEQ (ID BIGINT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY (start with 5), DUMMY VARCHAR(1));
CREATE TABLE BATCH_STAGING_SEQ (ID BIGINT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY (start with 0), DUMMY VARCHAR(1));
CREATE TABLE TRADE_SEQ (ID BIGINT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY (start with 0), DUMMY VARCHAR(1));
CREATE TABLE BATCH_STAGING (
ID BIGINT NOT NULL PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,

View File

@@ -93,6 +93,7 @@
GAMES.player_id group by GAMES.player_id, GAMES.year_no
</value>
</property>
<property name="verifyCursorPosition" value="${batch.verify.cursor.position}"/>
</bean>
<aop:config>

View File

@@ -14,7 +14,7 @@
<bean id="itemReader" class="org.springframework.batch.item.database.JdbcCursorItemReader">
<property name="dataSource" ref="dataSource"/>
<property name="sql" value="select ID, NAME, CREDIT from CUSTOMER"/>
<property name="verifyCursorPosition" value="${batch.jdbc.verifyCursorPosition}"/>
<property name="verifyCursorPosition" value="${batch.verify.cursor.position}"/>
<property name="rowMapper">
<bean class="org.springframework.batch.sample.domain.trade.internal.CustomerCreditRowMapper"/>
</property>

View File

@@ -28,6 +28,7 @@
</bean>
</property>
<property name="dataSource" ref="dataSource" />
<property name="verifyCursorPosition" value="${batch.verify.cursor.position}"/>
</bean>
<bean id="itemWriter" class="org.springframework.batch.item.mail.SimpleMailMessageItemWriter">

View File

@@ -88,7 +88,7 @@
</value>
</property>
<property name="dataSource" ref="dataSource" />
<property name="verifyCursorPosition" value="${batch.jdbc.verifyCursorPosition}"/>
<property name="verifyCursorPosition" value="${batch.verify.cursor.position}"/>
<property name="rowMapper">
<bean class="org.springframework.batch.sample.domain.trade.internal.CustomerCreditRowMapper" />
</property>

View File

@@ -123,6 +123,7 @@
<property name="rowMapper">
<bean class="org.springframework.batch.sample.domain.trade.internal.TradeRowMapper" />
</property>
<property name="verifyCursorPosition" value="${batch.verify.cursor.position}"/>
</bean>
<bean id="errorLogTasklet" class="org.springframework.batch.sample.common.ErrorLogTasklet" scope="step">

View File

@@ -51,6 +51,7 @@
<property name="rowMapper">
<bean class="org.springframework.batch.sample.domain.trade.internal.TradeRowMapper" />
</property>
<property name="verifyCursorPosition" value="${batch.verify.cursor.position}"/>
</bean>
<bean id="customerSqlItemReader" class="org.springframework.batch.item.database.JdbcCursorItemReader">

View File

@@ -1,3 +1,2 @@
#macro (sequence $name $value)CREATE TABLE ${name} (ID BIGINT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, DUMMY VARCHAR(1));
INSERT INTO ${name} (ID) values (${value});
#macro (sequence $name $value)CREATE TABLE ${name} (ID BIGINT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY (start with ${value}), DUMMY VARCHAR(1));
#end