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), a single record identified by record_id
options, or all records when using delete_all_records
. Note that
the three 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
. The
default value is ''.
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 option cannot
be used to delete records from replicated tables.
DELETE_ALL_RECORDS
: If set to true
, all records
in the table will be deleted. If set to false
,
then the option is effectively ignored.
Supported values:
The default value is FALSE
.
Map
.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()
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
. The default value is
''.
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 option cannot be used
to delete records from replicated tables.
DELETE_ALL_RECORDS
: If set to true
, all records in the
table will be deleted. If set to false
, then the option
is effectively ignored.
Supported values:
The default value is FALSE
.
Map
.public DeleteRecordsRequest setOptions(Map<String,String> options)
options
- Optional parameters.
GLOBAL_EXPRESSION
: An optional global expression to
reduce the search space of the expressions
. The
default value is ''.
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 option cannot
be used to delete records from replicated tables.
DELETE_ALL_RECORDS
: If set to true
, all records
in the table will be deleted. If set to false
,
then the option is effectively ignored.
Supported values:
The default value is FALSE
.
Map
.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 © 2019. All rights reserved.