public class DeleteRecordsRequest extends Object implements org.apache.avro.generic.IndexedRecord
GPUdb.deleteRecords(DeleteRecordsRequest).
Deletes record(s) matching the provided criteria from the given table. The
record selection criteria can either be one or more expressions
(matching multiple records) or a single record identified by record_id options. Note that the two selection criteria are mutually
exclusive. This operation cannot be run on a collection or a view. The
operation is synchronous meaning that a response will not be available until
the request is completely processed and all the matching records are
deleted.
| Modifier and Type | Class and Description |
|---|---|
static class |
DeleteRecordsRequest.Options
Optional parameters.
|
| Constructor and Description |
|---|
DeleteRecordsRequest()
Constructs a DeleteRecordsRequest object with default parameters.
|
DeleteRecordsRequest(String tableName,
List<String> expressions,
Map<String,String> options)
Constructs a DeleteRecordsRequest 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.
|
List<String> |
getExpressions() |
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() |
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.
|
DeleteRecordsRequest |
setExpressions(List<String> expressions) |
DeleteRecordsRequest |
setOptions(Map<String,String> options) |
DeleteRecordsRequest |
setTableName(String tableName) |
String |
toString() |
public DeleteRecordsRequest()
public DeleteRecordsRequest(String tableName, List<String> expressions, Map<String,String> options)
tableName - Name of the table from which to delete records. The
set must be a currently existing table and not a
collection or a view.expressions - A list of the actual predicates, one for each
select; format should follow the guidelines provided
here.
Specifying one or more expressions is
mutually exclusive to specifying record_id
in the options.options - Optional parameters.
GLOBAL_EXPRESSION: An optional global expression to
reduce the search space of the expressions.
RECORD_ID: A record id identifying a single record,
obtained at the time of insertion of the record or by calling GPUdb.getRecordsFromCollectionRaw(GetRecordsFromCollectionRequest)
with the *return_record_ids* option.
public static org.apache.avro.Schema getClassSchema()
public String getTableName()
public DeleteRecordsRequest setTableName(String tableName)
tableName - Name of the table from which to delete records. The
set must be a currently existing table and not a
collection or a view.this to mimic the builder pattern.public List<String> getExpressions()
here. Specifying one or
more expressions is mutually exclusive to specifying
record_id in the options.public DeleteRecordsRequest setExpressions(List<String> expressions)
expressions - A list of the actual predicates, one for each
select; format should follow the guidelines provided
here.
Specifying one or more expressions is
mutually exclusive to specifying record_id
in the options.this to mimic the builder pattern.public Map<String,String> getOptions()
GLOBAL_EXPRESSION: An optional global expression to reduce the
search space of the expressions.
RECORD_ID: A record id identifying a single record, obtained at
the time of insertion of the record or by calling GPUdb.getRecordsFromCollectionRaw(GetRecordsFromCollectionRequest)
with the *return_record_ids* option.
public DeleteRecordsRequest setOptions(Map<String,String> options)
options - Optional parameters.
GLOBAL_EXPRESSION: An optional global expression to
reduce the search space of the expressions.
RECORD_ID: A record id identifying a single record,
obtained at the time of insertion of the record or by calling GPUdb.getRecordsFromCollectionRaw(GetRecordsFromCollectionRequest)
with the *return_record_ids* option.
this to mimic the builder pattern.public org.apache.avro.Schema getSchema()
getSchema in interface org.apache.avro.generic.GenericContainerpublic Object get(int index)
get in interface org.apache.avro.generic.IndexedRecordindex - the position of the field to getIndexOutOfBoundsExceptionpublic void put(int index,
Object value)
put in interface org.apache.avro.generic.IndexedRecordindex - the position of the field to setvalue - the value to setIndexOutOfBoundsExceptionCopyright © 2017. All rights reserved.