public static final class UpdateRecordsRequest.Options extends Object
GLOBAL_EXPRESSION
: An optional global expression to reduce the search
space of the predicates listed in expressions
. The default
value is ''.
BYPASS_SAFETY_CHECKS
: When set to true
, all predicates are
available for primary key updates. Keep in mind that it is possible to
destroy data in this case, since a single predicate may match multiple
objects (potentially all of records of a table), and then updating all
of those records to have the same primary key will, due to the primary
key uniqueness constraints, effectively delete all but one of those
updated records.
Supported values:
The default value is FALSE
.
UPDATE_ON_EXISTING_PK
: Specifies the record collision policy for tables
with a primary key when updating columns of the primary key or inserting new records. If true
, existing records with primary key values that match those of a
record being updated or inserted will be replaced by the updated and new
records. If false
, existing records with matching primary key
values will remain unchanged, and the updated or new records with
primary key values that match those of existing records will be
discarded. If the specified table does not have a primary key, then
this option has no effect.
Supported values:
TRUE
: Overwrite
existing records when updated and inserted records have the same primary
keys
FALSE
: Discard
updated and inserted records when the same primary keys already exist
FALSE
.
UPDATE_PARTITION
: Force qualifying records to be deleted and reinserted
so their partition membership will be reevaluated.
Supported values:
The default value is FALSE
.
TRUNCATE_STRINGS
: If set to true
, any strings which are too
long for their charN string fields will be truncated to fit.
Supported values:
The default value is FALSE
.
USE_EXPRESSIONS_IN_NEW_VALUES_MAPS
: When set to true
, all new
values in newValuesMaps
are considered as expression values.
When set to false
, all new values in newValuesMaps
are
considered as constants. NOTE: When true
, string constants
will need to be quoted to avoid being evaluated as expressions.
Supported values:
The default value is FALSE
.
RECORD_ID
:
ID of a single record to be updated (returned in the call to GPUdb.insertRecords(InsertRecordsRequest)
or GPUdb.getRecordsFromCollection(Object,
GetRecordsFromCollectionRequest)
).
Map
.
A set of string constants for the parameter options
.Modifier and Type | Field and Description |
---|---|
static String |
BYPASS_SAFETY_CHECKS
When set to
true , all predicates are available for primary
key updates. |
static String |
FALSE |
static String |
GLOBAL_EXPRESSION
An optional global expression to reduce the search space of the
predicates listed in
expressions . |
static String |
RECORD_ID
ID of a single record to be updated (returned in the call to
GPUdb.insertRecords(InsertRecordsRequest) or GPUdb.getRecordsFromCollection(Object,
GetRecordsFromCollectionRequest) ). |
static String |
TRUE |
static String |
TRUNCATE_STRINGS
If set to
true , any strings which are too long for their
charN string fields will be truncated to fit. |
static String |
UPDATE_ON_EXISTING_PK
Specifies the record collision policy for tables with a primary key when updating columns of the primary key or inserting new records.
|
static String |
UPDATE_PARTITION
Force qualifying records to be deleted and reinserted so their
partition membership will be reevaluated.
|
static String |
USE_EXPRESSIONS_IN_NEW_VALUES_MAPS
When set to
true , all new values in newValuesMaps
are considered as expression values. |
public static final String GLOBAL_EXPRESSION
expressions
. The default value is ''.public static final String BYPASS_SAFETY_CHECKS
true
, all predicates are available for primary
key updates. Keep in mind that it is possible to destroy data in
this case, since a single predicate may match multiple objects
(potentially all of records of a table), and then updating all of
those records to have the same primary key will, due to the primary
key uniqueness constraints, effectively delete all but one of those
updated records.
Supported values:
The default value is FALSE
.public static final String TRUE
public static final String FALSE
public static final String UPDATE_ON_EXISTING_PK
true
, existing records with primary key values that match those of
a record being updated or inserted will be replaced by the updated
and new records. If false
, existing records with matching
primary key values will remain unchanged, and the updated or new
records with primary key values that match those of existing records
will be discarded. If the specified table does not have a primary
key, then this option has no effect.
Supported values:
TRUE
:
Overwrite existing records when updated and inserted records have
the same primary keys
FALSE
:
Discard updated and inserted records when the same primary keys
already exist
FALSE
.public static final String UPDATE_PARTITION
FALSE
.public static final String TRUNCATE_STRINGS
true
, any strings which are too long for their
charN string fields will be truncated to fit.
Supported values:
The default value is FALSE
.public static final String USE_EXPRESSIONS_IN_NEW_VALUES_MAPS
true
, all new values in newValuesMaps
are considered as expression values. When set to false
, all
new values in newValuesMaps
are considered as constants.
NOTE: When true
, string constants will need to be quoted to
avoid being evaluated as expressions.
Supported values:
The default value is FALSE
.public static final String RECORD_ID
GPUdb.insertRecords(InsertRecordsRequest)
or GPUdb.getRecordsFromCollection(Object,
GetRecordsFromCollectionRequest)
).Copyright © 2020. All rights reserved.