Add NUMERIC tests to jdbc code.

David Esposito
This commit is contained in:
Bruce Momjian 2001-05-16 17:09:26 +00:00
parent 863c9d11f1
commit 37b006e074
4 changed files with 28 additions and 3 deletions

View File

@ -2,7 +2,7 @@
build file to build the donated retep tools packages
$Id: build.xml,v 1.5 2001/05/16 16:20:51 momjian Exp $
$Id: build.xml,v 1.6 2001/05/16 17:09:25 momjian Exp $
-->
@ -43,6 +43,7 @@
<target name="compile" depends="checks,prepare,warning" if="jdk1.2+">
<javac srcdir="${src}" destdir="${dest}">
<include name="${package}/**" />
<exclude name="${package}/**" unless="jdk1.2+" />
</javac>
</target>

View File

@ -3,7 +3,7 @@
build file to allow ant (http://jakarta.apache.org/ant/) to be used
to build the PostgreSQL JDBC Driver.
$Id: build.xml,v 1.9 2001/05/16 16:20:52 momjian Exp $
$Id: build.xml,v 1.10 2001/05/16 17:09:26 momjian Exp $
-->
@ -120,7 +120,7 @@
<javac srcdir="${src}" destdir="${dest}">
<include name="example/**" />
<exclude name="example/corba/**"/>
<exclude name="example/blobtest.java" unless="jdk1.2+" />
<exclude name="example/blobtest.java" unless="jdk1.2+"/>
</javac>
</target>

View File

@ -290,6 +290,12 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
return 16;
case Types.VARCHAR:
return 0;
case Types.NUMERIC:
Field f = getField(column);
if(f != null)
return ((0xFFFF0000)&f.mod)>>16;
else
return 0;
default:
return 0;
}
@ -321,6 +327,12 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
return 16;
case Types.VARCHAR:
return 0;
case Types.NUMERIC:
Field f = getField(column);
if(f != null)
return (((0x0000FFFF)&f.mod)-4);
else
return 0;
default:
return 0;
}

View File

@ -285,6 +285,12 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
return 16;
case Types.VARCHAR:
return 0;
case Types.NUMERIC:
Field f = getField(column);
if(f != null)
return ((0xFFFF0000)&f.mod)>>16;
else
return 0;
default:
return 0;
}
@ -316,6 +322,12 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
return 16;
case Types.VARCHAR:
return 0;
case Types.NUMERIC:
Field f = getField(column);
if(f != null)
return (((0x0000FFFF)&f.mod)-4);
else
return 0;
default:
return 0;
}