|
From: Scott M S. <st...@us...> - 2003-10-22 17:05:48
|
User: starksm
Date: 03/10/21 18:42:03
Modified: src/etc/conf/default standardjbosscmp-jdbc.xml
Log:
Add FirstSQL/J type mappings
Revision Changes Path
1.62 +129 -1 jboss/src/etc/conf/default/standardjbosscmp-jdbc.xml
Index: standardjbosscmp-jdbc.xml
===================================================================
RCS file: /cvsroot/jboss/jboss/src/etc/conf/default/standardjbosscmp-jdbc.xml,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -r1.61 -r1.62
--- standardjbosscmp-jdbc.xml 11 Sep 2003 13:54:38 -0000 1.61
+++ standardjbosscmp-jdbc.xml 22 Oct 2003 01:42:03 -0000 1.62
@@ -9,7 +9,7 @@
<!-- -->
<!-- ===================================================================== -->
-<!-- $Id: standardjbosscmp-jdbc.xml,v 1.61 2003/09/11 13:54:38 pilhuhn Exp $ -->
+<!-- $Id: standardjbosscmp-jdbc.xml,v 1.62 2003/10/22 01:42:03 starksm Exp $ -->
<jbosscmp-jdbc>
@@ -46,6 +46,134 @@
</defaults>
<type-mappings>
+ <type-mapping>
+ <name>FirstSQL/J</name>
+ <row-locking-template/>
+ <pk-constraint-template>PRIMARY KEY (?1)</pk-constraint-template>
+ <fk-constraint-template>FOREIGN KEY (?1) REFERENCES ?2 (?3)</fk-constraint-template>
+ <alias-header-prefix>t</alias-header-prefix>
+ <alias-header-suffix>_</alias-header-suffix>
+ <alias-max-length>32</alias-max-length>
+ <subquery-supported>true</subquery-supported>
+ <true-mapping>1</true-mapping>
+ <false-mapping>0</false-mapping>
+
+ <function-mapping>
+ <function-name>concat</function-name>
+ <function-sql>(?1 || ?2)</function-sql>
+ </function-mapping>
+ <function-mapping>
+ <function-name>substring</function-name>
+ <function-sql>substring(?1 FROM ?2 FOR ?3)</function-sql>
+ </function-mapping>
+ <function-mapping>
+ <function-name>lcase</function-name>
+ <function-sql>lower(?1)</function-sql>
+ </function-mapping>
+ <function-mapping>
+ <function-name>length</function-name>
+ <function-sql>char_length(?1)</function-sql>
+ </function-mapping>
+ <function-mapping>
+ <function-name>locate</function-name>
+ <function-sql>position(?1 IN ?2)</function-sql>
+ </function-mapping>
+ <function-mapping>
+ <function-name>abs</function-name>
+ <function-sql>math.abs(?1)</function-sql>
+ </function-mapping>
+ <function-mapping>
+ <function-name>sqrt</function-name>
+ <function-sql>math.sqrt(CAST(?1 AS DOUBLE))</function-sql>
+ </function-mapping>
+ <function-mapping>
+ <function-name>ucase</function-name>
+ <function-sql>upper(?1)</function-sql>
+ </function-mapping>
+ <function-mapping>
+ <function-name>count</function-name>
+ <function-sql>count(?1)</function-sql>
+ </function-mapping>
+
+ <mapping>
+ <java-type>java.lang.Boolean</java-type>
+ <jdbc-type>TINYINT</jdbc-type>
+ <sql-type>TINYINT</sql-type>
+ </mapping>
+ <mapping>
+ <java-type>java.lang.Byte</java-type>
+ <jdbc-type>TINYINT</jdbc-type>
+ <sql-type>TINYINT</sql-type>
+ </mapping>
+ <mapping>
+ <java-type>java.lang.Short</java-type>
+ <jdbc-type>SMALLINT</jdbc-type>
+ <sql-type>SMALLINT</sql-type>
+ </mapping>
+ <mapping>
+ <java-type>java.lang.Integer</java-type>
+ <jdbc-type>INTEGER</jdbc-type>
+ <sql-type>INTEGER</sql-type>
+ </mapping>
+ <mapping>
+ <java-type>java.lang.Long</java-type>
+ <jdbc-type>BIGINT</jdbc-type>
+ <sql-type>BIGINT</sql-type>
+ </mapping>
+ <mapping>
+ <java-type>java.lang.Float</java-type>
+ <jdbc-type>REAL</jdbc-type>
+ <sql-type>REAL</sql-type>
+ </mapping>
+ <mapping>
+ <java-type>java.lang.Double</java-type>
+ <jdbc-type>DOUBLE</jdbc-type>
+ <sql-type>DOUBLE</sql-type>
+ </mapping>
+ <mapping>
+ <java-type>java.lang.Character</java-type>
+ <jdbc-type>CHAR</jdbc-type>
+ <sql-type>CHAR</sql-type>
+ </mapping>
+ <mapping>
+ <java-type>java.lang.String</java-type>
+ <jdbc-type>VARCHAR</jdbc-type>
+ <!-- or <sql-type>VARCHAR(2147483500)</sql-type> -->
+ <sql-type>VARCHAR(256)</sql-type>
+ </mapping>
+ <mapping>
+ <java-type>java.sql.Date</java-type>
+ <jdbc-type>DATE</jdbc-type>
+ <sql-type>DATE</sql-type>
+ </mapping>
+ <mapping>
+ <java-type>java.sql.Time</java-type>
+ <jdbc-type>TIME</jdbc-type>
+ <sql-type>TIME</sql-type>
+ </mapping>
+ <mapping>
+ <java-type>java.sql.Timestamp</java-type>
+ <jdbc-type>TIMESTAMP</jdbc-type>
+ <sql-type>TIMESTAMP</sql-type>
+ </mapping>
+ <mapping>
+ <java-type>java.util.Date</java-type>
+ <jdbc-type>TIMESTAMP</jdbc-type>
+ <sql-type>TIMESTAMP</sql-type>
+ </mapping>
+ <mapping>
+ <java-type>java.math.BigDecimal</java-type>
+ <jdbc-type>DECIMAL</jdbc-type>
+ <sql-type>DECIMAL</sql-type>
+ </mapping>
+ <mapping>
+ <java-type>java.lang.Object</java-type>
+ <!-- FirstSQL/J only supports directly serializable objects for classes declared with CREATE CLASS -->
+ <jdbc-type>LONGVARBINARY</jdbc-type>
+ <sql-type>VARCHAR(2147483500)</sql-type>
+ </mapping>
+ </type-mapping>
+
<type-mapping>
<name>Ingres</name>
<row-locking-template>SELECT ?1 FROM ?2 WHERE ?3 FOR UPDATE</row-locking-template>
|