SQLUnit User Guide | ||
---|---|---|
<<< Previous | Next >>> |
The Database datatypes supported by SQLUnit are described below. Type classes are the names of the class used by SQLUnit to provide support for that datatype. The Type name is the name of the datatype that is used in the SQLUnit test specification. The Server is the database server for which the datatype is defined. A Server name of Any indicates global support across all databases. The Allow Input, Allows Output and Is Sortable columns indicate whether you can use these datatypes as inputs (in your param element) or as outputs (in your result specifications), and whether you can sort by columns with these datatypes (using the sort-by attribute of the resultset element).
Table 1. SQLUnit Supported Datatypes
Type Class | Type Name | Server | Allows Input | Allows Output | Is Sortable | Wrapper for |
---|---|---|---|---|---|---|
TextType | NTEXT | Microsoft SQL Server | No | Yes | No | java.io.InputStream |
ClobType | CLOB | Any | No | Yes | No | java.sql.Clob |
ClobType | LONGVARCHAR | MySQL | No | Yes | No | java.sql.Clob |
ArrayType | ARRAY | Any | no | yes | no | java.sql.Array |
JavaObjectType | JAVA_OBJECT | Any | No | Yes | No | java.lang.Object |
UnsupportedType | DATALINK | Any | No | No | No | n/a |
UnsupportedType | DISTINCT | Any | No | No | No | n/a |
UnsupportedType | NULL | Any | No | No | No | n/a |
UnsupportedType | REF | Any | No | No | No | n/a |
UnsupportedType | STRUCT | Any | No | No | No | n/a |
IntegerType | INTEGER | Any | Yes | Yes | Yes | java.lang.Integer |
IntegerType | SMALLINT | Sybase ASA | Yes | Yes | Yes | java.lang.Integer |
BinaryType | BINARY | Any | No | Yes | No | java.io.InputStream |
BinaryType | LONGVARBINARY | Any | No | Yes | No | java.io.InputStream |
ByteType | TINYINT | Any | Yes | Yes | Yes | java.lang.Byte |
TimeType | TIME | Any | Yes | Yes | Yes | java.sql.Time |
OracleCursorType | CURSOR | Oracle | No | Yes | No | java.sql.ResultSet |
DateType | DATE | Any | Yes | Yes | Yes | java.sql.Date |
LongType | BIGINT | Any | Yes | Yes | Yes | java.lang.Long |
ByteArrayType | BINARY | Any | No | Yes | No | byte[] |
ByteArrayType | VARBINARY | Any | No | Yes | No | byte[] |
BigDecimalType | DECIMAL | Any | Yes | Yes | Yes | java.math.BigDecimal |
BigDecimalType | NUMERIC | Any | Yes | Yes | Yes | java.math.BigDecimal |
BlobType | BLOB | Any | no | yes | no | java.sql.Blob |
ShortType | SMALLINT | Yes | Yes | Yes | java.lang.Short | |
OtherType | OTHER | Any | No | Yes | No | java.lang.Object |
DoubleType | DOUBLE | Any | Yes | Yes | Yes | java.lang.Double |
TimestampType | TIMESTAMP | Any | Yes | Yes | Yes | java.sql.Timestamp |
BooleanType | BIT | Any | Yes | Yes | Yes | java.lang.Boolean |
BooleanType | BOOLEAN | Any | Yes | Yes | Yes | java.lang.Boolean |
StringType | CHAR | Any | Yes | Yes | Yes | java.lang.String |
StringType | LONGVARCHAR | Any | Yes | Yes | Yes | java.lang.String |
StringType | VARCHAR | Any | Yes | Yes | Yes | java.lang.String |
StringType | NCHAR | Microsoft SQL Server | Yes | Yes | Yes | java.lang.String |
StringType | NVARCHAR | Microsoft SQL Server | Yes | Yes | Yes | java.lang.String |
StringType | FIXED_CHAR | Oracle | Yes | Yes | Yes | java.lang.String |
FloatType | REAL | Any | Yes | Yes | Yes | java.lang.Float |
Starting with version 4.3, the base type mappings have been slightly modified to conform with the usage recommendations from Sun Microsystems. Details of the changes are given below. Table 2. Changes to base type mappings
As a result, the overrides for adaptive_server_anywhere.NUMERIC, adaptive_server_enterprise.NUMERIC, sybase_sql_server.NUMERIC, oracle.NUMERIC, postgresql.NUMERIC and mysql.FLOAT have been removed, since these mappings now conform to the corrected base type mappings. |
<<< Previous | Home | Next >>> |
Error Messages | Extending SQLUnit: Adding support for your own datatypes |