sebb wrote:

On 15/03/2009, Dan Fabulich <d...@fabulich.com> wrote:
 PLEASE TEST THIS RELEASE WITH A REAL DATABASE!

 Although this project has reasonable unit tests, it has no integration
tests with any actual databases; it is quite possible that the fix for
DBUTILS-31 has broken something on Oracle, MS SQL Server, Derby, or your
favorite database.

 To verify DBUTILS-31, use QueryRunner to put a null value in a field, e.g.
with QueryRunner.update.  Ideally it would be good to verify putting nulls
in fields of various types: char, varchar, int, boolean, date, etc.

Is there a simple ready-made example I could run?

Not really, partly because I'm not sure I could write one effectively without access to an Oracle instance (in which case I'd just run the test myself).

I think you'd need to start by creating the table:

http://www.ss64.com/orasyntax/datatypes.html

  CREATE TABLE dbutilstest (
    varchar2_column varchar2(50),
    nvarchar2_column nvarchar2(50),
    varchar_column varchar(50),
    char_column char(50),
    nchar_column char(50),
    number_column number(9),
    long_column long,
    date_column date,
    timestamp_column timestamp,
    year_interval_column interval year to month,
    day_interval_column interval day to second,
    raw_column raw(50),
    long_raw_column long_raw(50),
    rowid_column rowid,
    urowid_column urowid,
    clob_column clob,
    nclob_column nclob,
    blob_column blob,
    bfile_column bfile,
    xmltype_column xmltype
);

(am I missing any important column types?)

Then you could do something like:

  QueryRunner.update("insert into dbutilstest values(?, ?, ?, ?, ?, ?,"+
    + "?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?", new Object[20]);

I can try to answer further questions if this isn't enough...

-Dan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to