本文整理了Java中org.h2.value.Value.getBoolean()
方法的一些代码示例,展示了Value.getBoolean()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Value.getBoolean()
方法的具体详情如下:
包路径:org.h2.value.Value
类名称:Value
方法名:getBoolean
暂无
代码示例来源:origin: com.h2database/h2
private boolean isHavingNullOrFalse(Value[] row) {
return havingIndex >= 0 && !row[havingIndex].getBoolean();
}
代码示例来源:origin: com.h2database/h2
/**
* Get the value in form of a boolean expression.
* Returns true or false.
* In this database, everything can be a condition.
*
* @param session the session
* @return the result
*/
public boolean getBooleanValue(Session session) {
return getValue(session).getBoolean();
}
代码示例来源:origin: com.h2database/h2
switch (andOrType) {
case AND: {
if (l != ValueNull.INSTANCE && !l.getBoolean()) {
return l;
if (r != ValueNull.INSTANCE && !r.getBoolean()) {
return r;
if (l.getBoolean()) {
return l;
if (r.getBoolean()) {
return r;
代码示例来源:origin: apache/ignite
/**
* @param val Value.
*/
public GridH2Boolean(Value val) {
assert val.getType() == Value.BOOLEAN : val.getType();
x = val.getBoolean();
}
代码示例来源:origin: com.h2database/h2
/**
* Returns the value of the specified column as a boolean.
*
* @param columnIndex (1,2,...)
* @return the value
* @throws SQLException if the column is not found or if the result set is
* closed
*/
@Override
public boolean getBoolean(int columnIndex) throws SQLException {
try {
debugCodeCall("getBoolean", columnIndex);
return get(columnIndex).getBoolean();
} catch (Exception e) {
throw logAndConvert(e);
}
}
代码示例来源:origin: com.h2database/h2
/**
* Returns the value of the specified column as a boolean.
*
* @param columnLabel the column label
* @return the value
* @throws SQLException if the column is not found or if the result set is
* closed
*/
@Override
public boolean getBoolean(String columnLabel) throws SQLException {
try {
debugCodeCall("getBoolean", columnLabel);
return get(columnLabel).getBoolean();
} catch (Exception e) {
throw logAndConvert(e);
}
}
代码示例来源:origin: com.h2database/h2
return type.cast(value.getString());
} else if (type == Boolean.class) {
return type.cast(value.getBoolean());
} else if (type == Byte.class) {
return type.cast(value.getByte());
代码示例来源:origin: com.h2database/h2
private boolean readBooleanSetting() {
if (currentTokenType == VALUE) {
boolean result = currentValue.getBoolean();
read();
return result;
}
if (readIf("TRUE") || readIf("ON")) {
return true;
} else if (readIf("FALSE") || readIf("OFF")) {
return false;
} else {
throw getSyntaxError();
}
}
代码示例来源:origin: com.h2database/h2
@Override
public void checkRow(Session session, Table t, Row oldRow, Row newRow) {
if (newRow == null) {
return;
}
filter.set(newRow);
boolean b;
try {
Value v = expr.getValue(session);
// Both TRUE and NULL are ok
b = v == ValueNull.INSTANCE || v.getBoolean();
} catch (DbException ex) {
throw DbException.get(ErrorCode.CHECK_CONSTRAINT_INVALID, ex,
getShortDescription());
}
if (!b) {
throw DbException.get(ErrorCode.CHECK_CONSTRAINT_VIOLATED_1,
getShortDescription());
}
}
代码示例来源:origin: com.h2database/h2
/**
* Returns true if the database is read-only.
*
* @return if the database is read-only
* @throws SQLException if the connection is closed
*/
@Override
public boolean isReadOnly() throws SQLException {
try {
debugCodeCall("isReadOnly");
checkClosed();
getReadOnly = prepareCommand("CALL READONLY()", getReadOnly);
ResultInterface result = getReadOnly.executeQuery(0, false);
result.next();
return result.currentRow()[0].getBoolean();
} catch (Exception e) {
throw logAndConvert(e);
}
}
代码示例来源:origin: com.h2database/h2
case AND:
if (l != null) {
if (l != ValueNull.INSTANCE && !l.getBoolean()) {
return ValueExpression.get(l);
} else if (l.getBoolean()) {
return right;
if (r != ValueNull.INSTANCE && !r.getBoolean()) {
return ValueExpression.get(r);
} else if (r.getBoolean()) {
return left;
case OR:
if (l != null) {
if (l.getBoolean()) {
return ValueExpression.get(l);
} else if (l != ValueNull.INSTANCE) {
if (r.getBoolean()) {
return ValueExpression.get(r);
} else if (r != ValueNull.INSTANCE) {
代码示例来源:origin: apache/ignite
case Value.BOOLEAN:
boolean bool1 = PageUtils.getByte(pageAddr, off + 1) != 0;
boolean bool2 = v.getBoolean();
代码示例来源:origin: com.h2database/h2
value = v;
} else {
value = ValueBoolean.get(value.getBoolean() && v.getBoolean());
value = v;
} else {
value = ValueBoolean.get(value.getBoolean() || v.getBoolean());
代码示例来源:origin: com.h2database/h2
if (v != ValueNull.INSTANCE && !v.getBoolean()) {
throw DbException.get(
ErrorCode.CHECK_CONSTRAINT_VIOLATED_1,
代码示例来源:origin: com.h2database/h2
switch (type) {
case Value.BOOLEAN:
buff.put((byte) (v.getBoolean() ? BOOLEAN_TRUE : BOOLEAN_FALSE));
break;
case Value.BYTE:
代码示例来源:origin: apache/ignite
case Value.BOOLEAN:
PageUtils.putByte(pageAddr, off, (byte)val.getType());
PageUtils.putByte(pageAddr, off + 1, (byte)(val.getBoolean() ? 1 : 0));
return size + 1;
代码示例来源:origin: com.h2database/h2
if (!v0.getBoolean()) {
v = getNullOrValue(session, args, values, 2);
} else {
if (when.getBoolean()) {
then = args[i + 1];
break;
代码示例来源:origin: com.h2database/h2
null : v2 == ValueNull.INSTANCE ? null : v2.getString();
boolean indent = v3 == null ?
true : v3.getBoolean();
result = ValueString.get(StringUtils.xmlNode(
v0.getString(), attr, content, indent),
result = v0.convertPrecision(v1.getLong(), v2.getBoolean());
break;
} else {
result = ValueString.get(StringUtils.xmlText(
v0.getString(), v1.getBoolean()),
database.getMode().treatEmptyStringsAsNull);
代码示例来源:origin: com.h2database/com.springsource.org.h2
/**
* Get the value in form of a boolean expression.
* Returns true, false, or null.
* In this database, everything can be a condition.
*
* @param session the session
* @return the result
*/
public Boolean getBooleanValue(Session session) throws SQLException {
return getValue(session).getBoolean();
}
代码示例来源:origin: org.wowtools/h2
/**
* Get the value in form of a boolean expression.
* Returns true, false, or null.
* In this database, everything can be a condition.
*
* @param session the session
* @return the result
*/
public Boolean getBooleanValue(Session session) {
return getValue(session).getBoolean();
}
内容来源于网络,如有侵权,请联系作者删除!