本文整理了Java中org.h2.value.Value.convertPrecision()
方法的一些代码示例,展示了Value.convertPrecision()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Value.convertPrecision()
方法的具体详情如下:
包路径:org.h2.value.Value
类名称:Value
方法名:convertPrecision
[英]Convert the precision to the requested value. The precision of the returned value may be somewhat larger than requested, because values with a fixed precision are not truncated.
[中]将精度转换为要求的值。返回值的精度可能略大于请求的精度,因为具有固定精度的值不会被截断。
代码示例来源:origin: com.h2database/h2
@Override
public Value convertPrecision(long precision, boolean force) {
if (!force) {
return this;
}
ArrayList<Value> list = New.arrayList();
for (Value v : values) {
v = v.convertPrecision(precision, true);
// empty byte arrays or strings have precision 0
// they count as precision 1 here
precision -= Math.max(1, v.getPrecision());
if (precision < 0) {
break;
}
list.add(v);
}
return get(list.toArray(new Value[0]));
}
代码示例来源:origin: com.h2database/h2
v = l[row];
v = c.convert(v);
v = v.convertPrecision(c.getPrecision(), false);
v = v.convertScale(true, c.getScale());
代码示例来源:origin: com.h2database/h2
Mode mode = database.getMode();
v0 = v0.convertScale(mode.convertOnlyToSmallerScale, scale);
v0 = v0.convertPrecision(getPrecision(), false);
result = v0;
break;
代码示例来源:origin: com.h2database/h2
result = v0.convertPrecision(v1.getLong(), v2.getBoolean());
break;
代码示例来源:origin: com.eventsourcing/h2
@Override
public Value convertPrecision(long precision, boolean force) {
if (!force) {
return this;
}
ArrayList<Value> list = New.arrayList();
for (Value v : values) {
v = v.convertPrecision(precision, true);
// empty byte arrays or strings have precision 0
// they count as precision 1 here
precision -= Math.max(1, v.getPrecision());
if (precision < 0) {
break;
}
list.add(v);
}
Value[] array = new Value[list.size()];
list.toArray(array);
return get(array);
}
代码示例来源:origin: org.wowtools/h2
@Override
public Value convertPrecision(long precision, boolean force) {
if (!force) {
return this;
}
ArrayList<Value> list = New.arrayList();
for (Value v : values) {
v = v.convertPrecision(precision, true);
// empty byte arrays or strings have precision 0
// they count as precision 1 here
precision -= Math.max(1, v.getPrecision());
if (precision < 0) {
break;
}
list.add(v);
}
Value[] array = new Value[list.size()];
list.toArray(array);
return get(array);
}
代码示例来源:origin: com.eventsourcing/h2
v = l[row];
v = c.convert(v);
v = v.convertPrecision(c.getPrecision(), false);
v = v.convertScale(true, c.getScale());
代码示例来源:origin: org.wowtools/h2
v = l[row];
v = c.convert(v);
v = v.convertPrecision(c.getPrecision(), false);
v = v.convertScale(true, c.getScale());
代码示例来源:origin: com.h2database/com.springsource.org.h2
v = l[row];
v = v.convertTo(c.getType());
v = v.convertPrecision(c.getPrecision());
v = v.convertScale(true, c.getScale());
代码示例来源:origin: com.h2database/com.springsource.org.h2
Mode mode = database.getMode();
v0 = v0.convertScale(mode.convertOnlyToSmallerScale, scale);
v0 = v0.convertPrecision(getPrecision());
result = v0;
break;
代码示例来源:origin: org.wowtools/h2
Mode mode = database.getMode();
v0 = v0.convertScale(mode.convertOnlyToSmallerScale, scale);
v0 = v0.convertPrecision(getPrecision(), false);
result = v0;
break;
代码示例来源:origin: com.eventsourcing/h2
Mode mode = database.getMode();
v0 = v0.convertScale(mode.convertOnlyToSmallerScale, scale);
v0 = v0.convertPrecision(getPrecision(), false);
result = v0;
break;
代码示例来源:origin: org.wowtools/h2
result = v0.convertPrecision(v1.getLong(), v2.getBoolean());
break;
代码示例来源:origin: com.eventsourcing/h2
result = v0.convertPrecision(v1.getLong(), v2.getBoolean());
break;
内容来源于网络,如有侵权,请联系作者删除!