Top Description Fields Constructors Methods
org.h2.command.ddl

public Class AlterDomainAddConstraint

extends AlterDomain
Class Inheritance
Imports
org.h2.api.ErrorCode, org.h2.command.CommandInterface, org.h2.constraint.ConstraintDomain, org.h2.engine.Database, .SessionLocal, org.h2.expression.Expression, org.h2.message.DbException, org.h2.schema.Domain, .Schema

This class represents the statement ALTER DOMAIN ADD CONSTRAINT

Field Summary

Modifier and TypeField and Description
private boolean
private Expression
private String
private String
private final boolean
Inherited from org.h2.command.ddl.AlterDomain:
domainNameifDomainExists

Constructor Summary

AccessConstructor and Description
public
AlterDomainAddConstraint(SessionLocal session, Schema schema, boolean ifNotExists)

Method Summary

Modifier and TypeMethod and Description
private String
public String
public int
getType()

Implements abstract org.h2.command.Prepared.getType.

Get the command type as defined in CommandInterface

public void
setCheckExisting(boolean b)

public void
public void
setComment(String comment)

public void
setConstraintName(String constraintName)

private int

Returns:

the update count
tryUpdate
(Schema
the schema
schema
,
Domain
the domain
domain
)

Try to execute the statement.

pack-priv long
update(Schema schema, Domain domain)

Implements abstract org.h2.command.ddl.AlterDomain.update.

Inherited from org.h2.command.ddl.AlterDomain:
forAllDependenciessetDomainNamesetIfDomainExistsupdate

Field Detail

checkExistingback to summary
private boolean checkExisting
checkExpressionback to summary
private Expression checkExpression
commentback to summary
private String comment
constraintNameback to summary
private String constraintName
ifNotExistsback to summary
private final boolean ifNotExists

Constructor Detail

AlterDomainAddConstraintback to summary
public AlterDomainAddConstraint(SessionLocal session, Schema schema, boolean ifNotExists)

Method Detail

generateConstraintNameback to summary
private String generateConstraintName(Domain domain)
getConstraintNameback to summary
public String getConstraintName()
getTypeback to summary
public int getType()

Implements abstract org.h2.command.Prepared.getType.

Doc from org.h2.command.Prepared.getType.

Get the command type as defined in CommandInterface

Returns:int

the statement type

Annotations
@Override
setCheckExistingback to summary
public void setCheckExisting(boolean b)
setCheckExpressionback to summary
public void setCheckExpression(Expression expression)
setCommentback to summary
public void setComment(String comment)
setConstraintNameback to summary
public void setConstraintName(String constraintName)
tryUpdateback to summary
private int tryUpdate(Schema schema, Domain domain)

Try to execute the statement.

Parameters
schema:Schema

the schema

domain:Domain

the domain

Returns:int

the update count

updateback to summary
pack-priv long update(Schema schema, Domain domain)

Implements abstract org.h2.command.ddl.AlterDomain.update.

Annotations
@Override