public class CreateTableRequest extends Object implements org.apache.avro.generic.IndexedRecord
GPUdb.createTable(CreateTableRequest)
.
typeId
which must the be the type id of a currently registered type (i.e. one created via GPUdb.createType(CreateTypeRequest)
). The table will be created inside a collection if the option *collection_name* is
specified. If that collection does not already exist then it will be created. To create a new, empty collection specify the
collection name in tableName
, leave typeId
blank, and set the *is_collection* option to 'true'.Modifier and Type | Class and Description |
---|---|
static class |
CreateTableRequest.Options
Optional parameters.
|
Constructor and Description |
---|
CreateTableRequest()
Constructs a CreateTableRequest object with default parameters.
|
CreateTableRequest(String tableName,
String typeId,
Map<String,String> options)
Constructs a CreateTableRequest object with the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Object |
get(int index)
This method supports the Avro framework and is not intended to be called directly by the user.
|
static org.apache.avro.Schema |
getClassSchema()
This method supports the Avro framework and is not intended to be called directly by the user.
|
Map<String,String> |
getOptions() |
org.apache.avro.Schema |
getSchema()
This method supports the Avro framework and is not intended to be called directly by the user.
|
String |
getTableName() |
String |
getTypeId() |
int |
hashCode() |
void |
put(int index,
Object value)
This method supports the Avro framework and is not intended to be called directly by the user.
|
CreateTableRequest |
setOptions(Map<String,String> options) |
CreateTableRequest |
setTableName(String tableName) |
CreateTableRequest |
setTypeId(String typeId) |
String |
toString() |
public CreateTableRequest()
public CreateTableRequest(String tableName, String typeId, Map<String,String> options)
tableName
- Name of the table to be created. Must not be the name of a currently existing GPUdb table of a different
type. Error for requests with existing table of the same name and type id may be suppressed by using the
no_error_if_exists
option. Cannot be an empty string. Valid characters are 'A-Za-z0-9_-(){}[] .:'
(excluding the single quote), with the first character being one of 'A-Za-z0-9_'. The maximum length is
256 characters.typeId
- ID of a currently registered type in GPUdb. All objects added to the newly created table will be of this type.
Must be an empty string if the *is_collection* is 'true'.options
- Optional parameters.
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. Values: true, false.
public static org.apache.avro.Schema getClassSchema()
public String getTableName()
no_error_if_exists
option. Cannot be an empty string. Valid characters are 'A-Za-z0-9_-(){}[] .:' (excluding the
single quote), with the first character being one of 'A-Za-z0-9_'. The maximum length is 256 characters.public CreateTableRequest setTableName(String tableName)
tableName
- Name of the table to be created. Must not be the name of a currently existing GPUdb table of a different
type. Error for requests with existing table of the same name and type id may be suppressed by using the
no_error_if_exists
option. Cannot be an empty string. Valid characters are 'A-Za-z0-9_-(){}[] .:'
(excluding the single quote), with the first character being one of 'A-Za-z0-9_'. The maximum length is
256 characters.this
to mimic the builder pattern.public String getTypeId()
public CreateTableRequest setTypeId(String typeId)
typeId
- ID of a currently registered type in GPUdb. All objects added to the newly created table will be of this type.
Must be an empty string if the *is_collection* is 'true'.this
to mimic the builder pattern.public Map<String,String> getOptions()
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. Values: true,
false.
public CreateTableRequest setOptions(Map<String,String> options)
options
- Optional parameters.
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. Values: true, false.
this
to mimic the builder pattern.public org.apache.avro.Schema getSchema()
getSchema
in interface org.apache.avro.generic.GenericContainer
public Object get(int index)
get
in interface org.apache.avro.generic.IndexedRecord
index
- the position of the field to getIndexOutOfBoundsException
public void put(int index, Object value)
put
in interface org.apache.avro.generic.IndexedRecord
index
- the position of the field to setvalue
- the value to setIndexOutOfBoundsException
Copyright © 2016. All rights reserved.