Package com.gpudb.protocol
Class AlterSchemaRequest
java.lang.Object
com.gpudb.protocol.AlterSchemaRequest
All Implemented Interfaces:
org.apache.avro.generic.GenericContainer, org.apache.avro.generic.IndexedRecordA set of parameters for
GPUdb.alterSchema.
Used to change the name of a SQL-style schema, specified in schemaName.
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA set of string constants for theAlterSchemaRequestparameteraction.Constructor Summary
ConstructorsConstructorDescriptionConstructs an AlterSchemaRequest object with default parameters.Constructs an AlterSchemaRequest object with the specified parameters.Method Summary
Modifier and TypeMethodDescriptionbooleanget(int index) This method supports the Avro framework and is not intended to be called directly by the user.Modification operation to be applied.static org.apache.avro.SchemaThis method supports the Avro framework and is not intended to be called directly by the user.Optional parameters.org.apache.avro.SchemaThis method supports the Avro framework and is not intended to be called directly by the user.Name of the schema to be altered.getValue()The value of the modification, depending onaction.inthashCode()voidThis method supports the Avro framework and is not intended to be called directly by the user.Modification operation to be applied.setOptions(Map<String, String> options) Optional parameters.setSchemaName(String schemaName) Name of the schema to be altered.The value of the modification, depending onaction.toString()
Constructor Details
AlterSchemaRequest
public AlterSchemaRequest()Constructs an AlterSchemaRequest object with default parameters.AlterSchemaRequest
public AlterSchemaRequest(String schemaName, String action, String value, Map<String, String> options) Constructs an AlterSchemaRequest object with the specified parameters.Parameters:schemaName- Name of the schema to be altered.action- Modification operation to be applied. Supported values:ADD_COMMENT: Adds a comment describing the schema.RENAME_SCHEMA: Renames a schema tovalue. Has the same naming restrictions as tables.
value- The value of the modification, depending onaction. For now the only value ofactionisRENAME_SCHEMA. In this case the value is the new name of the schema.options- Optional parameters. The default value is an emptyMap.
Method Details
getClassSchema
public static org.apache.avro.Schema getClassSchema()This method supports the Avro framework and is not intended to be called directly by the user.Returns:The schema for the class.setSchemaName
Name of the schema to be altered.Parameters:schemaName- The new value forschemaName.Returns:thisto mimic the builder pattern.getAction
Modification operation to be applied. Supported values:ADD_COMMENT: Adds a comment describing the schema.RENAME_SCHEMA: Renames a schema tovalue. Has the same naming restrictions as tables.
Returns:The current value ofaction.setAction
Modification operation to be applied. Supported values:ADD_COMMENT: Adds a comment describing the schema.RENAME_SCHEMA: Renames a schema tovalue. Has the same naming restrictions as tables.
Parameters:action- The new value foraction.Returns:thisto mimic the builder pattern.getValue
The value of the modification, depending onaction. For now the only value ofactionisRENAME_SCHEMA. In this case the value is the new name of the schema.Returns:The current value ofvalue.setValue
The value of the modification, depending onaction. For now the only value ofactionisRENAME_SCHEMA. In this case the value is the new name of the schema.Parameters:value- The new value forvalue.Returns:thisto mimic the builder pattern.getSchema
public org.apache.avro.Schema getSchema()This method supports the Avro framework and is not intended to be called directly by the user.Specified by:getSchemain interfaceorg.apache.avro.generic.GenericContainerReturns:The schema object describing this class.get
This method supports the Avro framework and is not intended to be called directly by the user.Specified by:getin interfaceorg.apache.avro.generic.IndexedRecordParameters:index- the position of the field to getReturns:value of the field with the given index.Throws:put
This method supports the Avro framework and is not intended to be called directly by the user.Specified by:putin interfaceorg.apache.avro.generic.IndexedRecordParameters:index- the position of the field to setvalue- the value to setThrows: