public class CreateTableSpecification extends TableSpecification<CreateTableSpecification>
CREATE TABLE specification.options| Constructor and Description |
|---|
CreateTableSpecification() |
| Modifier and Type | Method and Description |
|---|---|
static CreateTableSpecification |
createTable()
Entry point into the
CreateTableSpecification's fluent API to create a table. |
static CreateTableSpecification |
createTable(CqlIdentifier name)
Entry point into the
CreateTableSpecification's fluent API to create a table. |
static CreateTableSpecification |
createTable(String name)
Entry point into the
CreateTableSpecification's fluent API to create a table. |
boolean |
getIfNotExists() |
CreateTableSpecification |
ifNotExists()
Causes the inclusion of an
IF NOT EXISTS clause. |
CreateTableSpecification |
ifNotExists(boolean ifNotExists)
Toggles the inclusion of an
IF NOT EXISTS clause. |
CreateTableSpecification |
name(CqlIdentifier name) |
CreateTableSpecification |
name(String name)
Sets the table name.
|
CreateTableSpecification |
with(String name,
Object value,
boolean escape,
boolean quote)
Adds the given option by name to this table's options.
|
CreateTableSpecification |
with(TableOption option)
Convenience method that calls
with(option, null). |
CreateTableSpecification |
with(TableOption option,
Object value)
Sets the given table option.
|
clusteredKeyColumn, clusteredKeyColumn, clusteredKeyColumn, clusteredKeyColumn, column, column, column, column, getClusteredKeyColumns, getColumns, getNonKeyColumns, getPartitionKeyColumns, getPrimaryKeyColumns, partitionKeyColumn, partitionKeyColumngetOptionsgetNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetName, getOptionspublic static CreateTableSpecification createTable()
CreateTableSpecification's fluent API to create a table. Convenient if imported
statically.public static CreateTableSpecification createTable(CqlIdentifier name)
CreateTableSpecification's fluent API to create a table. Convenient if imported
statically.public static CreateTableSpecification createTable(String name)
CreateTableSpecification's fluent API to create a table. Convenient if imported
statically.public CreateTableSpecification name(CqlIdentifier name)
name in class TableOptionsSpecification<TableSpecification<CreateTableSpecification>>public CreateTableSpecification ifNotExists()
IF NOT EXISTS clause.public CreateTableSpecification ifNotExists(boolean ifNotExists)
IF NOT EXISTS clause.public boolean getIfNotExists()
public CreateTableSpecification name(String name)
TableNameSpecificationname in class TableOptionsSpecification<TableSpecification<CreateTableSpecification>>public CreateTableSpecification with(TableOption option)
TableOptionsSpecificationwith(option, null).with in class TableOptionsSpecification<TableSpecification<CreateTableSpecification>>public CreateTableSpecification with(TableOption option, Object value)
TableOptionsSpecificationTableOptionsSpecification.with(String, Object, boolean, boolean) appropriately from the given TableOption and value for that
option.with in class TableOptionsSpecification<TableSpecification<CreateTableSpecification>>option - The option to set.value - The value of the option. Must be type-compatible with the TableOption.TableOptionsSpecification.with(String, Object, boolean, boolean)public CreateTableSpecification with(String name, Object value, boolean escape, boolean quote)
TableOptionsSpecificationnull values are considered single string options where the name of the option is the
string to be used. Otherwise, the result of Object.toString() is considered to be the value of the option
with the given name. The value, after conversion to string, may have embedded single quotes escaped according to
parameter escape and may be single-quoted according to parameter quote.with in class TableOptionsSpecification<TableSpecification<CreateTableSpecification>>name - The name of the optionvalue - The value of the option. If null, the value is ignored and the option is considered to be
composed of only the name, otherwise the value's Object.toString() value is used.escape - Whether to escape the value via CqlStringUtils.escapeSingle(Object). Ignored if given value
is an instance of a Map.quote - Whether to quote the value via CqlStringUtils.singleQuote(Object). Ignored if given value is
an instance of a Map.Copyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.