Kinetica   C#   API  Version 7.2.3.1
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 
65  public struct RecordEncoding
66  {
67  public const string BINARY = "binary";
68  public const string JSON = "json";
69  } // end struct RecordEncoding
70 
74  public struct Options
75  {
79  public const string GLOBAL_EXPRESSION = "global_expression";
80 
94  public const string BYPASS_SAFETY_CHECKS = "bypass_safety_checks";
95 
96  public const string TRUE = "true";
97  public const string FALSE = "false";
98 
121  public const string UPDATE_ON_EXISTING_PK = "update_on_existing_pk";
122 
145  public const string IGNORE_EXISTING_PK = "ignore_existing_pk";
146 
160  public const string UPDATE_PARTITION = "update_partition";
161 
176  public const string TRUNCATE_STRINGS = "truncate_strings";
177 
192  public const string USE_EXPRESSIONS_IN_NEW_VALUES_MAPS = "use_expressions_in_new_values_maps";
193 
200  public const string RECORD_ID = "record_id";
201  } // end struct Options
202 
209  public string table_name { get; set; }
210 
214  public IList<string> expressions { get; set; } = new List<string>();
215 
221  public IList<IDictionary<string, string>> new_values_maps { get; set; } = new List<IDictionary<string, string>>();
222 
229  public IList<byte[]> records_to_insert { get; set; } = new List<byte[]>();
230 
235  public IList<string> records_to_insert_str { get; set; } = new List<string>();
236 
250  public string record_encoding { get; set; } = RecordEncoding.BINARY;
251 
446  public IDictionary<string, string> options { get; set; } = new Dictionary<string, string>();
447 
451 
668  IList<string> expressions,
669  IList<IDictionary<string, string>> new_values_maps,
670  IList<byte[]> records_to_insert = null,
671  IDictionary<string, string> options = null)
672  {
673  this.table_name = table_name ?? "";
674  this.expressions = expressions ?? new List<string>();
675  this.new_values_maps = new_values_maps ?? new List<IDictionary<string, string>>();
676  this.records_to_insert = records_to_insert ?? new List<byte[]>();
677  this.records_to_insert_str = new List<string>();
679  this.options = options ?? new Dictionary<string, string>();
680  } // end constructor
681 
916  IList<string> expressions,
917  IList<IDictionary<string, string>> new_values_maps,
918  IList<byte[]> records_to_insert = null,
919  IList<string> records_to_insert_str = null,
920  string record_encoding = null,
921  IDictionary<string, string> options = null)
922  {
923  this.table_name = table_name ?? "";
924  this.expressions = expressions ?? new List<string>();
925  this.new_values_maps = new_values_maps ?? new List<IDictionary<string, string>>();
926  this.records_to_insert = records_to_insert ?? new List<byte[]>();
927  this.records_to_insert_str = records_to_insert_str ?? new List<string>();
929  this.options = options ?? new Dictionary<string, string>();
930  } // end full constructor
931 } // end class RawUpdateRecordsRequest
932 
967 {
971  public struct Options
972  {
976  public const string GLOBAL_EXPRESSION = "global_expression";
977 
991  public const string BYPASS_SAFETY_CHECKS = "bypass_safety_checks";
992 
993  public const string TRUE = "true";
994  public const string FALSE = "false";
995 
1018  public const string UPDATE_ON_EXISTING_PK = "update_on_existing_pk";
1019 
1042  public const string IGNORE_EXISTING_PK = "ignore_existing_pk";
1043 
1057  public const string UPDATE_PARTITION = "update_partition";
1058 
1073  public const string TRUNCATE_STRINGS = "truncate_strings";
1074 
1089  public const string USE_EXPRESSIONS_IN_NEW_VALUES_MAPS = "use_expressions_in_new_values_maps";
1090 
1097  public const string RECORD_ID = "record_id";
1098  } // end struct Options
1099 
1106  public string table_name { get; set; }
1107 
1111  public IList<string> expressions { get; set; } = new List<string>();
1112 
1118  public IList<IDictionary<string, string>> new_values_maps { get; set; } = new List<IDictionary<string, string>>();
1119 
1126  public IList<T> data { get; set; } = new List<T>();
1127 
1321  public IDictionary<string, string> options { get; set; } = new Dictionary<string, string>();
1322 
1326 
1542  IList<string> expressions,
1543  IList<IDictionary<string, string>> new_values_maps,
1544  IList<T> data = null,
1545  IDictionary<string, string> options = null)
1546  {
1547  this.table_name = table_name ?? "";
1548  this.expressions = expressions ?? new List<string>();
1549  this.new_values_maps = new_values_maps ?? new List<IDictionary<string, string>>();
1550  this.data = data ?? new List<T>();
1551  this.options = options ?? new Dictionary<string, string>();
1552  } // end constructor
1553 } // end class UpdateRecordsRequest
1554 
1559 {
1561  public long count_updated { get; set; }
1562 
1565  public IList<long> counts_updated { get; set; } = new List<long>();
1566 
1569  public long count_inserted { get; set; }
1570 
1574  public IList<long> counts_inserted { get; set; } = new List<long>();
1575 
1577  public IDictionary<string, string> info { get; set; } = new Dictionary<string, string>();
1578 } // end class UpdateRecordsResponse
IList< long > counts_updated
Total number of records updated per predicate in expressions.
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 > 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,...
IDictionary< string, string > options
Optional parameters.
IList< string > expressions
A list of the actual predicates, one for each update; format should follow the guidelines here.
A set of string constants for the parameter options.
KineticaData - class to help with Avro Encoding for Kinetica
Definition: KineticaData.cs:14
A set of parameters for Kinetica.updateRecords.
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.
const string TRUNCATE_STRINGS
If set to TRUE, any strings which are too long for their charN string fields will be truncated to fit...
IDictionary< string, string > options
Optional parameters.
IList< byte[]> records_to_insert
An optional list of new binary-avro encoded records to insert, one for each update.
A set of string constants for the parameter options.
IList< IDictionary< string, string > > new_values_maps
List of new values for the matching records.
const string UPDATE_PARTITION
Force qualifying records to be deleted and reinserted so their partition membership will be reevaluat...
A set of results returned by Kinetica.updateRecords.
const string GLOBAL_EXPRESSION
An optional global expression to reduce the search space of the predicates listed in expressions.
string table_name
Name of table to be updated, in [schema_name.
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.
UpdateRecordsRequest()
Constructs an UpdateRecordsRequest object with default parameters.
const string RECORD_ID
ID of a single record to be updated (returned in the call to Kinetica.insertRecords or Kinetica....
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.
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 USE_EXPRESSIONS_IN_NEW_VALUES_MAPS
When set to TRUE, all new values in new_values_maps are considered as expression values.
const string RECORD_ID
ID of a single record to be updated (returned in the call to Kinetica.insertRecordsRaw or Kinetica....
RawUpdateRecordsRequest()
Constructs a RawUpdateRecordsRequest object with default parameters.
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< 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 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.
IDictionary< string, string > info
Additional information.
const string BYPASS_SAFETY_CHECKS
When set to TRUE, all predicates are available for primary key updates.
IList< IDictionary< string, string > > new_values_maps
List of new values for the matching records.
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.
A set of parameters for Kinetica.updateRecordsRaw.
const string BYPASS_SAFETY_CHECKS
When set to TRUE, all predicates are available for primary key updates.
long count_inserted
Total number of records inserted (due to expressions not matching any existing records).
const string GLOBAL_EXPRESSION
An optional global expression to reduce the search space of the predicates listed in expressions.
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.