Top Description Inners Fields Constructors Methods
org.h2.expression.condition

public Class UniquePredicate

extends PredicateWithSubquery
Class Inheritance
Imports
java.util.Arrays, org.h2.command.query.Query, org.h2.engine.NullsDistinct, .SessionLocal, org.h2.expression.Expression, .ValueExpression, org.h2.result.LocalResult, .ResultTarget, org.h2.value.Value, .ValueBoolean, .ValueNull

Unique predicate as in UNIQUE(SELECT ...)

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final NullsDistinct
Inherited from org.h2.expression.condition.PredicateWithSubquery:
query

Constructor Summary

AccessConstructor and Description
public
UniquePredicate(Query query, NullsDistinct nullsDistinct)

Method Summary

Modifier and TypeMethod and Description
public StringBuilder
getUnenclosedSQL(StringBuilder
string builder
builder
,
int
formatting flags
sqlFlags
)

Overrides org.h2.expression.condition.PredicateWithSubquery.getUnenclosedSQL.

Get the SQL statement of this expression.

public Value
getValue(SessionLocal
the session
session
)

Implements abstract org.h2.expression.Expression.getValue.

Return the resulting value for the current row.

public Expression
optimize(SessionLocal
the session
session
)

Overrides org.h2.expression.condition.PredicateWithSubquery.optimize.

Try to optimize the expression.

Inherited from org.h2.expression.condition.PredicateWithSubquery:
getCostisEverythingmapColumnssetEvaluatableupdateAggregate

Field Detail

nullsDistinctback to summary
private final NullsDistinct nullsDistinct

Constructor Detail

UniquePredicateback to summary
public UniquePredicate(Query query, NullsDistinct nullsDistinct)

Method Detail

getUnenclosedSQLback to summary
public StringBuilder getUnenclosedSQL(StringBuilder builder, int sqlFlags)

Overrides org.h2.expression.condition.PredicateWithSubquery.getUnenclosedSQL.

Doc from org.h2.expression.Expression.getUnenclosedSQL.

Get the SQL statement of this expression. This may not always be the original SQL statement, especially after optimization. Enclosing '(' and ')' are never appended.

Parameters
builder:StringBuilder

string builder

sqlFlags:int

formatting flags

Returns:StringBuilder

the specified string builder

Annotations
@Override
getValueback to summary
public Value getValue(SessionLocal session)

Implements abstract org.h2.expression.Expression.getValue.

Doc from org.h2.expression.Expression.getValue.

Return the resulting value for the current row.

Parameters
session:SessionLocal

the session

Returns:Value

the result

Annotations
@Override
optimizeback to summary
public Expression optimize(SessionLocal session)

Overrides org.h2.expression.condition.PredicateWithSubquery.optimize.

Doc from org.h2.expression.Expression.optimize.

Try to optimize the expression.

Parameters
session:SessionLocal

the session

Returns:Expression

the optimized expression

Annotations
@Override
org.h2.expression.condition back to summary

private final Class UniquePredicate.Target

extends Object
implements ResultTarget
Class Inheritance
All Implemented Interfaces
org.h2.result.ResultTarget

Field Summary

Modifier and TypeField and Description
private final int
pack-priv boolean
private final NullsDistinct
private final LocalResult

Constructor Summary

AccessConstructor and Description
pack-priv
Target(int columnCount, NullsDistinct nullsDistinct, LocalResult result)

Method Summary

Modifier and TypeMethod and Description
public void
addRow(Value...
the values
values
)

Implements org.h2.result.ResultTarget.addRow.

Add the row to the result set.

public long
getRowCount()

Implements org.h2.result.ResultTarget.getRowCount.

Get the number of rows.

public void
limitsWereApplied()

Implements org.h2.result.ResultTarget.limitsWereApplied.

A hint that sorting, offset and limit may be ignored by this result because they were applied during the query.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

columnCountback to summary
private final int columnCount
hasDuplicatesback to summary
pack-priv boolean hasDuplicates
nullsDistinctback to summary
private final NullsDistinct nullsDistinct
resultback to summary
private final LocalResult result

Constructor Detail

Targetback to summary
pack-priv Target(int columnCount, NullsDistinct nullsDistinct, LocalResult result)

Method Detail

addRowback to summary
public void addRow(Value... values)

Implements org.h2.result.ResultTarget.addRow.

Doc from org.h2.result.ResultTarget.addRow.

Add the row to the result set.

Parameters
values:Value[]

the values

Annotations
@Override
getRowCountback to summary
public long getRowCount()

Implements org.h2.result.ResultTarget.getRowCount.

Doc from org.h2.result.ResultTarget.getRowCount.

Get the number of rows.

Returns:long

the number of rows

Annotations
@Override
limitsWereAppliedback to summary
public void limitsWereApplied()

Implements org.h2.result.ResultTarget.limitsWereApplied.

Doc from org.h2.result.ResultTarget.limitsWereApplied.

A hint that sorting, offset and limit may be ignored by this result because they were applied during the query. This is useful for WITH TIES clause because result may contain tied rows above limit.

Annotations
@Override