Kinetica   C#   API  Version 7.2.3.0
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 namespace kinetica
10 {
43  {
44 
45  private const string Schema_ = @"
46  {
47  ""type"": ""record"",
48  ""name"": ""RawUpdateRecordsRequest"",
49  ""namespace"": ""kinetica"",
50  ""fields"": [
51  { ""name"": ""table_name"", ""type"": ""string"" },
52  { ""name"": ""expressions"", ""type"": { ""type"": ""array"", ""items"": ""string"" } },
53  { ""name"": ""new_values_maps"", ""type"": { ""type"": ""array"", ""items"": { ""type"": ""map"", ""values"": [""string"", ""null""] } } },
54  { ""name"": ""records_to_insert"", ""type"": { ""type"": ""array"", ""items"": ""bytes"" } },
55  { ""name"": ""records_to_insert_str"", ""type"": { ""type"": ""array"", ""items"": ""string"" } },
56  { ""name"": ""record_encoding"", ""type"": ""string"" },
57  { ""name"": ""options"", ""type"": { ""type"": ""map"", ""values"": ""string"" } }
58  ]
59  }";
60 
66  public struct RecordEncoding
67  {
68  public const string BINARY = "binary";
69  public const string JSON = "json";
70  } // end struct RecordEncoding
71 
75  public struct Options
76  {
81  public const string GLOBAL_EXPRESSION = "global_expression";
82 
96  public const string BYPASS_SAFETY_CHECKS = "bypass_safety_checks";
97 
98  public const string TRUE = "true";
99  public const string FALSE = "false";
100 
123  public const string UPDATE_ON_EXISTING_PK = "update_on_existing_pk";
124 
148  public const string IGNORE_EXISTING_PK = "ignore_existing_pk";
149 
163  public const string UPDATE_PARTITION = "update_partition";
164 
179  public const string TRUNCATE_STRINGS = "truncate_strings";
180 
195  public const string USE_EXPRESSIONS_IN_NEW_VALUES_MAPS = "use_expressions_in_new_values_maps";
196 
203  public const string RECORD_ID = "record_id";
204  } // end struct Options
205 
212  public string table_name { get; set; }
213 
217  public IList<string> expressions { get; set; } = new List<string>();
218 
225  public IList<IDictionary<string, string>> new_values_maps { get; set; } = new List<IDictionary<string, string>>();
226 
233  public IList<byte[]> records_to_insert { get; set; } = new List<byte[]>();
234 
239  public IList<string> records_to_insert_str { get; set; } = new List<string>();
240 
254  public string record_encoding { get; set; } = RecordEncoding.BINARY;
255 
460  public IDictionary<string, string> options { get; set; } = new Dictionary<string, string>();
461 
465 
692  IList<string> expressions,
693  IList<IDictionary<string, string>> new_values_maps,
694  IList<byte[]> records_to_insert = null,
695  IDictionary<string, string> options = null)
696  {
697  this.table_name = table_name ?? "";
698  this.expressions = expressions ?? new List<string>();
699  this.new_values_maps = new_values_maps ?? new List<IDictionary<string, string>>();
700  this.records_to_insert = records_to_insert ?? new List<byte[]>();
701  this.records_to_insert_str = new List<string>();
703  this.options = options ?? new Dictionary<string, string>();
704  } // end constructor
705 
950  IList<string> expressions,
951  IList<IDictionary<string, string>> new_values_maps,
952  IList<byte[]> records_to_insert = null,
953  IList<string> records_to_insert_str = null,
954  string record_encoding = null,
955  IDictionary<string, string> options = null)
956  {
957  this.table_name = table_name ?? "";
958  this.expressions = expressions ?? new List<string>();
959  this.new_values_maps = new_values_maps ?? new List<IDictionary<string, string>>();
960  this.records_to_insert = records_to_insert ?? new List<byte[]>();
961  this.records_to_insert_str = records_to_insert_str ?? new List<string>();
963  this.options = options ?? new Dictionary<string, string>();
964  } // end full constructor
965  } // end class RawUpdateRecordsRequest
966 
1001  {
1005  public struct Options
1006  {
1011  public const string GLOBAL_EXPRESSION = "global_expression";
1012 
1026  public const string BYPASS_SAFETY_CHECKS = "bypass_safety_checks";
1027 
1028  public const string TRUE = "true";
1029  public const string FALSE = "false";
1030 
1053  public const string UPDATE_ON_EXISTING_PK = "update_on_existing_pk";
1054 
1078  public const string IGNORE_EXISTING_PK = "ignore_existing_pk";
1079 
1093  public const string UPDATE_PARTITION = "update_partition";
1094 
1109  public const string TRUNCATE_STRINGS = "truncate_strings";
1110 
1125  public const string USE_EXPRESSIONS_IN_NEW_VALUES_MAPS = "use_expressions_in_new_values_maps";
1126 
1133  public const string RECORD_ID = "record_id";
1134  } // end struct Options
1135 
1142  public string table_name { get; set; }
1143 
1147  public IList<string> expressions { get; set; } = new List<string>();
1148 
1155  public IList<IDictionary<string, string>> new_values_maps { get; set; } = new List<IDictionary<string, string>>();
1156 
1163  public IList<T> data { get; set; } = new List<T>();
1164 
1368  public IDictionary<string, string> options { get; set; } = new Dictionary<string, string>();
1369 
1373 
1599  IList<string> expressions,
1600  IList<IDictionary<string, string>> new_values_maps,
1601  IList<T> data = null,
1602  IDictionary<string, string> options = null)
1603  {
1604  this.table_name = table_name ?? "";
1605  this.expressions = expressions ?? new List<string>();
1606  this.new_values_maps = new_values_maps ?? new List<IDictionary<string, string>>();
1607  this.data = data ?? new List<T>();
1608  this.options = options ?? new Dictionary<string, string>();
1609  } // end constructor
1610  } // end class UpdateRecordsRequest
1611 
1616  {
1618  public long count_updated { get; set; }
1619 
1623  public IList<long> counts_updated { get; set; } = new List<long>();
1624 
1627  public long count_inserted { get; set; }
1628 
1632  public IList<long> counts_inserted { get; set; } = new List<long>();
1633 
1635  public IDictionary<string, string> info { get; set; } = new Dictionary<string, string>();
1636  } // end class UpdateRecordsResponse
1637 } // end namespace kinetica
IList< T > data
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.
A set of parameters for Kinetica.updateRecords.
IList< string > expressions
A list of the actual predicates, one for each update; format should follow the guidelines here.
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.
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 records_to_insert and records_to_insert_str should be used.
const string UPDATE_PARTITION
Force qualifying records to be deleted and reinserted so their partition membership will be reevaluat...
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.insertRecordsRaw or Kinetica....
A set of parameters for Kinetica.updateRecordsRaw.
IDictionary< string, string > options
Optional parameters.
A set of results returned by Kinetica.updateRecords.
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 BYPASS_SAFETY_CHECKS
When set to TRUE, all predicates are available for primary key updates.
UpdateRecordsRequest()
Constructs an UpdateRecordsRequest object with default parameters.
const string UPDATE_ON_EXISTING_PK
Specifies the record collision policy for updating a table with a primary key.
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.
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.
IList< IDictionary< string, string > > new_values_maps
List of new values for the matching records.
A set of string constants for the parameter record_encoding.
IList< long > counts_inserted
Total number of records inserted per predicate in expressions (will be either 0 or 1 for each express...
IList< long > counts_updated
Total number of records updated per predicate in expressions.
const string IGNORE_EXISTING_PK
Specifies the record collision error-suppression policy for updating a table with a primary key,...
IList< string > expressions
A list of the actual predicates, one for each update; format should follow the guidelines here.
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.
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.
A set of string constants for the parameter options.
const string UPDATE_PARTITION
Force qualifying records to be deleted and reinserted so their partition membership will be reevaluat...
const string RECORD_ID
ID of a single record to be updated (returned in the call to Kinetica.insertRecords or Kinetica....
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
const string TRUNCATE_STRINGS
If set to TRUE, any strings which are too long for their charN string fields will be truncated to fit...
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 USE_EXPRESSIONS_IN_NEW_VALUES_MAPS
When set to TRUE, all new values in new_values_maps are considered as expression values.
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.
A set of string constants for the parameter options.
IList< IDictionary< string, string > > new_values_maps
List of new values for the matching records.