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

public Class CreateIndex

extends SchemaCommand
Class Inheritance
Imports
org.h2.api.ErrorCode, org.h2.command.CommandInterface, org.h2.engine.Constants, .Database, .Right, .SessionLocal, .NullsDistinct, org.h2.index.IndexType, org.h2.message.DbException, org.h2.schema.Schema, org.h2.table.IndexColumn, .Table

This class represents the statement CREATE INDEX

Field Summary

Modifier and TypeField and Description
private String
private boolean
private boolean
private boolean
private IndexColumn[]
private String
private NullsDistinct
private boolean
private boolean
private String
private int

Constructor Summary

AccessConstructor and Description
public
CreateIndex(SessionLocal session, Schema schema)

Method Summary

Modifier and TypeMethod and Description
public int
getType()

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

Get the command type as defined in CommandInterface

public void
setComment(String comment)

public void
setHash(boolean b)

public void
setIfNotExists(boolean ifNotExists)

public void
setIfTableExists(boolean b)

public void
public void
setIndexName(String indexName)

public void
setPrimaryKey(boolean b)

public void
setSpatial(boolean b)

public void
setTableName(String tableName)

public void
setUnique(NullsDistinct nullsDistinct, int uniqueColumnCount)

public long
update()

Overrides org.h2.command.Prepared.update.

Execute the statement.

Inherited from org.h2.command.ddl.SchemaCommand:
getSchema

Field Detail

commentback to summary
private String comment
hashback to summary
private boolean hash
ifNotExistsback to summary
private boolean ifNotExists
ifTableExistsback to summary
private boolean ifTableExists
indexColumnsback to summary
private IndexColumn[] indexColumns
indexNameback to summary
private String indexName
nullsDistinctback to summary
private NullsDistinct nullsDistinct
primaryKeyback to summary
private boolean primaryKey
spatialback to summary
private boolean spatial
tableNameback to summary
private String tableName
uniqueColumnCountback to summary
private int uniqueColumnCount

Constructor Detail

CreateIndexback to summary
public CreateIndex(SessionLocal session, Schema schema)

Method Detail

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
setCommentback to summary
public void setComment(String comment)
setHashback to summary
public void setHash(boolean b)
setIfNotExistsback to summary
public void setIfNotExists(boolean ifNotExists)
setIfTableExistsback to summary
public void setIfTableExists(boolean b)
setIndexColumnsback to summary
public void setIndexColumns(IndexColumn[] columns)
setIndexNameback to summary
public void setIndexName(String indexName)
setPrimaryKeyback to summary
public void setPrimaryKey(boolean b)
setSpatialback to summary
public void setSpatial(boolean b)
setTableNameback to summary
public void setTableName(String tableName)
setUniqueback to summary
public void setUnique(NullsDistinct nullsDistinct, int uniqueColumnCount)
updateback to summary
public long update()

Overrides org.h2.command.Prepared.update.

Doc from org.h2.command.Prepared.update.

Execute the statement.

Returns:long

the update count

Annotations
@Override