public static final class CreateTableRequest.Options extends Object
NO_ERROR_IF_EXISTS
: If true
, prevents an error from occurring
if the table already exists and is of the given type. If a table with
the same ID but a different type exists, it is still an error.
Supported values:
The default value is FALSE
.
COLLECTION_NAME
: Name of a collection which is to contain the newly
created table. If the collection provided is non-existent, the
collection will be automatically created. If empty, then the newly
created table will be a top-level table.
IS_COLLECTION
: Indicates whether the new table to be created will be a
collection.
Supported values:
The default value is FALSE
.
DISALLOW_HOMOGENEOUS_TABLES
: For a collection, indicates whether the
collection prohibits containment of multiple tables of exactly the same
data type.
Supported values:
The default value is FALSE
.
IS_REPLICATED
: For a table, indicates the distribution scheme for the table's data. If true,
the table will be replicated. If false, the table will be sharded according to the shard key specified in the given typeId
, or randomly sharded, if no shard key is specified.
Supported values:
The default value is FALSE
.
FOREIGN_KEYS
: Semicolon-separated list of foreign keys, of the format '(source_column_name [,
...]) references target_table_name(primary_key_column_name [, ...]) [as
foreign_key_name]'.
FOREIGN_SHARD_KEY
: Foreign shard key of the format 'source_column
references shard_by_column from target_table(primary_key_column)'
TTL
: For a table, sets the TTL of the table specified in tableName
.
CHUNK_SIZE
:
Indicates the chunk size to be used for this table.
IS_RESULT_TABLE
: For a table, indicates whether the table is an
in-memory table. A result table cannot contain store_only, text_search,
or string columns (charN columns are acceptable), and it will not be
retained if the server is restarted.
Supported values:
The default value is FALSE
.
Map
.
A set of string constants for the parameter options
.Modifier and Type | Field and Description |
---|---|
static String |
CHUNK_SIZE
Indicates the chunk size to be used for this table.
|
static String |
COLLECTION_NAME
Name of a collection which is to contain the newly created table.
|
static String |
DISALLOW_HOMOGENEOUS_TABLES
For a collection, indicates whether the collection prohibits
containment of multiple tables of exactly the same data type.
|
static String |
FALSE |
static String |
FOREIGN_KEYS
Semicolon-separated list of foreign keys, of the format '(source_column_name
[, ...]) references target_table_name(primary_key_column_name [,
...]) [as foreign_key_name]'.
|
static String |
FOREIGN_SHARD_KEY
Foreign shard key of the format 'source_column references
shard_by_column from target_table(primary_key_column)'
|
static String |
IS_COLLECTION
Indicates whether the new table to be created will be a collection.
|
static String |
IS_REPLICATED
For a table, indicates the distribution scheme for the table's data.
|
static String |
IS_RESULT_TABLE
For a table, indicates whether the table is an in-memory table.
|
static String |
NO_ERROR_IF_EXISTS
If
true , prevents an error from occurring if the table
already exists and is of the given type. |
static String |
TRUE |
static String |
TTL
For a table, sets the TTL of the table specified in
tableName . |
public static final String NO_ERROR_IF_EXISTS
true
, prevents an error from occurring if the table
already exists and is of the given type. If a table with the same
ID but a different type exists, it is still an error.
Supported values:
The default value is FALSE
.public static final String TRUE
public static final String FALSE
public static final String COLLECTION_NAME
public static final String IS_COLLECTION
FALSE
.public static final String DISALLOW_HOMOGENEOUS_TABLES
FALSE
.public static final String IS_REPLICATED
typeId
,
or randomly sharded, if no shard key is specified.
Supported values:
The default value is FALSE
.public static final String FOREIGN_KEYS
public static final String FOREIGN_SHARD_KEY
public static final String TTL
tableName
.public static final String CHUNK_SIZE
public static final String IS_RESULT_TABLE
FALSE
.Copyright © 2019. All rights reserved.