public class RawUpdateRecordsRequest extends Object implements org.apache.avro.generic.IndexedRecord
GPUdb.updateRecordsRaw(RawUpdateRecordsRequest)
.
newValuesMaps
. There is also an optional 'upsert' capability where if a particular
predicate doesn't match any existing record, then a new record can be inserted.
options
.
The Raw version of this method can be used to specify the encoding scheme of the request.Modifier and Type | Class and Description |
---|---|
static class |
RawUpdateRecordsRequest.Options
Optional parameters.
|
static class |
RawUpdateRecordsRequest.RecordEncoding
Identifies which of
recordsToInsert and recordsToInsertStr should be used. |
Constructor and Description |
---|
RawUpdateRecordsRequest()
Constructs a RawUpdateRecordsRequest object with default parameters.
|
RawUpdateRecordsRequest(String tableName,
List<String> expressions,
List<Map<String,String>> newValuesMaps,
List<ByteBuffer> recordsToInsert,
List<String> recordsToInsertStr,
String recordEncoding,
Map<String,String> options)
Constructs a RawUpdateRecordsRequest object with the specified parameters.
|
RawUpdateRecordsRequest(String tableName,
List<String> expressions,
List<Map<String,String>> newValuesMaps,
List<ByteBuffer> recordsToInsert,
Map<String,String> options)
Constructs a RawUpdateRecordsRequest object with the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
The Raw version of this method can be used to specify the encoding scheme of the request.
|
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.
|
List<String> |
getExpressions()
The Raw version of this method can be used to specify the encoding scheme of the request.
|
List<Map<String,String>> |
getNewValuesMaps()
The Raw version of this method can be used to specify the encoding scheme of the request.
|
Map<String,String> |
getOptions()
The Raw version of this method can be used to specify the encoding scheme of the request.
|
String |
getRecordEncoding()
The Raw version of this method can be used to specify the encoding scheme of the request.
|
List<ByteBuffer> |
getRecordsToInsert()
The Raw version of this method can be used to specify the encoding scheme of the request.
|
List<String> |
getRecordsToInsertStr()
The Raw version of this method can be used to specify the encoding scheme of the request.
|
org.apache.avro.Schema |
getSchema()
This method supports the Avro framework and is not intended to be called directly by the user.
|
String |
getTableName()
The Raw version of this method can be used to specify the encoding scheme of the request.
|
int |
hashCode()
The Raw version of this method can be used to specify the encoding scheme of the request.
|
void |
put(int index,
Object value)
This method supports the Avro framework and is not intended to be called directly by the user.
|
RawUpdateRecordsRequest |
setExpressions(List<String> expressions)
The Raw version of this method can be used to specify the encoding scheme of the request.
|
RawUpdateRecordsRequest |
setNewValuesMaps(List<Map<String,String>> newValuesMaps)
The Raw version of this method can be used to specify the encoding scheme of the request.
|
RawUpdateRecordsRequest |
setOptions(Map<String,String> options)
The Raw version of this method can be used to specify the encoding scheme of the request.
|
RawUpdateRecordsRequest |
setRecordEncoding(String recordEncoding)
The Raw version of this method can be used to specify the encoding scheme of the request.
|
RawUpdateRecordsRequest |
setRecordsToInsert(List<ByteBuffer> recordsToInsert)
The Raw version of this method can be used to specify the encoding scheme of the request.
|
RawUpdateRecordsRequest |
setRecordsToInsertStr(List<String> recordsToInsertStr)
The Raw version of this method can be used to specify the encoding scheme of the request.
|
RawUpdateRecordsRequest |
setTableName(String tableName)
The Raw version of this method can be used to specify the encoding scheme of the request.
|
String |
toString()
The Raw version of this method can be used to specify the encoding scheme of the request.
|
public RawUpdateRecordsRequest()
public RawUpdateRecordsRequest(String tableName, List<String> expressions, List<Map<String,String>> newValuesMaps, List<ByteBuffer> recordsToInsert, Map<String,String> options)
tableName
- Table to be updated. Must be a currently existing table and not a collection or view.expressions
- A list of the actual predicates, one for each update; format should follow the guidelines here
.newValuesMaps
- List of new values for the matching records. Each element is a map with (key, value) pairs where the
keys are the names of the columns whose values are to be updated; the values are the new values. The
number of elements in the list should match the length of expressions
.recordsToInsert
- An *optional* list of new binary-avro encoded records to insert, one for each update. If one of
expressions
does not yield a matching record to be updated, then the corresponding element
from this list will be added to the table.options
- Optional parameters.
expressions
.
GPUdb.insertRecordsRaw(RawInsertRecordsRequest)
. Values:
true, false.
GPUdb.insertRecordsRaw(RawInsertRecordsRequest)
or GPUdb.getRecordsFromCollectionRaw(GetRecordsFromCollectionRequest)
).
public RawUpdateRecordsRequest(String tableName, List<String> expressions, List<Map<String,String>> newValuesMaps, List<ByteBuffer> recordsToInsert, List<String> recordsToInsertStr, String recordEncoding, Map<String,String> options)
tableName
- Table to be updated. Must be a currently existing table and not a collection or view.expressions
- A list of the actual predicates, one for each update; format should follow the guidelines here
.newValuesMaps
- List of new values for the matching records. Each element is a map with (key, value) pairs where the
keys are the names of the columns whose values are to be updated; the values are the new values. The
number of elements in the list should match the length of expressions
.recordsToInsert
- An *optional* list of new binary-avro encoded records to insert, one for each update. If one of
expressions
does not yield a matching record to be updated, then the corresponding element
from this list will be added to the table.recordsToInsertStr
- An optional list of new json-avro encoded objects to insert, one for each update, to be added to
the set if the particular update did not affect any objects.recordEncoding
- Identifies which of recordsToInsert
and recordsToInsertStr
should be used. Values:
binary, json.options
- Optional parameters.
expressions
.
GPUdb.insertRecordsRaw(RawInsertRecordsRequest)
. Values:
true, false.
GPUdb.insertRecordsRaw(RawInsertRecordsRequest)
or GPUdb.getRecordsFromCollectionRaw(GetRecordsFromCollectionRequest)
).
public static org.apache.avro.Schema getClassSchema()
public String getTableName()
public RawUpdateRecordsRequest setTableName(String tableName)
tableName
- Table to be updated. Must be a currently existing table and not a collection or view.this
to mimic the builder pattern.public List<String> getExpressions()
here
.public RawUpdateRecordsRequest setExpressions(List<String> expressions)
expressions
- A list of the actual predicates, one for each update; format should follow the guidelines here
.this
to mimic the builder pattern.public List<Map<String,String>> getNewValuesMaps()
expressions
.public RawUpdateRecordsRequest setNewValuesMaps(List<Map<String,String>> newValuesMaps)
newValuesMaps
- List of new values for the matching records. Each element is a map with (key, value) pairs where the
keys are the names of the columns whose values are to be updated; the values are the new values. The
number of elements in the list should match the length of expressions
.this
to mimic the builder pattern.public List<ByteBuffer> getRecordsToInsert()
expressions
does not yield a matching record to be updated, then the corresponding element from this list will be added to the
table.public RawUpdateRecordsRequest setRecordsToInsert(List<ByteBuffer> recordsToInsert)
recordsToInsert
- An *optional* list of new binary-avro encoded records to insert, one for each update. If one of
expressions
does not yield a matching record to be updated, then the corresponding element
from this list will be added to the table.this
to mimic the builder pattern.public List<String> getRecordsToInsertStr()
public RawUpdateRecordsRequest setRecordsToInsertStr(List<String> recordsToInsertStr)
recordsToInsertStr
- An optional list of new json-avro encoded objects to insert, one for each update, to be added to
the set if the particular update did not affect any objects.this
to mimic the builder pattern.public String getRecordEncoding()
recordsToInsert
and recordsToInsertStr
should be used. Values: binary, json.public RawUpdateRecordsRequest setRecordEncoding(String recordEncoding)
recordEncoding
- Identifies which of recordsToInsert
and recordsToInsertStr
should be used. Values:
binary, json.this
to mimic the builder pattern.public Map<String,String> getOptions()
expressions
.
GPUdb.insertRecordsRaw(RawInsertRecordsRequest)
. Values: true, false.
GPUdb.insertRecordsRaw(RawInsertRecordsRequest)
or GPUdb.getRecordsFromCollectionRaw(GetRecordsFromCollectionRequest)
).
public RawUpdateRecordsRequest setOptions(Map<String,String> options)
options
- Optional parameters.
expressions
.
GPUdb.insertRecordsRaw(RawInsertRecordsRequest)
. Values:
true, false.
GPUdb.insertRecordsRaw(RawInsertRecordsRequest)
or GPUdb.getRecordsFromCollectionRaw(GetRecordsFromCollectionRequest)
).
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
public boolean equals(Object obj)
public String toString()
Copyright © 2016. All rights reserved.