You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Byron Foster <bf...@base2.cc> on 2001/12/13 00:22:25 UTC

[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/engine/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-table-schema.sql
[torque-insert-sql] Executing file:
/home/bfoster/open/torque-orig/bin/test/rttest/src/sql/bookstore-schema.sql
[torque-insert-sql] Executing file:
/home/bfoster/open/torque-orig/bin/test/rttest/src/sql/bookstore-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.bookstore.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.bookstore.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/bookstore-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/engine/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-table-schema.sql
[torque-insert-sql] Executing file:
/home/bfoster/open/torque-orig/bin/test/rttest/src/sql/bookstore-schema.sql
[torque-insert-sql] Executing file:
/home/bfoster/open/torque-orig/bin/test/rttest/src/sql/bookstore-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.bookstore.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.bookstore.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/bookstore-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




Re: [PATCH] Sybase testbed

Posted by Byron Foster <bf...@base2.cc>.
On Wed, 2001-12-12 at 19:04, Jason van Zyl wrote:
> On 12/12/01 7:34 PM, "Byron Foster" <bf...@base2.cc> wrote:
> 
> > On Wed, 2001-12-12 at 16:43, Jason van Zyl wrote:
> >> On 12/12/01 6:22 PM, "Byron Foster" <bf...@base2.cc> wrote:
> >> 
> >>> 
> >>> 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.
> >>> 
> >> 
> >> Why don't you put the sybase specific requirements into the sybase
> >> templates?
> >> 
> >> -- 
> >> 
> >> jvz.
> >> 
> >> Jason van Zyl
> >> 
> > 
> > This is only a problem with the project-insert-sql. The problem occurs
> > when TorqueSQLExec reads in an SQL file to be executed through JDBC.
> > TorqueSQLExec delineates the SQL file into executable "chunks" by the
> > delimiter string, which by default is ";". However, Sybase decided to be
> > different and use "go", using the ";" character causes an error.  I have
> > placed the "go" delimiter into the sybase template files, but still "go"
> > needs to be correctly identified by TorqueSQLExec so that it can
> > correctly parse the file.
> > 
> > What is needed is maybe something like a light weight adapter.
> 
> We have adapters for each of the databases, so we can add that to the list
> of individual peculiarities. Martin or I can take a look at that.

Yea, I actually played with this.  I have code that provides the
adapters with the methods for getting the delimiters.  And the code in
the TorqueSQLExec method to retrieve the adapter from a Modified
DBFactory based on the jdbc driver string.  However, It seems that the
DB class requires a jar file that is not included in the classpath for
the task of inserting sql. Got the "IllegalAccessException".  I stopped
at this point because I didn't want to waste time making a bunch of
changes that would be rejected.

> > Or if
> > there was a way to pass parameters back to the Task from the templates.
> > Another possibility is to end the sybase sql statements with "go //;" or
> > something like this so that TorqueSQLExec would terminate the line
> > correctly, but Sybase would still receive the "go" but would ignore the
> > semicolon. This may look a little strange However in the generated SQL.
> 
> That may look funny but if it would work than we could wait on tinkering
> with the task for now.

I could look into this but if people agreed that pulling the DB adapters
into the torque tasks is the right way to go then it would probably be a
better long term solution, and I could work on this.  Russ Trotter is
working on trying to get non trivial data dump to work.  Meaning
arbitrary strings and data. In this case certain characters have to be
quoted. The qoute/escape character also looks like a DB independent
property, and another good application of using the adapters.

Using the adapters would require I believe pulling in another jar,
However, I have not confirmed that.  Also what I did, in code that did
NOT make it into the patch, was add a method to DBFactory that retrieves
the adapter class from a jdbc driver, then instantiate in the Task. This
eliminated the need to init the DBFactory class with a properties
files,or an ExtendedProperties object, Since all I want is an adapter
Object.

Thanks,
Byron


 


 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [PATCH] Sybase testbed

Posted by Jason van Zyl <jv...@zenplex.com>.
On 12/12/01 7:34 PM, "Byron Foster" <bf...@base2.cc> wrote:

> On Wed, 2001-12-12 at 16:43, Jason van Zyl wrote:
>> On 12/12/01 6:22 PM, "Byron Foster" <bf...@base2.cc> wrote:
>> 
>>> 
>>> 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.
>>> 
>> 
>> Why don't you put the sybase specific requirements into the sybase
>> templates?
>> 
>> -- 
>> 
>> jvz.
>> 
>> Jason van Zyl
>> 
> 
> This is only a problem with the project-insert-sql. The problem occurs
> when TorqueSQLExec reads in an SQL file to be executed through JDBC.
> TorqueSQLExec delineates the SQL file into executable "chunks" by the
> delimiter string, which by default is ";". However, Sybase decided to be
> different and use "go", using the ";" character causes an error.  I have
> placed the "go" delimiter into the sybase template files, but still "go"
> needs to be correctly identified by TorqueSQLExec so that it can
> correctly parse the file.
> 
> What is needed is maybe something like a light weight adapter.

We have adapters for each of the databases, so we can add that to the list
of individual peculiarities. Martin or I can take a look at that.

> Or if
> there was a way to pass parameters back to the Task from the templates.
> Another possibility is to end the sybase sql statements with "go //;" or
> something like this so that TorqueSQLExec would terminate the line
> correctly, but Sybase would still receive the "go" but would ignore the
> semicolon. This may look a little strange However in the generated SQL.

That may look funny but if it would work than we could wait on tinkering
with the task for now.
 
> Open to Suggestions.
> 
> Thanks,
> Byron
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

-- 

jvz.

Jason van Zyl

http://tambora.zenplex.org
http://jakarta.apache.org/turbine
http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [PATCH] Sybase testbed

Posted by Byron Foster <bf...@base2.cc>.
On Wed, 2001-12-12 at 16:43, Jason van Zyl wrote:
> On 12/12/01 6:22 PM, "Byron Foster" <bf...@base2.cc> wrote:
> 
> > 
> > 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.
> > 
> 
> Why don't you put the sybase specific requirements into the sybase
> templates?
> 
> -- 
> 
> jvz.
> 
> Jason van Zyl
> 

This is only a problem with the project-insert-sql. The problem occurs
when TorqueSQLExec reads in an SQL file to be executed through JDBC. 
TorqueSQLExec delineates the SQL file into executable "chunks" by the
delimiter string, which by default is ";". However, Sybase decided to be
different and use "go", using the ";" character causes an error.  I have
placed the "go" delimiter into the sybase template files, but still "go"
needs to be correctly identified by TorqueSQLExec so that it can
correctly parse the file.  

What is needed is maybe something like a light weight adapter.  Or if
there was a way to pass parameters back to the Task from the templates.
Another possibility is to end the sybase sql statements with "go //;" or
something like this so that TorqueSQLExec would terminate the line
correctly, but Sybase would still receive the "go" but would ignore the
semicolon. This may look a little strange However in the generated SQL.

Open to Suggestions.

Thanks,
Byron














--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [PATCH] Sybase testbed

Posted by Jason van Zyl <jv...@zenplex.com>.
On 12/12/01 6:22 PM, "Byron Foster" <bf...@base2.cc> wrote:

> 
> 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.
> 

Why don't you put the sybase specific requirements into the sybase
templates?

-- 

jvz.

Jason van Zyl

http://tambora.zenplex.org
http://jakarta.apache.org/turbine
http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>