public class DeleteRecordsRequest extends Object implements org.apache.avro.generic.IndexedRecord
GPUdb.deleteRecords.
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 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
A set of string constants for the
DeleteRecordsRequest parameter
options. |
| 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()
A list of the actual predicates, one for each select; format should
follow the guidelines provided
Map<String,String>getOptions()
Optional parameters.
| ||
org.apache.avro.Schema |
getSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
||
String |
getTableName()
Name of the table from which to delete records, in
[schema_name.]table_name format, using standard
inthashCode() | ||
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)
A list of the actual predicates, one for each select; format should
follow the guidelines provided
DeleteRecordsRequestsetOptions(Map<String,String> options)
Optional parameters.
| ||
DeleteRecordsRequest |
setTableName(String tableName)
|
public DeleteRecordsRequest()
public DeleteRecordsRequest(String tableName, List<String> expressions, Map<String,String> options)
tableName - Name of the table from which to delete records, in
[schema_name.]table_name format, using standard name resolution rules. Must contain
the name of an existing table; not applicable to
views.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.getRecordsFromCollection 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()
tableName.public DeleteRecordsRequest setTableName(String tableName)
tableName - The new value for tableName.this to mimic the builder pattern.public List<String> getExpressions()
expressions is mutually
exclusive to specifying RECORD_ID in the
options.expressions.public DeleteRecordsRequest setExpressions(List<String> expressions)
expressions is mutually
exclusive to specifying RECORD_ID in the
options.expressions - The new value for expressions.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.getRecordsFromCollection 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.options.public DeleteRecordsRequest setOptions(Map<String,String> options)
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.getRecordsFromCollection 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.options - The new value for options.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 © 2025. All rights reserved.