h2-1.4.197.jar
登录
|
com.h2database:h2:1.4.197
META-INF
org
h2
jdbc
message
expression
ConditionInParameter.java
AggregateDataHistogram.java
Alias.java
FunctionCall.java
Rownum.java
Subquery.java
FunctionInfo.java
ConditionInSelect.java
Expression.java
ExpressionColumn.java
Comparison.java
JavaAggregate.java
ConditionAndOr.java
AggregateDataCount.java
ValueExpression.java
JavaFunction.java
ExpressionVisitor.java
Parameter.java
AggregateDataCountAll.java
AggregateDataMedian.java
CompareLike.java
ConditionIn.java
ExpressionList.java
Operation.java
ParameterInterface.java
ConditionInConstantSet.java
Function.java
Wildcard.java
AggregateDataSelectivity.java
Variable.java
AggregateDataDefault.java
ParameterRemote.java
Aggregate.java
AggregateData.java
TableFunction.java
ConditionNot.java
ConditionExists.java
AggregateDataArrayCollecting.java
SequenceValue.java
Condition.java
engine
upgrade
Driver.java
security
fulltext
api
compress
index
table
constraint
store
util
bnf
command
tools
server
mode
jdbcx
result
JdbcDriverBackwardsCompat.java
jmx
value
schema
mvstore
ConditionNot.java
清空
类结构
/* * Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0, * and the EPL 1.0 (http://h2database.com/html/license.html). * Initial Developer: H2 Group */ package org.h2.expression; import org.h2.engine.
Session
; import org.h2.table.
ColumnResolver
; import org.h2.table.
TableFilter
; import org.h2.value.
Value
; import org.h2.value.
ValueNull
; /** * A NOT condition. */ public class
ConditionNot
extends
Condition
{ private
Expression
condition
; public
ConditionNot
(
Expression
condition
) { this.
condition
=
condition
; } @
Override
public
Expression
getNotIfPossible
(
Session
session
) { return
condition
; } @
Override
public
Value
getValue
(
Session
session
) {
Value
v
=
condition
.
getValue
(
session
); if (
v
==
ValueNull
.
INSTANCE
) { return
v
; } return
v
.
convertTo
(
Value
.
BOOLEAN
).
negate
(); } @
Override
public void
mapColumns
(
ColumnResolver
resolver
, int
level
) {
condition
.
mapColumns
(
resolver
,
level
); } @
Override
public
Expression
optimize
(
Session
session
) {
Expression
e2
=
condition
.
getNotIfPossible
(
session
); if (
e2
!= null) { return
e2
.
optimize
(
session
); }
Expression
expr
=
condition
.
optimize
(
session
); if (
expr
.
isConstant
()) {
Value
v
=
expr
.
getValue
(
session
); if (
v
==
ValueNull
.
INSTANCE
) { return
ValueExpression
.
getNull
(); } return
ValueExpression
.
get
(
v
.
convertTo
(
Value
.
BOOLEAN
).
negate
()); }
condition
=
expr
; return this; } @
Override
public void
setEvaluatable
(
TableFilter
tableFilter
, boolean
b
) {
condition
.
setEvaluatable
(
tableFilter
,
b
); } @
Override
public
String
getSQL
() { return "(NOT " +
condition
.
getSQL
() + ")"; } @
Override
public void
updateAggregate
(
Session
session
) {
condition
.
updateAggregate
(
session
); } @
Override
public void
addFilterConditions
(
TableFilter
filter
, boolean
outerJoin
) { if (
outerJoin
) { // can not optimize: // select * from test t1 left join test t2 on t1.id = t2.id where // not t2.id is not null // to // select * from test t1 left join test t2 on t1.id = t2.id and // t2.id is not null return; } super.addFilterConditions(
filter
,
outerJoin
); } @
Override
public boolean
isEverything
(
ExpressionVisitor
visitor
) { return
condition
.
isEverything
(
visitor
); } @
Override
public int
getCost
() { return
condition
.
getCost
(); } }
查找资源
Jre/Lib
输入类名或文件名
类结构窗口