public class CreateIndexQuery extends BaseCreateQuery<CreateIndexQuery>
Note that this query supports custom SQL syntax, see CreateIndexQuery.Hook
for more
details.
Modifier and Type | Class and Description |
---|---|
static class |
CreateIndexQuery.Hook
The HookAnchors supported for CREATE INDEX queries.
|
static class |
CreateIndexQuery.IndexType
Enum which defines the optional index type information.
|
Modifier and Type | Field and Description |
---|---|
protected SqlObject |
_table |
_columns, _object
ALL_SYMBOL, NULL_VALUE, QUESTION_MARK
Constructor and Description |
---|
CreateIndexQuery(Index index) |
CreateIndexQuery(Object tableStr,
Object index)
|
CreateIndexQuery(Table table,
Object index) |
CreateIndexQuery(Table table,
String indexName) |
Modifier and Type | Method and Description |
---|---|
CreateIndexQuery |
addCustomColumns(Object... columnStrs)
Adds the given SqlObjects as column descriptions, according to the
subclass type.
|
CreateIndexQuery |
addCustomization(CreateIndexQuery.Hook hook,
HookType type,
Object obj)
Adds custom SQL to this query.
|
CreateIndexQuery |
addCustomization(CustomSyntax obj)
Adds custom SQL to this query.
|
protected void |
appendTo(AppendableExt app,
SqlContext newContext)
Appends the sql query to the given AppendableExt within the given,
modifiable SqlContext.
|
protected void |
collectSchemaObjects(ValidationContext vContext)
Used during Query.validate() calls to collect the dbschema objects
referenced in a query.
|
DropQuery |
getDropQuery() |
CreateIndexQuery |
setCustomTableName(Object name)
Sets the name of the table which is being indexed.
|
CreateIndexQuery |
setIndexType(CreateIndexQuery.IndexType indexType)
Sets the type of index to be created.
|
CreateIndexQuery |
setTableName(String nameName)
Sets the name of the table which is being indexed.
|
CreateIndexQuery |
setTableSpace(String tableSpace)
Deprecated.
Use
addCustomization(new OraTableSpaceClause(tableSpace))
instead. |
addColumns, setCustomName, setName, validate
appendTo, getThisType, prependTo, validate, validateTables
addCustomization, customAppendTo, customAppendTo, maybeAppendTo, maybeAppendTo
collectSchemaObjects, doValidate, toString
toString, toString
protected SqlObject _table
public CreateIndexQuery(Index index)
public CreateIndexQuery(Object tableStr, Object index)
Object
-> SqlObject
conversions handled by
Converter.toCustomIndexSqlObject(Object)
.
Table Object
-> SqlObject
conversions handled by
Converter.toCustomTableSqlObject(Object)
.public CreateIndexQuery setIndexType(CreateIndexQuery.IndexType indexType)
public CreateIndexQuery setTableName(String nameName)
public CreateIndexQuery setCustomTableName(Object name)
Object
-> SqlObject
conversions handled by
Converter.toCustomTableSqlObject(Object)
.
public DropQuery getDropQuery()
getDropQuery
in class BaseCreateQuery<CreateIndexQuery>
public CreateIndexQuery addCustomColumns(Object... columnStrs)
Object
-> SqlObject
conversions handled by
Converter.CUSTOM_COLUMN_TO_OBJ
.
addCustomColumns
in class BaseCreateQuery<CreateIndexQuery>
@Deprecated public CreateIndexQuery setTableSpace(String tableSpace)
addCustomization(new OraTableSpaceClause(tableSpace))
instead.TABLESPACE <tableSpace>
to the end of the CREATE
query.
WARNING, this is not ANSI SQL compliant.
OraTableSpaceClause
public CreateIndexQuery addCustomization(CreateIndexQuery.Hook hook, HookType type, Object obj)
com.healthmarketscience.sqlbuilder.custom
for more details on
custom SQL syntax.hook
- the part of the query being customizedtype
- the type of customizationobj
- the custom sql. The Object
-> SqlObject
conversions handled by Converter.toCustomSqlObject(java.lang.Object)
.public CreateIndexQuery addCustomization(CustomSyntax obj)
com.healthmarketscience.sqlbuilder.custom
for more details on
custom SQL syntax.obj
- the custom sql syntax on which the
CustomSyntax.apply(CreateIndexQuery)
method will be
invoked (may be null
).protected void collectSchemaObjects(ValidationContext vContext)
SqlObject
collectSchemaObjects
in class BaseCreateQuery<CreateIndexQuery>
vContext
- handle to the current validation contextprotected void appendTo(AppendableExt app, SqlContext newContext) throws IOException
Query
Query.appendTo(AppendableExt)
method within the context of calls to
SqlContext.pushContext(com.healthmarketscience.common.util.AppendableExt)
and SqlContext.popContext(com.healthmarketscience.common.util.AppendableExt, com.healthmarketscience.sqlbuilder.SqlContext)
, so
the implementation is free to modify the given SqlContext.appendTo
in class Query<CreateIndexQuery>
app
- the target for the sql query generationnewContext
- modifiable SqlContext for nested AppendeesIOException
Copyright © 2006–2021 OpenHMS. All rights reserved.