Kinetica C# API  Version 7.0.19.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 
46  {
47 
67  public struct RecordEncoding
68  {
69  public const string BINARY = "binary";
70  public const string JSON = "json";
71  } // end struct RecordEncoding
72 
73 
214  public struct Options
215  {
216 
220  public const string GLOBAL_EXPRESSION = "global_expression";
221 
242  public const string BYPASS_SAFETY_CHECKS = "bypass_safety_checks";
243  public const string TRUE = "true";
244  public const string FALSE = "false";
245 
276  public const string UPDATE_ON_EXISTING_PK = "update_on_existing_pk";
277 
293  public const string UPDATE_PARTITION = "update_partition";
294 
310  public const string TRUNCATE_STRINGS = "truncate_strings";
311 
331  public const string USE_EXPRESSIONS_IN_NEW_VALUES_MAPS = "use_expressions_in_new_values_maps";
332 
339  public const string RECORD_ID = "record_id";
340  } // end struct Options
341 
342 
345  public string table_name { get; set; }
346 
349  public IList<string> expressions { get; set; } = new List<string>();
350 
357  public IList<IDictionary<string, string>> new_values_maps { get; set; } = new List<IDictionary<string, string>>();
358 
365  public IList<byte[]> records_to_insert { get; set; } = new List<byte[]>();
366 
371  public IList<string> records_to_insert_str { get; set; } = new List<string>();
372 
391  public string record_encoding { get; set; } = RecordEncoding.BINARY;
392 
531  public IDictionary<string, string> options { get; set; } = new Dictionary<string, string>();
532 
533 
537 
697  IList<string> expressions,
698  IList<IDictionary<string, string>> new_values_maps,
699  IList<byte[]> records_to_insert = null,
700  IDictionary<string, string> options = null)
701  {
702  this.table_name = table_name ?? "";
703  this.expressions = expressions ?? new List<string>();
704  this.new_values_maps = new_values_maps ?? new List<IDictionary<string, string>>();
705  this.records_to_insert = records_to_insert ?? new List<byte[]>();
706  this.records_to_insert_str = new List<string>();
707  this.record_encoding = RecordEncoding.BINARY;
708  this.options = options ?? new Dictionary<string, string>();
709  } // end constructor
710 
711 
893  IList<string> expressions,
894  IList<IDictionary<string, string>> new_values_maps,
895  IList<byte[]> records_to_insert = null,
896  IList<string> records_to_insert_str = null,
897  string record_encoding = null,
898  IDictionary<string, string> options = null)
899  {
900  this.table_name = table_name ?? "";
901  this.expressions = expressions ?? new List<string>();
902  this.new_values_maps = new_values_maps ?? new List<IDictionary<string, string>>();
903  this.records_to_insert = records_to_insert ?? new List<byte[]>();
904  this.records_to_insert_str = records_to_insert_str ?? new List<string>();
905  this.record_encoding = record_encoding ?? RecordEncoding.BINARY;
906  this.options = options ?? new Dictionary<string, string>();
907  } // end full constructor
908 
909  } // end class RawUpdateRecordsRequest
910 
911 
912 
947  public class UpdateRecordsRequest<T> : KineticaData
948  {
949 
1090  public struct Options
1091  {
1092 
1096  public const string GLOBAL_EXPRESSION = "global_expression";
1097 
1118  public const string BYPASS_SAFETY_CHECKS = "bypass_safety_checks";
1119  public const string TRUE = "true";
1120  public const string FALSE = "false";
1121 
1152  public const string UPDATE_ON_EXISTING_PK = "update_on_existing_pk";
1153 
1169  public const string UPDATE_PARTITION = "update_partition";
1170 
1186  public const string TRUNCATE_STRINGS = "truncate_strings";
1187 
1207  public const string USE_EXPRESSIONS_IN_NEW_VALUES_MAPS = "use_expressions_in_new_values_maps";
1208 
1215  public const string RECORD_ID = "record_id";
1216  } // end struct Options
1217 
1218 
1221  public string table_name { get; set; }
1222 
1225  public IList<string> expressions { get; set; } = new List<string>();
1226 
1233  public IList<IDictionary<string, string>> new_values_maps { get; set; } = new List<IDictionary<string, string>>();
1234 
1241  public IList<T> data { get; set; } = new List<T>();
1242 
1381  public IDictionary<string, string> options { get; set; } = new Dictionary<string, string>();
1382 
1383 
1387 
1546  public UpdateRecordsRequest( string table_name,
1547  IList<string> expressions,
1548  IList<IDictionary<string, string>> new_values_maps,
1549  IList<T> data = null,
1550  IDictionary<string, string> options = null)
1551  {
1552  this.table_name = table_name ?? "";
1553  this.expressions = expressions ?? new List<string>();
1554  this.new_values_maps = new_values_maps ?? new List<IDictionary<string, string>>();
1555  this.data = data ?? new List<T>();
1556  this.options = options ?? new Dictionary<string, string>();
1557  } // end constructor
1558 
1559  } // end class UpdateRecordsRequest
1560 
1561 
1562 
1567  {
1568 
1570  public long count_updated { get; set; }
1571 
1574  public IList<long> counts_updated { get; set; } = new List<long>();
1575 
1578  public long count_inserted { get; set; }
1579 
1583  public IList<long> counts_inserted { get; set; } = new List<long>();
1584 
1586  public IDictionary<string, string> info { get; set; } = new Dictionary<string, string>();
1587 
1588  } // end class UpdateRecordsResponse
1589 
1590 
1591 
1592 
1593 } // end namespace kinetica
IList< string > expressions
A list of the actual predicates, one for each update; format should follow the guidelines /filter...
IDictionary< string, string > info
Additional information.
const string GLOBAL_EXPRESSION
An optional global expression to reduce the search space of the predicates listed in expressions...
string record_encoding
Identifies which of and should be used.
const string TRUNCATE_STRINGS
If set to true, any strings which are too long for their charN string fields will be truncated to fit...
const string RECORD_ID
ID of a single record to be updated (returned in the call to Kinetica.insertRecords{T}(string,IList{T},IDictionary{string, string}) or Kinetica.getRecordsFromCollection{T}(string,long,long,IDictionary{string, string})).
A set of parameters for Kinetica.updateRecords{T}(string,IList{string},IList{IDictionary{string, string}},IList{T},IDictionary{string, string}).
A set of results returned by Kinetica.updateRecords{T}(string,IList{string},IList{IDictionary{string...
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
Specifies the record collision policy for tables with a primary key when updating columns of the prim...
long count_updated
Total number of records updated.
const string USE_EXPRESSIONS_IN_NEW_VALUES_MAPS
When set to true, all new values in new_values_maps are considered as expression values.
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.
const string UPDATE_PARTITION
Force qualifying records to be deleted and reinserted so their partition membership will be reevaluat...
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 true, all predicates are available for primary key updates.
RawUpdateRecordsRequest()
Constructs a RawUpdateRecordsRequest object with default parameters.