Open GoogleCodeExporter opened 9 years ago
Hm, how should it be handled?
Original comment by thomas.t...@gmail.com
on 9 Dec 2013 at 6:12
Thank you for you answer.
I think there are 2 possable solution:
a) A less missleading Exception message would be good. Currently
getTypeFromClass() returns a Value.JAVA_OBJECT if no matching class can be
found. This leads to the assumption in H2 that it must be a Hexadecimal string
(I didn't investigate why this should be assumed). The Exception should contain
the x.getClass().getSimpleName() and some info that it was unable to handle
that type.
OR
b) assume Number as a valid class
if (Number.class.isAssignableFrom(x)) {
return Value.DECIMAL // or return Value.NUMBER
}
I pefer a). A clean Exception output (programmer then able to understand that
he must use a different class). If there is still demand to support other
classes in getTypeFromClass() then this can be done later.
Cheers Sam
Original comment by 2mat...@gmail.com
on 9 Dec 2013 at 11:47
Hi,
I don't quite understand the use case... Could you post some code that shows
how this would be used?
Thanks!
Original comment by thomas.t...@gmail.com
on 12 Dec 2013 at 4:28
Hi Sam,
I understand that you want to create a function that can take any kind of
numeric value (int or double for exemple); as overload require different number
of parameters you could use as parameter the object org.h2.value.Value instead
of using Numeric then check inside your function the parameter.
-Nicolas
Atelier SIG
IRSTV FR CNRS 2488
Original comment by fnicola...@gmail.com
on 14 Dec 2013 at 10:11
OK, I think I understand now. Yes, a better error message would be nice.
Patches are welcome!
Original comment by thomas.t...@gmail.com
on 14 Dec 2013 at 12:49
Hi
thanks for all the great feedback !
I think I can send you a patch suggestion that will produce a more sensible
Expedition next week.
Chears Sam
Am 14.12.2013 13:50 schrieb <h2database@googlecode.com>:
Original comment by 2mat...@gmail.com
on 14 Dec 2013 at 1:04
Original issue reported on code.google.com by
2mat...@gmail.com
on 9 Dec 2013 at 4:13