> > -        else if (tn.indexOf ("INT") != -1)
> > +        else if (tn.indexOf ("INT") != -1 ||
> > +                 tn.indexOf ("NUMBER") != -1)
> >          {
> > +            if (size.indexOf(",") != -1)
> > +            {
> > +                torqueType = "FLOAT";
> > +                columnType = new Float (0);
> > +            }
> > +            else if (size.length() > 1)
> > +            {
> > +                torqueType = "NUMERIC";
> > +                columnType = new java.math.BigDecimal (0);
> > +            }
> > +            else
> > +            {
> >              torqueType = "INTEGER";
> >              columnType = new Integer (0);
> >          }
> 
> This looks to me that any numeric that has a size setting 
> that includes
> a comma will be a FLOAT, otherwise if it has a size argument at all it
> is NUMERIC, otherwise it is an INTEGER.  This does not look right.  So
> NUMERIC fields cannot hold decimals?  Why is a SIZE=3 column a NUMERIC
> and not an INTEGER?  Will a FLOAT of SIZE=(100,50) work?

The simple algorithm we are applying for our development here is:

NUMBER(X,Y) => Float
NUMBER(X) => BigDecimal
NUMBER => Integer

This sufficed for our very basic purposes (but is arguably incomlete).
The ideal would be:

INT => Integer
FLOAT => Float (or Double?)
NUMBER(X) => if X less than a certain size, Integer, else, BigInteger
NUMBER(X,Y) => if Y is zero, as above, else if x less than a certain size,
Float (or Double?), else BigDecimal

but I don't know what the breaking values are for deciding here.
Maybe we could just say:

INT => Integer
FLOAT => Float (or Double?)
NUMBER(X) => BigInteger
NUMBER(X,Y) => if Y is zero, as above, else BigDecimal


I'm also not sure what torqueType = "NUMERIC" means.

> john mcnally


-- 
Gonzalo A. Diethelm
[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to