The delimiter should be defined by the ant task that executes the generated sql. 'go' is used by sybase tools and ; should work from the torque ant tasks. I'll try your testbed here today hopefully...
----------------------------------------------------------------- Jeffrey D. Brekke Quad/Graphics [EMAIL PROTECTED] http://www.qg.com ----------------------------------------------------------------- > -----Original Message----- > From: Byron Foster [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, December 12, 2001 5:22 PM > To: Turbine Developers List > Subject: [PATCH] Sybase testbed > > > > Hello, > > Here is patch to make the sybase testbed work. > The following files/directory need adding: > > file: src/templates/sql/db-init/sybase/createdb.vm > directory: src/templates/sql/load/sybase > file: src/templates/sql/load/sybase/row.vm > file: src/templates/sql/load/sybase/val.vm > file: profile/sybase.profile > > Sybase Unfortunately requires "go" to terminate the lines of SQL. This > currently requires placing the properties "delimiter=;" and > "delimiterType=row" into the build-torque.xml file manually, as > explained in the sybase.profile file. Hopefully we can make this more > transparent in the future. > > Thanks, > Byron > > Output from testbed for sybase: > -------------------------------------------------------------- > --------------- > > Buildfile: build.xml > > init: > > check.velocity: > > check.xerces: > > check.village: > > check.log4j: > > check.commons-collections: > > check.commons-util: > > check.jdbc: > > env: > [echo] java.home = /usr/local/j2sdk1.3.1/jre > [echo] user.home = /home/bfoster > [echo] lib.repo = /home/bfoster/open/jakarta-turbine-2/lib > [echo] village.jar = > /home/bfoster/open/jakarta-turbine-2/lib/village-1.5.3-dev.jar > [echo] velocity.jar = > /home/bfoster/open/jakarta-velocity/bin/velocity-1.3-dev.jar > [echo] xerces.jar = > /home/bfoster/open/jakarta-turbine-2/lib/xerces-1.4.3.jar > [echo] log4j.jar = > /home/bfoster/open/jakarta-turbine-2/lib/log4j-1.1.3.jar > [echo] jdbc.jar = > /home/bfoster/open/jakarta-turbine-2/lib/jdbc2_0-stdext.jar > [echo] junit.jar = > /home/bfoster/open/jakarta-turbine-2/lib/junit-3.7.jar > [echo] commons-collections.jar = > /home/bfoster/open/jakarta-turbine-2/lib/commons-collections.jar > [echo] commons-util.jar = > /home/bfoster/open/jakarta-commons-sandbox/util/commons-util-0 > .1-dev.jar > > prepare: > [mkdir] Created dir: /home/bfoster/open/torque-orig/bin > [mkdir] Created dir: /home/bfoster/open/torque-orig/bin/classes > > compile: > [javac] Compiling 80 source files to > /home/bfoster/open/torque-orig/bin/classes > [copy] Copying 1 file to > /home/bfoster/open/torque-orig/bin/classes/org/apache/torque/e > ngine/database/transform > > jar: > [jar] Building jar: > /home/bfoster/open/torque-orig/bin/torque-3.0-dev.jar > > test: > > filterTokens: > > test-libs: > [mkdir] Created dir: /home/bfoster/open/torque-orig/bin/test/lib > [copy] Copying 1 file to > /home/bfoster/open/torque-orig/bin/test/lib > [copy] Copying 1 file to > /home/bfoster/open/torque-orig/bin/test/lib > [copy] Copying 1 file to > /home/bfoster/open/torque-orig/bin/test/lib > [copy] Copying 1 file to > /home/bfoster/open/torque-orig/bin/test/lib > [copy] Copying 1 file to > /home/bfoster/open/torque-orig/bin/test/lib > [copy] Copying 1 file to > /home/bfoster/open/torque-orig/bin/test/lib > [copy] Copying 1 file to > /home/bfoster/open/torque-orig/bin/test/lib > [copy] Copying 1 file to > /home/bfoster/open/torque-orig/bin/test/lib > [copy] Copying 1 file to > /home/bfoster/open/torque-orig/bin/test/lib > > test-templates: > [copy] Copying 162 files to > /home/bfoster/open/torque-orig/bin/test/templates > > test: > [echo] Copying profile into distribution directory: > /home/bfoster/open/jakarta-turbine-torque/profile/sybase.profile > [copy] Copying 1 file to > /home/bfoster/open/torque-orig/bin/test/rttest > [copy] Copying 2 files to > /home/bfoster/open/torque-orig/bin/test/rttest/schema > [copy] Copying 5 files to > /home/bfoster/open/torque-orig/bin/test/rttest/src/java > [copy] Copying 1 file to > /home/bfoster/open/torque-orig/bin/test/rttest > > test-pre-runtime: > > test-create-db: > > project-create-db: > [torque-create-db] Generating to file > /home/bfoster/open/torque-orig/bin/test/rttest/src/sql/create-db.sql > [torque-create-db] Resolver: used database.dtd from > org.apache.torque.engine.database.transform package > [torque-create-db] Resolver: used database.dtd from > org.apache.torque.engine.database.transform package > [sql] Executing file: > /home/bfoster/open/torque-orig/bin/test/rttest/src/sql/create-db.sql > [sql] 0 of 0 SQL statements executed successfully > > test-project-sql: > > project-sql: > [echo] +------------------------------------------+ > [echo] | | > [echo] | Generating SQL for YOUR Turbine project! | > [echo] | Woo hoo! | > [echo] | | > [echo] +------------------------------------------+ > [torque-sql] Using contextProperties file: > /home/bfoster/open/torque-orig/bin/test/rttest/build.properties > [torque-sql] Generating to file > /home/bfoster/open/torque-orig/bin/test/rttest/src/sql/report. > torque.sql.generation > [torque-sql] Resolver: used database.dtd from > org.apache.torque.engine.database.transform package > [torque-sql] Resolver: used database.dtd from > org.apache.torque.engine.database.transform package > > test-id-table-init-sql: > > id-table-init-sql: > [echo] +------------------------------------------+ > [echo] | | > [echo] | Generating initialization SQL | > [echo] | for ID Broker system! | > [echo] | | > [echo] +------------------------------------------+ > [torque-sql] Using contextProperties file: > /home/bfoster/open/torque-orig/bin/test/templates/sql/id-table /project.props > [torque-sql] Generating to file > /home/bfoster/open/torque-orig/bin/test/rttest/src/sql/sybase- > id-table-init.sql > [torque-sql] Resolver: used database.dtd from > org.apache.torque.engine.database.transform package > [torque-sql] Resolver: used database.dtd from > org.apache.torque.engine.database.transform package > > test-project-insert-sql: > > project-insert-sql: > [torque-insert-sql] Our new url -> jdbc:sybase:Tds:localhost:4100 > [torque-insert-sql] Executing file: > /home/bfoster/open/torque-orig/bin/test/rttest/src/sql/id-tabl > e-schema.sql > [torque-insert-sql] Executing file: > /home/bfoster/open/torque-orig/bin/test/rttest/src/sql/booksto > re-schema.sql > [torque-insert-sql] Executing file: > /home/bfoster/open/torque-orig/bin/test/rttest/src/sql/booksto > re-schema-idtable-init.sql > [torque-insert-sql] 12 of 12 SQL statements executed successfully > > test-project-om: > > project-om: > [echo] +------------------------------------------+ > [echo] | | > [echo] | Generating Peer-based Object Model for | > [echo] | YOUR Turbine project! Woo hoo! | > [echo] | | > [echo] +------------------------------------------+ > [torque-om] Using contextProperties file: > /home/bfoster/open/torque-orig/bin/test/rttest/build.properties > [torque-om] Generating to file > /home/bfoster/open/torque-orig/bin/test/rttest/src/java/report > .torque.om.generation > [torque-om] Resolver: used database.dtd from > org.apache.torque.engine.database.transform package > [torque-om] Resolver: used database.dtd from > org.apache.torque.engine.database.transform package > > compile: > [mkdir] Created dir: > /home/bfoster/open/torque-orig/bin/test/rttest/bin/classes > [javac] Compiling 11 source files to > /home/bfoster/open/torque-orig/bin/test/rttest/bin/classes > > filterTokens: > > test-runtime: > [echo] > /home/bfoster/open/jakarta-turbine-2/lib/log4j-1.1.3.jar > /home/bfoster/open/jakarta-turbine-2/lib/jdbc2_0-stdext.jar > /home/bfoster/open/jakarta-turbine-2/lib/commons-collections.jar > > /home/bfoster/open/jakarta-commons-sandbox/util/commons-util-0 > .1-dev.jar > /home/bfoster/open/jakarta-turbine-2/lib/village-1.5.3-dev.jar > ./bin/classes > ./bin/test/rttest/bin/classes > /home/bfoster/b2tools/jar/latest/jconn2-5.5.jar > > [copy] Copying 1 file to > /home/bfoster/open/torque-orig/bin/test/rttest > > test-post-runtime: > > test-project-datadtd: > > project-datadtd: > [echo] +-----------------------------------------------+ > [echo] | | > [echo] | Generating Data DTD for YOUR Turbine project! | > [echo] | Woo hoo! | > [echo] | | > [echo] +-----------------------------------------------+ > [torque-datadtd] Using contextProperties file: > /home/bfoster/open/torque-orig/bin/test/rttest/build.properties > [torque-datadtd] Generating to file > /home/bfoster/open/torque-orig/bin/test/rttest/src/report.book > store.datadtd.generation > [torque-datadtd] Resolver: used database.dtd from > org.apache.torque.engine.database.transform package > [torque-datadtd] Resolver: used database.dtd from > org.apache.torque.engine.database.transform package > > test-project-datadump: > > project-datadump: > [echo] +-----------------------------------------------+ > [echo] | | > [echo] | Dumping the data from database into XML | > [echo] | Woo hoo! | > [echo] | | > [echo] +-----------------------------------------------+ > [echo] taking build.properties from: build.properties > [torque-datadump] Using contextProperties file: > /home/bfoster/open/torque-orig/bin/test/rttest/build.properties > [torque-datadump] Generating to file > /home/bfoster/open/torque-orig/bin/test/rttest/src/report.book > store.datadump.generation > [torque-datadump] Resolver: used database.dtd from > org.apache.torque.engine.database.transform package > [torque-datadump] Resolver: used database.dtd from > org.apache.torque.engine.database.transform package > [torque-datadump] Fetching data for table book > [torque-datadump] Fetching data for table author > > test-project-datasql: > [copy] Copying 1 file to > /home/bfoster/open/torque-orig/bin/test/rttest/schema > [copy] Copying 1 file to > /home/bfoster/open/torque-orig/bin/test/rttest/schema > > project-datasql: > [echo] +-----------------------------------------------+ > [echo] | | > [echo] | Generating SQL from data XML ! | > [echo] | Woo hoo! | > [echo] | | > [echo] +-----------------------------------------------+ > [echo] taking build.properties from: build.properties > [torque-datasql] Using contextProperties file: > /home/bfoster/open/torque-orig/bin/test/rttest/build.properties > [torque-datasql] Generating to file > /home/bfoster/open/torque-orig/bin/test/rttest/src/bookstore-data.sql > [torque-datasql] Resolver: used database.dtd from > org.apache.torque.engine.database.transform package > [torque-datasql] Resolver: used database.dtd from > org.apache.torque.engine.database.transform package > [torque-datasql] Resolver: used > /home/bfoster/open/torque-orig/bin/test/rttest/schema/bookstor > e-data.dtd > > test-project-jdbc: > > project-jdbc: > [echo] +-----------------------------------------------+ > [echo] | | > [echo] | Generating XML from JDBC connection ! | > [echo] | Woo hoo! | > [echo] | | > [echo] +-----------------------------------------------+ > [echo] taking build.properties from: build.properties > [torque-jdbc] Torque - JDBCToXMLSchema starting > [torque-jdbc] > [torque-jdbc] Your DB settings are: > [torque-jdbc] driver : com.sybase.jdbc2.jdbc.SybDriver > [torque-jdbc] URL : jdbc:sybase:Tds:localhost:4100 > [torque-jdbc] user : sa > [torque-jdbc] password : abc123 > [torque-jdbc] schema : ${databaseSchema} > [torque-jdbc] DB driver sucessfuly instantiated > [torque-jdbc] DB connection established > [torque-jdbc] Getting table list... > [torque-jdbc] Building column/table map... > [torque-jdbc] > [torque-jdbc] Torque - JDBCToXMLSchema finished > > BUILD SUCCESSFUL > > Total time: 54 seconds > Buildfile: build.xml > > init: > > check.velocity: > > check.xerces: > > check.village: > > check.log4j: > > check.commons-collections: > > check.commons-util: > > check.jdbc: > > env: > [echo] java.home = /usr/local/j2sdk1.3.1/jre > [echo] user.home = /home/bfoster > [echo] lib.repo = /home/bfoster/open/jakarta-turbine-2/lib > [echo] village.jar = > /home/bfoster/open/jakarta-turbine-2/lib/village-1.5.3-dev.jar > [echo] velocity.jar = > /home/bfoster/open/jakarta-velocity/bin/velocity-1.3-dev.jar > [echo] xerces.jar = > /home/bfoster/open/jakarta-turbine-2/lib/xerces-1.4.3.jar > [echo] log4j.jar = > /home/bfoster/open/jakarta-turbine-2/lib/log4j-1.1.3.jar > [echo] jdbc.jar = > /home/bfoster/open/jakarta-turbine-2/lib/jdbc2_0-stdext.jar > [echo] junit.jar = > /home/bfoster/open/jakarta-turbine-2/lib/junit-3.7.jar > [echo] commons-collections.jar = > /home/bfoster/open/jakarta-turbine-2/lib/commons-collections.jar > [echo] commons-util.jar = > /home/bfoster/open/jakarta-commons-sandbox/util/commons-util-0 > .1-dev.jar > > prepare: > [mkdir] Created dir: /home/bfoster/open/torque-orig/bin > [mkdir] Created dir: /home/bfoster/open/torque-orig/bin/classes > > compile: > [javac] Compiling 80 source files to > /home/bfoster/open/torque-orig/bin/classes > [copy] Copying 1 file to > /home/bfoster/open/torque-orig/bin/classes/org/apache/torque/e > ngine/database/transform > > jar: > [jar] Building jar: > /home/bfoster/open/torque-orig/bin/torque-3.0-dev.jar > > test: > > filterTokens: > > test-libs: > [mkdir] Created dir: /home/bfoster/open/torque-orig/bin/test/lib > [copy] Copying 1 file to > /home/bfoster/open/torque-orig/bin/test/lib > [copy] Copying 1 file to > /home/bfoster/open/torque-orig/bin/test/lib > [copy] Copying 1 file to > /home/bfoster/open/torque-orig/bin/test/lib > [copy] Copying 1 file to > /home/bfoster/open/torque-orig/bin/test/lib > [copy] Copying 1 file to > /home/bfoster/open/torque-orig/bin/test/lib > [copy] Copying 1 file to > /home/bfoster/open/torque-orig/bin/test/lib > [copy] Copying 1 file to > /home/bfoster/open/torque-orig/bin/test/lib > [copy] Copying 1 file to > /home/bfoster/open/torque-orig/bin/test/lib > [copy] Copying 1 file to > /home/bfoster/open/torque-orig/bin/test/lib > > test-templates: > [copy] Copying 162 files to > /home/bfoster/open/torque-orig/bin/test/templates > > test: > [echo] Copying profile into distribution directory: > /home/bfoster/open/jakarta-turbine-torque/profile/sybase.profile > [copy] Copying 1 file to > /home/bfoster/open/torque-orig/bin/test/rttest > [copy] Copying 2 files to > /home/bfoster/open/torque-orig/bin/test/rttest/schema > [copy] Copying 5 files to > /home/bfoster/open/torque-orig/bin/test/rttest/src/java > [copy] Copying 1 file to > /home/bfoster/open/torque-orig/bin/test/rttest > > test-pre-runtime: > > test-create-db: > > project-create-db: > [torque-create-db] Generating to file > /home/bfoster/open/torque-orig/bin/test/rttest/src/sql/create-db.sql > [torque-create-db] Resolver: used database.dtd from > org.apache.torque.engine.database.transform package > [torque-create-db] Resolver: used database.dtd from > org.apache.torque.engine.database.transform package > [sql] Executing file: > /home/bfoster/open/torque-orig/bin/test/rttest/src/sql/create-db.sql > [sql] 0 of 0 SQL statements executed successfully > > test-project-sql: > > project-sql: > [echo] +------------------------------------------+ > [echo] | | > [echo] | Generating SQL for YOUR Turbine project! | > [echo] | Woo hoo! | > [echo] | | > [echo] +------------------------------------------+ > [torque-sql] Using contextProperties file: > /home/bfoster/open/torque-orig/bin/test/rttest/build.properties > [torque-sql] Generating to file > /home/bfoster/open/torque-orig/bin/test/rttest/src/sql/report. > torque.sql.generation > [torque-sql] Resolver: used database.dtd from > org.apache.torque.engine.database.transform package > [torque-sql] Resolver: used database.dtd from > org.apache.torque.engine.database.transform package > > test-id-table-init-sql: > > id-table-init-sql: > [echo] +------------------------------------------+ > [echo] | | > [echo] | Generating initialization SQL | > [echo] | for ID Broker system! | > [echo] | | > [echo] +------------------------------------------+ > [torque-sql] Using contextProperties file: > /home/bfoster/open/torque-orig/bin/test/templates/sql/id-table /project.props > [torque-sql] Generating to file > /home/bfoster/open/torque-orig/bin/test/rttest/src/sql/sybase- > id-table-init.sql > [torque-sql] Resolver: used database.dtd from > org.apache.torque.engine.database.transform package > [torque-sql] Resolver: used database.dtd from > org.apache.torque.engine.database.transform package > > test-project-insert-sql: > > project-insert-sql: > [torque-insert-sql] Our new url -> jdbc:sybase:Tds:localhost:4100 > [torque-insert-sql] Executing file: > /home/bfoster/open/torque-orig/bin/test/rttest/src/sql/id-tabl > e-schema.sql > [torque-insert-sql] Executing file: > /home/bfoster/open/torque-orig/bin/test/rttest/src/sql/booksto > re-schema.sql > [torque-insert-sql] Executing file: > /home/bfoster/open/torque-orig/bin/test/rttest/src/sql/booksto > re-schema-idtable-init.sql > [torque-insert-sql] 12 of 12 SQL statements executed successfully > > test-project-om: > > project-om: > [echo] +------------------------------------------+ > [echo] | | > [echo] | Generating Peer-based Object Model for | > [echo] | YOUR Turbine project! Woo hoo! | > [echo] | | > [echo] +------------------------------------------+ > [torque-om] Using contextProperties file: > /home/bfoster/open/torque-orig/bin/test/rttest/build.properties > [torque-om] Generating to file > /home/bfoster/open/torque-orig/bin/test/rttest/src/java/report > .torque.om.generation > [torque-om] Resolver: used database.dtd from > org.apache.torque.engine.database.transform package > [torque-om] Resolver: used database.dtd from > org.apache.torque.engine.database.transform package > > compile: > [mkdir] Created dir: > /home/bfoster/open/torque-orig/bin/test/rttest/bin/classes > [javac] Compiling 11 source files to > /home/bfoster/open/torque-orig/bin/test/rttest/bin/classes > > filterTokens: > > test-runtime: > [echo] > /home/bfoster/open/jakarta-turbine-2/lib/log4j-1.1.3.jar > /home/bfoster/open/jakarta-turbine-2/lib/jdbc2_0-stdext.jar > /home/bfoster/open/jakarta-turbine-2/lib/commons-collections.jar > > /home/bfoster/open/jakarta-commons-sandbox/util/commons-util-0 > .1-dev.jar > /home/bfoster/open/jakarta-turbine-2/lib/village-1.5.3-dev.jar > ./bin/classes > ./bin/test/rttest/bin/classes > /home/bfoster/b2tools/jar/latest/jconn2-5.5.jar > > [copy] Copying 1 file to > /home/bfoster/open/torque-orig/bin/test/rttest > > test-post-runtime: > > test-project-datadtd: > > project-datadtd: > [echo] +-----------------------------------------------+ > [echo] | | > [echo] | Generating Data DTD for YOUR Turbine project! | > [echo] | Woo hoo! | > [echo] | | > [echo] +-----------------------------------------------+ > [torque-datadtd] Using contextProperties file: > /home/bfoster/open/torque-orig/bin/test/rttest/build.properties > [torque-datadtd] Generating to file > /home/bfoster/open/torque-orig/bin/test/rttest/src/report.book > store.datadtd.generation > [torque-datadtd] Resolver: used database.dtd from > org.apache.torque.engine.database.transform package > [torque-datadtd] Resolver: used database.dtd from > org.apache.torque.engine.database.transform package > > test-project-datadump: > > project-datadump: > [echo] +-----------------------------------------------+ > [echo] | | > [echo] | Dumping the data from database into XML | > [echo] | Woo hoo! | > [echo] | | > [echo] +-----------------------------------------------+ > [echo] taking build.properties from: build.properties > [torque-datadump] Using contextProperties file: > /home/bfoster/open/torque-orig/bin/test/rttest/build.properties > [torque-datadump] Generating to file > /home/bfoster/open/torque-orig/bin/test/rttest/src/report.book > store.datadump.generation > [torque-datadump] Resolver: used database.dtd from > org.apache.torque.engine.database.transform package > [torque-datadump] Resolver: used database.dtd from > org.apache.torque.engine.database.transform package > [torque-datadump] Fetching data for table book > [torque-datadump] Fetching data for table author > > test-project-datasql: > [copy] Copying 1 file to > /home/bfoster/open/torque-orig/bin/test/rttest/schema > [copy] Copying 1 file to > /home/bfoster/open/torque-orig/bin/test/rttest/schema > > project-datasql: > [echo] +-----------------------------------------------+ > [echo] | | > [echo] | Generating SQL from data XML ! | > [echo] | Woo hoo! | > [echo] | | > [echo] +-----------------------------------------------+ > [echo] taking build.properties from: build.properties > [torque-datasql] Using contextProperties file: > /home/bfoster/open/torque-orig/bin/test/rttest/build.properties > [torque-datasql] Generating to file > /home/bfoster/open/torque-orig/bin/test/rttest/src/bookstore-data.sql > [torque-datasql] Resolver: used database.dtd from > org.apache.torque.engine.database.transform package > [torque-datasql] Resolver: used database.dtd from > org.apache.torque.engine.database.transform package > [torque-datasql] Resolver: used > /home/bfoster/open/torque-orig/bin/test/rttest/schema/bookstor > e-data.dtd > > test-project-jdbc: > > project-jdbc: > [echo] +-----------------------------------------------+ > [echo] | | > [echo] | Generating XML from JDBC connection ! | > [echo] | Woo hoo! | > [echo] | | > [echo] +-----------------------------------------------+ > [echo] taking build.properties from: build.properties > [torque-jdbc] Torque - JDBCToXMLSchema starting > [torque-jdbc] > [torque-jdbc] Your DB settings are: > [torque-jdbc] driver : com.sybase.jdbc2.jdbc.SybDriver > [torque-jdbc] URL : jdbc:sybase:Tds:localhost:4100 > [torque-jdbc] user : sa > [torque-jdbc] password : abc123 > [torque-jdbc] schema : ${databaseSchema} > [torque-jdbc] DB driver sucessfuly instantiated > [torque-jdbc] DB connection established > [torque-jdbc] Getting table list... > [torque-jdbc] Building column/table map... > [torque-jdbc] > [torque-jdbc] Torque - JDBCToXMLSchema finished > > BUILD SUCCESSFUL > > Total time: 54 seconds > > > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>