db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Russell Simpkins" <RussellSimpk...@funnygarbage.com>
Subject RE: DB independence with CLOB/BLOB/Binary
Date Wed, 30 Jul 2003 13:53:38 GMT
I accomplised this by editing the velocity templates.  BLOB/CLOB support is not so standard
across vendors in my experience, so modifying the template seemed most appropriate for me.
 Heck, BLOB/CLOB is usually not even dealt with.  To pull off what I did, you have to edit
templates/om/Object.vm and Peer.vm.  Then just run torque normally.

For example, in Peer.vm I did the following

#if ($targetDatabase == "postgresql")    
#foreach ($col in $table.Columns)
    #if ($col.type == "BLOB")
	... db specific blob methods
    #end
    #if ($col.type == "CLOB")
	... db specific clob methods
    #end
#end
#end



-----Original Message-----
From: Ashley Hayes [mailto:ashley.hayes@macalla.com]
Sent: Wednesday, July 30, 2003 7:37 AM
To: Torque-User (E-mail)
Subject: DB independence with CLOB/BLOB/Binary 


I need to store some character data of variable size (max a few KB) in a DB
column. The awkward bit is I need it to be as independent as possible from
the DB vendor( in that torque will generate the same OM and types regardless
of the DB vendor) and have reasonable performance.


I've read this mail from Bill Schneider
"http://www.mail-archive.com/turbine-torque-user@jakarta.apache.org/msg01497
.html" which gives a few pointers about these types and their storage
structure in the DBMS.

We are currently developing/testing with Oracle 8.1.7,mysql and mssql.
I'd be interested in hearing from people that have done something similar,
could you include the torque type used, the DB vender(+ version) and the
driver version.

much appreciated,
Ashley






---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message