Kinetica   C#   API  Version 7.2.3.0
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 {
31  {
32 
33  private const string Schema_ = @"
34  {
35  ""type"": ""record"",
36  ""name"": ""RawInsertRecordsRequest"",
37  ""namespace"": ""kinetica"",
38  ""fields"": [
39  { ""name"": ""table_name"", ""type"": ""string"" },
40  { ""name"": ""list"", ""type"": { ""type"": ""array"", ""items"": ""bytes"" } },
41  { ""name"": ""list_str"", ""type"": { ""type"": ""array"", ""items"": ""string"" } },
42  { ""name"": ""list_encoding"", ""type"": ""string"" },
43  { ""name"": ""options"", ""type"": { ""type"": ""map"", ""values"": ""string"" } }
44  ]
45  }";
46 
51  public struct ListEncoding
52  {
53  public const string BINARY = "binary";
54  public const string JSON = "json";
55  } // end struct ListEncoding
56 
60  public struct Options
61  {
81  public const string UPDATE_ON_EXISTING_PK = "update_on_existing_pk";
82 
83  public const string TRUE = "true";
84  public const string FALSE = "false";
85 
110  public const string IGNORE_EXISTING_PK = "ignore_existing_pk";
111 
125  public const string RETURN_RECORD_IDS = "return_record_ids";
126 
141  public const string TRUNCATE_STRINGS = "truncate_strings";
142 
157  public const string RETURN_INDIVIDUAL_ERRORS = "return_individual_errors";
158 
173  public const string ALLOW_PARTIAL_BATCH = "allow_partial_batch";
174 
188  public const string DRY_RUN = "dry_run";
189  } // end struct Options
190 
196  public string table_name { get; set; }
197 
203  public IList<byte[]> list { get; set; } = new List<byte[]>();
204 
210  public IList<string> list_str { get; set; } = new List<string>();
211 
224  public string list_encoding { get; set; } = ListEncoding.BINARY;
225 
409  public IDictionary<string, string> options { get; set; } = new Dictionary<string, string>();
410 
414 
611  IList<byte[]> list,
612  IDictionary<string, string> options = null)
613  {
614  this.table_name = table_name ?? "";
615  this.list = list ?? new List<byte[]>();
616  this.list_str = new List<string>();
618  this.options = options ?? new Dictionary<string, string>();
619  } // end constructor
620 
834  IList<byte[]> list,
835  IList<string> list_str,
836  string list_encoding = null,
837  IDictionary<string, string> options = null)
838  {
839  this.table_name = table_name ?? "";
840  this.list = list ?? new List<byte[]>();
841  this.list_str = list_str ?? new List<string>();
843  this.options = options ?? new Dictionary<string, string>();
844  } // end full constructor
845  } // end class RawInsertRecordsRequest
846 
869  {
873  public struct Options
874  {
894  public const string UPDATE_ON_EXISTING_PK = "update_on_existing_pk";
895 
896  public const string TRUE = "true";
897  public const string FALSE = "false";
898 
923  public const string IGNORE_EXISTING_PK = "ignore_existing_pk";
924 
938  public const string RETURN_RECORD_IDS = "return_record_ids";
939 
954  public const string TRUNCATE_STRINGS = "truncate_strings";
955 
970  public const string RETURN_INDIVIDUAL_ERRORS = "return_individual_errors";
971 
986  public const string ALLOW_PARTIAL_BATCH = "allow_partial_batch";
987 
1001  public const string DRY_RUN = "dry_run";
1002  } // end struct Options
1003 
1009  public string table_name { get; set; }
1010 
1016  public IList<T> data { get; set; } = new List<T>();
1017 
1201  public IDictionary<string, string> options { get; set; } = new Dictionary<string, string>();
1202 
1206 
1402  IList<T> data,
1403  IDictionary<string, string> options = null)
1404  {
1405  this.table_name = table_name ?? "";
1406  this.data = data ?? new List<T>();
1407  this.options = options ?? new Dictionary<string, string>();
1408  } // end constructor
1409  } // end class InsertRecordsRequest
1410 
1415  {
1419  public struct Info
1420  {
1424  public const string BAD_RECORD_INDICES = "bad_record_indices";
1425 
1428  public const string ERROR_N = "error_N";
1429  } // end struct Info
1430 
1433  public IList<string> record_ids { get; set; } = new List<string>();
1434 
1436  public int count_inserted { get; set; }
1437 
1439  public int count_updated { get; set; }
1440 
1457  public IDictionary<string, string> info { get; set; } = new Dictionary<string, string>();
1458  } // end class InsertRecordsResponse
1459 } // end namespace kinetica
int count_inserted
The number of records inserted.
const string IGNORE_EXISTING_PK
Specifies the record collision error-suppression policy for inserting into a table with a primary key...
const string UPDATE_ON_EXISTING_PK
Specifies the record collision policy for inserting into a table with a primary key.
IList< string > list_str
An array of JSON encoded data for the records to be added.
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...
RawInsertRecordsRequest(string table_name, IList< byte[]> list, IDictionary< string, string > options=null)
Constructs a RawInsertRecordsRequest object with the specified parameters.
IList< string > record_ids
An array containing the IDs with which the added records are identified internally.
IList< byte[]> list
An array of binary-encoded data for the records to be added.
A set of string constants for the parameter info.
const string IGNORE_EXISTING_PK
Specifies the record collision error-suppression policy for inserting into a table with a primary key...
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.
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 DRY_RUN
If set to TRUE, no data will be saved and any errors will be returned.
const string UPDATE_ON_EXISTING_PK
Specifies the record collision policy for inserting into a table with a primary key.
const string TRUNCATE_STRINGS
If set to TRUE, any strings which are too long for their target charN string columns will be truncate...
const string DRY_RUN
If set to TRUE, no data will be saved and any errors will be returned.
InsertRecordsRequest()
Constructs an InsertRecordsRequest object with default parameters.
IDictionary< string, string > options
Optional parameters.
RawInsertRecordsRequest()
Constructs a RawInsertRecordsRequest object with default parameters.
const string ALLOW_PARTIAL_BATCH
If set to TRUE, all correct records will be inserted and incorrect records will be rejected and repor...
string list_encoding
The encoding of the records to be inserted.
InsertRecordsRequest(string table_name, IList< T > data, IDictionary< string, string > options=null)
Constructs an InsertRecordsRequest object with the specified parameters.
A set of string constants for the parameter options.
IDictionary< string, string > options
Optional parameters.
A set of string constants for the parameter list_encoding.
A set of parameters for Kinetica.insertRecords.
const string RETURN_RECORD_IDS
If TRUE then return the internal record id along for each inserted record.
const string BAD_RECORD_INDICES
If return_individual_errors option is specified or implied, returns a comma-separated list of invalid...
const string ERROR_N
Error message for record at index N (0-based)
A set of parameters for Kinetica.insertRecordsRaw.
const string TRUNCATE_STRINGS
If set to TRUE, any strings which are too long for their target charN string columns will be truncate...
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 RETURN_RECORD_IDS
If TRUE then return the internal record id along for each inserted record.
IDictionary< string, string > info
Additional information.
A set of results returned by Kinetica.insertRecords.
KineticaData - class to help with Avro Encoding for Kinetica
Definition: KineticaData.cs:14
IList< T > data
An array of binary-encoded data for the records to be added.
A set of string constants for the parameter options.
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...