Kinetica C# API  Version 6.0.1.0
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Pages
kinetica.UpdateRecordsRequest< T > Class Template Reference

A set of parameters for /update/records. More...

+ Inheritance diagram for kinetica.UpdateRecordsRequest< T >:
+ Collaboration diagram for kinetica.UpdateRecordsRequest< T >:

Classes

struct  Options
 Optional parameters. More...
 

Public Member Functions

 UpdateRecordsRequest ()
 Constructs an UpdateRecordsRequest object with default parameters. More...
 
 UpdateRecordsRequest (string table_name, IList< string > expressions, IList< IDictionary< string, string >> new_values_maps, IList< T > data=null, IDictionary< string, string > options=null)
 Constructs an UpdateRecordsRequest object with the specified parameters. More...
 
- Public Member Functions inherited from kinetica.KineticaData
 KineticaData (KineticaType type)
 Constructor from Kinetica Type More...
 
 KineticaData (System.Type type=null)
 Default constructor, with optional System.Type More...
 
object Get (int fieldPos)
 Retrieve a specific property from this object More...
 
void Put (int fieldPos, object fieldValue)
 Write a specific property to this object More...
 

Properties

string table_name [get, set]
 Table to be updated. More...
 
IList< string > expressions [get, set]
 A list of the actual predicates, one for each update; format should follow the guidelines /filter. More...
 
IList< IDictionary< string,
string > > 
new_values_maps = new List<string>() [get, set]
 List of new values for the matching records. More...
 
IList< T > data = new List<IDictionary<string, string>>() [get, set]
 An optional list of new binary-avro encoded records to insert, one for each update. More...
 
IDictionary< string, string > options = new List<T>() [get, set]
 Optional parameters. More...
 
- Properties inherited from kinetica.KineticaData
Schema Schema [get]
 Avro Schema for this class More...
 

Additional Inherited Members

- Static Public Member Functions inherited from kinetica.KineticaData
static RecordSchema SchemaFromType (System.Type t, KineticaType ktype=null)
 Create an Avro Schema from a System.Type and a KineticaType. More...
 

Detailed Description

A set of parameters for /update/records.


Runs multiple predicate-based updates in a single call. With the list of given expressions, any matching record's column values will be updated as provided in <member name="new_values_maps">. 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.
Note that this operation can only be run on an original table and not on a collection or a result view.
This operation can update primary key values. By default only 'pure primary key' predicates are allowed when updating primary key values. If the primary key for a table is the column 'attr1', then the operation will only accept predicates of the form: "attr1 == 'foo'" if the attr1 column is being updated. For a composite primary key (e.g. columns 'attr1' and 'attr2') then this operation will only accept predicates of the form: "(attr1 == 'foo') and (attr2 == 'bar')". Meaning, all primary key columns must appear in an equality predicate in the expressions. Furthermore each 'pure primary key' predicate must be unique within a given request. These restrictions can be removed by utilizing some available options through <member name="options">.

Template Parameters
TThe type of object being processed.

Definition at line 378 of file UpdateRecords.cs.

Constructor & Destructor Documentation

kinetica.UpdateRecordsRequest< T >.UpdateRecordsRequest ( )
inline

Constructs an UpdateRecordsRequest object with default parameters.

Definition at line 513 of file UpdateRecords.cs.

kinetica.UpdateRecordsRequest< T >.UpdateRecordsRequest ( string  table_name,
IList< string >  expressions,
IList< IDictionary< string, string >>  new_values_maps,
IList< T >  data = null,
IDictionary< string, string >  options = null 
)
inline

Constructs an UpdateRecordsRequest object with the specified parameters.

Parameters
table_nameTable to be updated. Must be a currently existing table and not a collection or view.
expressionsA list of the actual predicates, one for each update; format should follow the guidelines /filter.
new_values_mapsList 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 .
dataAn optional list of new binary-avro encoded records to insert, one for each update. If one of does not yield a matching record to be updated, then the corresponding element from this list will be added to the table.
optionsOptional parameters.
  • global_expression An optional global expression to reduce the search space of the predicates listed in .
  • 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. Values: true, false.
  • update_on_existing_pk Can be used to customize behavior when the updated primary key value already exists, as described in /insert/records. Values: true, false.
  • record_id ID of a single record to be updated (returned in the call to /insert/records or /get/records/fromcollection).

Definition at line 568 of file UpdateRecords.cs.

Property Documentation

IList<T> kinetica.UpdateRecordsRequest< T >.data = new List<IDictionary<string, string>>()
getset

An optional list of new binary-avro encoded records to insert, one for each update.

If one of does not yield a matching record to be updated, then the corresponding element from this list will be added to the table.

Definition at line 472 of file UpdateRecords.cs.

IList<string> kinetica.UpdateRecordsRequest< T >.expressions
getset

A list of the actual predicates, one for each update; format should follow the guidelines /filter.

Definition at line 457 of file UpdateRecords.cs.

IList<IDictionary<string, string> > kinetica.UpdateRecordsRequest< T >.new_values_maps = new List<string>()
getset

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 .

Definition at line 465 of file UpdateRecords.cs.

IDictionary<string, string> kinetica.UpdateRecordsRequest< T >.options = new List<T>()
getset

Optional parameters.

  • global_expression An optional global expression to reduce the search space of the predicates listed in .
  • 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. Values: true, false.
  • update_on_existing_pk Can be used to customize behavior when the updated primary key value already exists, as described in /insert/records. Values: true, false.
  • record_id ID of a single record to be updated (returned in the call to /insert/records or /get/records/fromcollection).

Definition at line 508 of file UpdateRecords.cs.

string kinetica.UpdateRecordsRequest< T >.table_name
getset

Table to be updated.

Must be a currently existing table and not a collection or view.

Definition at line 453 of file UpdateRecords.cs.


The documentation for this class was generated from the following file: