db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vignesh Swaminathan" <vswam...@cordys.com>
Subject RE: What is the support for CLOB and BLOB?
Date Thu, 02 Mar 2006 04:37:50 GMT
>You can define binary data in your data xml file (e.g. in base64
encoding or using your own custom >data converter), and DdlUtils should
write this into a Blob column without problems (same in the other
direction).

The problem here is that JDBC expects a CLOB/BLOB interface, however
each driver has its own implementation of this interface. So you have a
code piece which looks like

CLOB clobField;
If(MSSQLdriverX)
 clobField = new MSSQLCLOBFromDriverX();
Else if(MSSQLdriverY)
 clobField = new MSSQLCLOBFromDriverY();
Else if (MySQLdriverX)
 clobField = new MySQLCLOB();

You can see that the clob implementation that you can use to get at a
CLOB interface is specific to each driver. This can be abstracted (if
possible) by adding a method to the PlatformImplBase and subclasses of
it called getCLOB()/getBLOB() where specific to the platform we can add
code to retrieve the CLOB/BLOB interface specific to that platform(?).
This will take users of DDLUtils API one more step to being DB
independent.

More of this at
MSSQL
http://msdn2.microsoft.com/en-us/library/ms378813.aspx

Oracle
http://www.oracle.com/technology/sample_code/tech/java/codesnippet/jdbc/
clob10g/handlingclobsinoraclejdbc10g.html

PostgreSQL (could not get official doc)
http://archives.postgresql.org/pgsql-interfaces/2000-07/msg00120.php

MySQL (could not get official doc)
http://forum.java.sun.com/thread.jspa?threadID=576315&messageID=2886886

<vignesh/>

***************************************************************************************************
The information in this message is confidential and may be legally  privileged. 
It is intended solely for the addressee. Access to this message by anyone else is 
unauthorized. If you are not the intended recipient, any disclosure, copying, or 
distribution of the message, or any action or omission taken by you in reliance 
on it is prohibited and may be unlawful. Please immediately contact the sender if 
you have received this message in error. This email does not constitute any 
commitment  from Cordys Holding BV or any of its subsidiaries except when 
expressly agreed in a written agreement between the intended recipient and 
Cordys Holding BV or its subsidiaries.
 ***************************************************************************************************


Mime
View raw message