Kinetica C# API  Version 6.0.1.0
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Pages
UpdateRecords.cs
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the Kinetica schema processor.
3  *
4  * DO NOT EDIT DIRECTLY.
5  */
6 
7 using System.Collections.Generic;
8 
9 
10 
11 namespace kinetica
12 {
13 
38  {
39 
47  public struct RecordEncoding
48  {
49  public const string BINARY = "binary";
50  public const string JSON = "json";
51  } // end struct RecordEncoding
52 
53 
90  public struct Options
91  {
92 
96  public const string GLOBAL_EXPRESSION = "global_expression";
97 
107  public const string BYPASS_SAFETY_CHECKS = "bypass_safety_checks";
108  public const string TRUE = "true";
109  public const string FALSE = "false";
110 
115  public const string UPDATE_ON_EXISTING_PK = "update_on_existing_pk";
116 
120  public const string RECORD_ID = "record_id";
121  } // end struct Options
122 
123 
126  public string table_name { get; set; }
127 
130  public IList<string> expressions { get; set; } = new List<string>();
131 
138  public IList<IDictionary<string, string>> new_values_maps { get; set; } = new List<IDictionary<string, string>>();
139 
145  public IList<byte[]> records_to_insert { get; set; } = new List<byte[]>();
146 
150  public IList<string> records_to_insert_str { get; set; } = new List<string>();
151 
157  public string record_encoding { get; set; } = RecordEncoding.BINARY;
158 
193  public IDictionary<string, string> options { get; set; } = new Dictionary<string, string>();
194 
195 
199 
254  IList<string> expressions,
255  IList<IDictionary<string, string>> new_values_maps,
256  IList<byte[]> records_to_insert = null,
257  IDictionary<string, string> options = null)
258  {
259  this.table_name = table_name ?? "";
260  this.expressions = expressions ?? new List<string>();
261  this.new_values_maps = new_values_maps ?? new List<IDictionary<string, string>>();
262  this.records_to_insert = records_to_insert ?? new List<byte[]>();
263  this.records_to_insert_str = new List<string>();
264  this.record_encoding = RecordEncoding.BINARY;
265  this.options = options ?? new Dictionary<string, string>();
266  } // end constructor
267 
268 
332  IList<string> expressions,
333  IList<IDictionary<string, string>> new_values_maps,
334  IList<byte[]> records_to_insert = null,
335  IList<string> records_to_insert_str = null,
336  string record_encoding = null,
337  IDictionary<string, string> options = null)
338  {
339  this.table_name = table_name ?? "";
340  this.expressions = expressions ?? new List<string>();
341  this.new_values_maps = new_values_maps ?? new List<IDictionary<string, string>>();
342  this.records_to_insert = records_to_insert ?? new List<byte[]>();
343  this.records_to_insert_str = records_to_insert_str ?? new List<string>();
344  this.record_encoding = record_encoding ?? RecordEncoding.BINARY;
345  this.options = options ?? new Dictionary<string, string>();
346  } // end full constructor
347 
348  } // end class RawUpdateRecordsRequest
349 
350 
351 
378  public class UpdateRecordsRequest<T> : KineticaData
379  {
380 
417  public struct Options
418  {
419 
423  public const string GLOBAL_EXPRESSION = "global_expression";
424 
434  public const string BYPASS_SAFETY_CHECKS = "bypass_safety_checks";
435  public const string TRUE = "true";
436  public const string FALSE = "false";
437 
442  public const string UPDATE_ON_EXISTING_PK = "update_on_existing_pk";
443 
447  public const string RECORD_ID = "record_id";
448  } // end struct Options
449 
450 
453  public string table_name { get; set; }
454 
457  public IList<string> expressions { get; set; } = new List<string>();
458 
465  public IList<IDictionary<string, string>> new_values_maps { get; set; } = new List<IDictionary<string, string>>();
466 
472  public IList<T> data { get; set; } = new List<T>();
473 
508  public IDictionary<string, string> options { get; set; } = new Dictionary<string, string>();
509 
510 
513  public UpdateRecordsRequest() { }
514 
568  public UpdateRecordsRequest( string table_name,
569  IList<string> expressions,
570  IList<IDictionary<string, string>> new_values_maps,
571  IList<T> data = null,
572  IDictionary<string, string> options = null)
573  {
574  this.table_name = table_name ?? "";
575  this.expressions = expressions ?? new List<string>();
576  this.new_values_maps = new_values_maps ?? new List<IDictionary<string, string>>();
577  this.data = data ?? new List<T>();
578  this.options = options ?? new Dictionary<string, string>();
579  } // end constructor
580 
581  } // end class UpdateRecordsRequest
582 
583 
584 
587  {
588 
590  public long count_updated { get; set; }
591 
594  public IList<long> counts_updated { get; set; } = new List<long>();
595 
598  public long count_inserted { get; set; }
599 
603  public IList<long> counts_inserted { get; set; } = new List<long>();
604 
605  } // end class UpdateRecordsResponse
606 
607 
608 
609 
610 } // end namespace kinetica
IList< string > expressions
A list of the actual predicates, one for each update; format should follow the guidelines /filter...
const string GLOBAL_EXPRESSION
An optional global expression to reduce the search space of the predicates listed in &lt;member name=&quot;ex...
string record_encoding
Identifies which of and should be used.
const string RECORD_ID
ID of a single record to be updated (returned in the call to /insert/records or /get/records/fromcoll...
A set of parameters for /update/records.
A set of results returned by /update/records.
UpdateRecordsRequest()
Constructs an UpdateRecordsRequest object with default parameters.
RawUpdateRecordsRequest(string table_name, IList< string > expressions, IList< IDictionary< string, string >> new_values_maps, IList< byte[]> records_to_insert=null, IDictionary< string, string > options=null)
Constructs a RawUpdateRecordsRequest object with the specified parameters.
IList< byte[]> records_to_insert
An optional list of new binary-avro encoded records to insert, one for each update.
const string UPDATE_ON_EXISTING_PK
Can be used to customize behavior when the updated primary key value already exists, as described in /insert/records.
long count_updated
Total number of records updated.
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.
IList< IDictionary< string, string > > new_values_maps
List of new values for the matching records.
Identifies which of and should be used.
IList< long > counts_inserted
Total number of records inserted per predicate in (will be either 0 or 1 for each expression)...
IList< long > counts_updated
Total number of records updated per predicate in .
string table_name
Table to be updated.
IDictionary< string, string > options
Optional parameters.
RawUpdateRecordsRequest(string table_name, IList< string > expressions, IList< IDictionary< string, string >> new_values_maps, IList< byte[]> records_to_insert=null, IList< string > records_to_insert_str=null, string record_encoding=null, IDictionary< string, string > options=null)
Constructs a RawUpdateRecordsRequest object with the specified parameters.
long count_inserted
Total number of records inserted (due to expressions not matching any existing records).
KineticaData - class to help with Avro Encoding for Kinetica
Definition: KineticaData.cs:14
IList< string > records_to_insert_str
An optional list of new json-avro encoded objects to insert, one for each update, to be added to the ...
const string BYPASS_SAFETY_CHECKS
When set to &#39;true&#39;, all predicates are available for primary key updates.
RawUpdateRecordsRequest()
Constructs a RawUpdateRecordsRequest object with default parameters.