Kinetica   C#   API  Version 7.2.3.1
InsertRecords.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 
30 {
31 
32  private const string Schema_ = @"
33  {
34  ""type"": ""record"",
35  ""name"": ""RawInsertRecordsRequest"",
36  ""namespace"": ""kinetica"",
37  ""fields"": [
38  { ""name"": ""table_name"", ""type"": ""string"" },
39  { ""name"": ""list"", ""type"": { ""type"": ""array"", ""items"": ""bytes"" } },
40  { ""name"": ""list_str"", ""type"": { ""type"": ""array"", ""items"": ""string"" } },
41  { ""name"": ""list_encoding"", ""type"": ""string"" },
42  { ""name"": ""options"", ""type"": { ""type"": ""map"", ""values"": ""string"" } }
43  ]
44  }";
45 
50  public struct ListEncoding
51  {
52  public const string BINARY = "binary";
53  public const string JSON = "json";
54  } // end struct ListEncoding
55 
59  public struct Options
60  {
79  public const string UPDATE_ON_EXISTING_PK = "update_on_existing_pk";
80 
81  public const string TRUE = "true";
82  public const string FALSE = "false";
83 
107  public const string IGNORE_EXISTING_PK = "ignore_existing_pk";
108 
112  public const string PK_CONFLICT_PREDICATE_HIGHER = "pk_conflict_predicate_higher";
113 
117  public const string PK_CONFLICT_PREDICATE_LOWER = "pk_conflict_predicate_lower";
118 
132  public const string RETURN_RECORD_IDS = "return_record_ids";
133 
148  public const string TRUNCATE_STRINGS = "truncate_strings";
149 
164  public const string RETURN_INDIVIDUAL_ERRORS = "return_individual_errors";
165 
180  public const string ALLOW_PARTIAL_BATCH = "allow_partial_batch";
181 
195  public const string DRY_RUN = "dry_run";
196  } // end struct Options
197 
203  public string table_name { get; set; }
204 
210  public IList<byte[]> list { get; set; } = new List<byte[]>();
211 
217  public IList<string> list_str { get; set; } = new List<string>();
218 
231  public string list_encoding { get; set; } = ListEncoding.BINARY;
232 
430  public IDictionary<string, string> options { get; set; } = new Dictionary<string, string>();
431 
435 
646  IList<byte[]> list,
647  IDictionary<string, string> options = null)
648  {
649  this.table_name = table_name ?? "";
650  this.list = list ?? new List<byte[]>();
651  this.list_str = new List<string>();
653  this.options = options ?? new Dictionary<string, string>();
654  } // end constructor
655 
882  IList<byte[]> list,
883  IList<string> list_str,
884  string list_encoding = null,
885  IDictionary<string, string> options = null)
886  {
887  this.table_name = table_name ?? "";
888  this.list = list ?? new List<byte[]>();
889  this.list_str = list_str ?? new List<string>();
891  this.options = options ?? new Dictionary<string, string>();
892  } // end full constructor
893 } // end class RawInsertRecordsRequest
894 
916 {
920  public struct Options
921  {
940  public const string UPDATE_ON_EXISTING_PK = "update_on_existing_pk";
941 
942  public const string TRUE = "true";
943  public const string FALSE = "false";
944 
968  public const string IGNORE_EXISTING_PK = "ignore_existing_pk";
969 
973  public const string PK_CONFLICT_PREDICATE_HIGHER = "pk_conflict_predicate_higher";
974 
978  public const string PK_CONFLICT_PREDICATE_LOWER = "pk_conflict_predicate_lower";
979 
993  public const string RETURN_RECORD_IDS = "return_record_ids";
994 
1009  public const string TRUNCATE_STRINGS = "truncate_strings";
1010 
1025  public const string RETURN_INDIVIDUAL_ERRORS = "return_individual_errors";
1026 
1041  public const string ALLOW_PARTIAL_BATCH = "allow_partial_batch";
1042 
1056  public const string DRY_RUN = "dry_run";
1057  } // end struct Options
1058 
1064  public string table_name { get; set; }
1065 
1071  public IList<T> data { get; set; } = new List<T>();
1072 
1270  public IDictionary<string, string> options { get; set; } = new Dictionary<string, string>();
1271 
1275 
1485  IList<T> data,
1486  IDictionary<string, string> options = null)
1487  {
1488  this.table_name = table_name ?? "";
1489  this.data = data ?? new List<T>();
1490  this.options = options ?? new Dictionary<string, string>();
1491  } // end constructor
1492 } // end class InsertRecordsRequest
1493 
1498 {
1502  public struct Info
1503  {
1507  public const string BAD_RECORD_INDICES = "bad_record_indices";
1508 
1510  public const string ERROR_N = "error_N";
1511  } // end struct Info
1512 
1515  public IList<string> record_ids { get; set; } = new List<string>();
1516 
1518  public int count_inserted { get; set; }
1519 
1521  public int count_updated { get; set; }
1522 
1538  public IDictionary<string, string> info { get; set; } = new Dictionary<string, string>();
1539 } // end class InsertRecordsResponse
const string TRUNCATE_STRINGS
If set to TRUE, any strings which are too long for their target charN string columns will be truncate...
string table_name
Name of table to which the records are to be added, in [schema_name.
const string ALLOW_PARTIAL_BATCH
If set to TRUE, all correct records will be inserted and incorrect records will be rejected and repor...
A set of string constants for the parameter options.
InsertRecordsRequest(string table_name, IList< T > data, IDictionary< string, string > options=null)
Constructs an InsertRecordsRequest object with the specified parameters.
A set of parameters for Kinetica.insertRecordsRaw.
IList< byte[]> list
An array of binary-encoded data for the records to be added.
const string ALLOW_PARTIAL_BATCH
If set to TRUE, all correct records will be inserted and incorrect records will be rejected and repor...
int count_inserted
The number of records inserted.
KineticaData - class to help with Avro Encoding for Kinetica
Definition: KineticaData.cs:14
const string PK_CONFLICT_PREDICATE_HIGHER
The record with higher value for the column resolves the primary-key insert conflict.
RawInsertRecordsRequest(string table_name, IList< byte[]> list, IDictionary< string, string > options=null)
Constructs a RawInsertRecordsRequest object with the specified parameters.
const string UPDATE_ON_EXISTING_PK
Specifies the record collision policy for inserting into a table with a primary key.
A set of results returned by Kinetica.insertRecords.
RawInsertRecordsRequest(string table_name, IList< byte[]> list, IList< string > list_str, string list_encoding=null, IDictionary< string, string > options=null)
Constructs a RawInsertRecordsRequest object with the specified parameters.
const string PK_CONFLICT_PREDICATE_LOWER
The record with lower value for the column resolves the primary-key insert conflict.
A set of string constants for the parameter list_encoding.
IDictionary< string, string > options
Optional parameters.
const string IGNORE_EXISTING_PK
Specifies the record collision error-suppression policy for inserting into a table with a primary key...
const string IGNORE_EXISTING_PK
Specifies the record collision error-suppression policy for inserting into a table with a primary key...
A set of parameters for Kinetica.insertRecords.
RawInsertRecordsRequest()
Constructs a RawInsertRecordsRequest object with default parameters.
const string RETURN_INDIVIDUAL_ERRORS
If set to TRUE, success will always be returned, and any errors found will be included in the info ma...
IList< string > list_str
An array of JSON encoded data for the records to be added.
int count_updated
The number of records updated.
string table_name
Name of table to which the records are to be added, in [schema_name.
const string PK_CONFLICT_PREDICATE_LOWER
The record with lower value for the column resolves the primary-key insert conflict.
IList< T > data
An array of binary-encoded data for the records to be added.
const string PK_CONFLICT_PREDICATE_HIGHER
The record with higher value for the column resolves the primary-key insert conflict.
const string RETURN_RECORD_IDS
If TRUE then return the internal record id along for each inserted record.
InsertRecordsRequest()
Constructs an InsertRecordsRequest object with default parameters.
A set of string constants for the parameter options.
const string BAD_RECORD_INDICES
If return_individual_errors option is specified or implied, returns a comma-separated list of invalid...
string list_encoding
The encoding of the records to be inserted.
const string ERROR_N
Error message for record at index N (0-based).
const string UPDATE_ON_EXISTING_PK
Specifies the record collision policy for inserting into a table with a primary key.
A set of string constants for the parameter info.
const string TRUNCATE_STRINGS
If set to TRUE, any strings which are too long for their target charN string columns will be truncate...
IDictionary< string, string > info
Additional information.
IList< string > record_ids
An array containing the IDs with which the added records are identified internally.
const string RETURN_INDIVIDUAL_ERRORS
If set to TRUE, success will always be returned, and any errors found will be included in the info ma...
const string DRY_RUN
If set to TRUE, no data will be saved and any errors will be returned.
IDictionary< string, string > options
Optional parameters.
const string DRY_RUN
If set to TRUE, no data will be saved and any errors will be returned.
const string RETURN_RECORD_IDS
If TRUE then return the internal record id along for each inserted record.