Kinetica C# API  Version 7.1.10.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 
60  {
61 
81  public struct RecordEncoding
82  {
83  public const string BINARY = "binary";
84  public const string JSON = "json";
85  } // end struct RecordEncoding
86 
87 
301  public struct Options
302  {
303 
307  public const string GLOBAL_EXPRESSION = "global_expression";
308 
331  public const string BYPASS_SAFETY_CHECKS = "bypass_safety_checks";
332  public const string TRUE = "true";
333  public const string FALSE = "false";
334 
396  public const string UPDATE_ON_EXISTING_PK = "update_on_existing_pk";
397 
432  public const string IGNORE_EXISTING_PK = "ignore_existing_pk";
433 
449  public const string UPDATE_PARTITION = "update_partition";
450 
466  public const string TRUNCATE_STRINGS = "truncate_strings";
467 
489  public const string USE_EXPRESSIONS_IN_NEW_VALUES_MAPS = "use_expressions_in_new_values_maps";
490 
497  public const string RECORD_ID = "record_id";
498  } // end struct Options
499 
500 
506  public string table_name { get; set; }
507 
510  public IList<string> expressions { get; set; } = new List<string>();
511 
519  public IList<IDictionary<string, string>> new_values_maps { get; set; } = new List<IDictionary<string, string>>();
520 
528  public IList<byte[]> records_to_insert { get; set; } = new List<byte[]>();
529 
533  public IList<string> records_to_insert_str { get; set; } = new List<string>();
534 
553  public string record_encoding { get; set; } = RecordEncoding.BINARY;
554 
766  public IDictionary<string, string> options { get; set; } = new Dictionary<string, string>();
767 
768 
772 
1006  IList<string> expressions,
1007  IList<IDictionary<string, string>> new_values_maps,
1008  IList<byte[]> records_to_insert = null,
1009  IDictionary<string, string> options = null)
1010  {
1011  this.table_name = table_name ?? "";
1012  this.expressions = expressions ?? new List<string>();
1013  this.new_values_maps = new_values_maps ?? new List<IDictionary<string, string>>();
1014  this.records_to_insert = records_to_insert ?? new List<byte[]>();
1015  this.records_to_insert_str = new List<string>();
1016  this.record_encoding = RecordEncoding.BINARY;
1017  this.options = options ?? new Dictionary<string, string>();
1018  } // end constructor
1019 
1020 
1276  IList<string> expressions,
1277  IList<IDictionary<string, string>> new_values_maps,
1278  IList<byte[]> records_to_insert = null,
1279  IList<string> records_to_insert_str = null,
1280  string record_encoding = null,
1281  IDictionary<string, string> options = null)
1282  {
1283  this.table_name = table_name ?? "";
1284  this.expressions = expressions ?? new List<string>();
1285  this.new_values_maps = new_values_maps ?? new List<IDictionary<string, string>>();
1286  this.records_to_insert = records_to_insert ?? new List<byte[]>();
1287  this.records_to_insert_str = records_to_insert_str ?? new List<string>();
1288  this.record_encoding = record_encoding ?? RecordEncoding.BINARY;
1289  this.options = options ?? new Dictionary<string, string>();
1290  } // end full constructor
1291 
1292  } // end class RawUpdateRecordsRequest
1293 
1294 
1295 
1344  public class UpdateRecordsRequest<T> : KineticaData
1345  {
1346 
1560  public struct Options
1561  {
1562 
1566  public const string GLOBAL_EXPRESSION = "global_expression";
1567 
1590  public const string BYPASS_SAFETY_CHECKS = "bypass_safety_checks";
1591  public const string TRUE = "true";
1592  public const string FALSE = "false";
1593 
1655  public const string UPDATE_ON_EXISTING_PK = "update_on_existing_pk";
1656 
1691  public const string IGNORE_EXISTING_PK = "ignore_existing_pk";
1692 
1708  public const string UPDATE_PARTITION = "update_partition";
1709 
1725  public const string TRUNCATE_STRINGS = "truncate_strings";
1726 
1748  public const string USE_EXPRESSIONS_IN_NEW_VALUES_MAPS = "use_expressions_in_new_values_maps";
1749 
1756  public const string RECORD_ID = "record_id";
1757  } // end struct Options
1758 
1759 
1765  public string table_name { get; set; }
1766 
1769  public IList<string> expressions { get; set; } = new List<string>();
1770 
1778  public IList<IDictionary<string, string>> new_values_maps { get; set; } = new List<IDictionary<string, string>>();
1779 
1787  public IList<T> data { get; set; } = new List<T>();
1788 
2000  public IDictionary<string, string> options { get; set; } = new Dictionary<string, string>();
2001 
2002 
2006 
2239  public UpdateRecordsRequest( string table_name,
2240  IList<string> expressions,
2241  IList<IDictionary<string, string>> new_values_maps,
2242  IList<T> data = null,
2243  IDictionary<string, string> options = null)
2244  {
2245  this.table_name = table_name ?? "";
2246  this.expressions = expressions ?? new List<string>();
2247  this.new_values_maps = new_values_maps ?? new List<IDictionary<string, string>>();
2248  this.data = data ?? new List<T>();
2249  this.options = options ?? new Dictionary<string, string>();
2250  } // end constructor
2251 
2252  } // end class UpdateRecordsRequest
2253 
2254 
2255 
2260  {
2261 
2263  public long count_updated { get; set; }
2264 
2267  public IList<long> counts_updated { get; set; } = new List<long>();
2268 
2271  public long count_inserted { get; set; }
2272 
2276  public IList<long> counts_inserted { get; set; } = new List<long>();
2277 
2279  public IDictionary<string, string> info { get; set; } = new Dictionary<string, string>();
2280 
2281  } // end class UpdateRecordsResponse
2282 
2283 
2284 
2285 
2286 } // 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 updating a table with a primary key.
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 .
const string IGNORE_EXISTING_PK
Specifies the record collision error-suppression policy for updating a table with a primary key...
string table_name
Name of table to be updated, in [schema_name.
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 JSON encoded objects to insert, one for each update, to be added if the particula...
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.