cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Enke Michael <Michael.E...@wincor-nixdorf.com>
Subject esql.xsl and postgres datatypes
Date Wed, 03 Apr 2002 10:34:27 GMT
Hi,
in postgres you have datatypes which are not in the sql standard
and you can define your own datatypes.
Two datatypes from postgres that I use often are bit() and bit varying().
If I call <esql:get-columns/> than the page crahses because the column type
for bit and bit varying is java.sql.Types.OTHER
Look at this snippet from esql:xsl:
...
switch(_esql_query.getResultSet().getMetaData().getColumnType(_esql_i)){
   case java.sql.Types.ARRAY:
   case java.sql.Types.STRUCT:
...
      break;
 
   case java.sql.Types.OTHER: // This is what Informix uses for Sets, Bags, Lists
      this._esql_printObject(_esql_query.getResultSet().getObject(_esql_i), xspAttr);
      break;
 
   default:
      // standard type
      <xsp:content>
      <xsp:expr>
        <xsl:call-template name="get-string-encoded">
...

We get the Exception because in the postgres driver there is no getObject for bit or bit varying,
but get-string-encoded for such columns is ok (you can of course define your own extension
classes).
I would propose to switch between different database systems in "case java.sql.Types.OTHER"

Can anybody using Informix tell me what is the result of "connection.getMetaData().getURL();"?
Should we make "String jdbcSource;" public in EsqlConnection?

Regards,
Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message