MCPcopy Create free account
hub / github.com/cmu-db/benchbase / getDouble

Method getDouble

src/main/java/com/oltpbenchmark/util/SQLUtil.java:94–110  ·  view source on GitHub ↗

Return a double from the given object Handles the different cases from the various DBMSs @param obj @return

(Object obj)

Source from the content-addressed store, hash-verified

92 * @return
93 */
94 public static Double getDouble(Object obj) {
95 if (obj == null) {
96 return (null);
97 }
98
99 if (obj instanceof Double) {
100 return (Double) obj;
101 } else if (obj instanceof Float) {
102 return ((Float) obj).doubleValue();
103 } else if (obj instanceof BigDecimal) {
104 return ((BigDecimal) obj).doubleValue();
105 }
106
107 LOG.warn("BAD BAD BAD: returning null because getDouble does not support {}", obj.getClass());
108
109 return (null);
110 }
111
112 public static String clobToString(Object obj) {
113 try {

Callers 15

loadConfigProfileMethod · 0.95
loadItemsMethod · 0.95
processItemRecordMethod · 0.95
loadConfigProfileMethod · 0.95
mainMethod · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
getOrderLinesMethod · 0.80
YCSBBenchmarkMethod · 0.80
runMethod · 0.80
runMethod · 0.80

Calls 1

getClassMethod · 0.80

Tested by

no test coverage detected