summaryrefslogtreecommitdiff
path: root/src/library/scala/dbc/value/ExactNumeric.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/scala/dbc/value/ExactNumeric.scala')
-rw-r--r--src/library/scala/dbc/value/ExactNumeric.scala31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/library/scala/dbc/value/ExactNumeric.scala b/src/library/scala/dbc/value/ExactNumeric.scala
new file mode 100644
index 0000000000..f3e1a54aac
--- /dev/null
+++ b/src/library/scala/dbc/value/ExactNumeric.scala
@@ -0,0 +1,31 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2003-2005, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+package scala.dbc.value;
+
+import java.math.BigInteger;
+import java.math.BigDecimal;
+
+abstract class ExactNumeric [Type] extends Value {
+
+ val dataType: datatype.ExactNumeric[Type];
+
+ def sqlString = nativeValue.toString();
+
+}
+
+object ExactNumeric {
+
+ def view (obj:value.ExactNumeric[Byte]): Byte = obj.nativeValue;
+ def view (obj:value.ExactNumeric[Short]): Short = obj.nativeValue;
+ def view (obj:value.ExactNumeric[Int]): Int = obj.nativeValue;
+ def view (obj:value.ExactNumeric[Long]): Long = obj.nativeValue;
+ def view (obj:value.ExactNumeric[BigInteger]): BigInteger = obj.nativeValue;
+ def view (obj:value.ExactNumeric[BigDecimal]): BigDecimal = obj.nativeValue;
+
+} \ No newline at end of file