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 
115  public const string PK_CONFLICT_PREDICATE_HIGHER = "pk_conflict_predicate_higher";
116 
120  public const string PK_CONFLICT_PREDICATE_LOWER = "pk_conflict_predicate_lower";
121 
135  public const string RETURN_RECORD_IDS = "return_record_ids";
136 
151  public const string TRUNCATE_STRINGS = "truncate_strings";
152 
167  public const string RETURN_INDIVIDUAL_ERRORS = "return_individual_errors";
168 
183  public const string ALLOW_PARTIAL_BATCH = "allow_partial_batch";
184 
198  public const string DRY_RUN = "dry_run";
199  } // end struct Options
200 
206  public string table_name { get; set; }
207 
213  public IList<byte[]> list { get; set; } = new List<byte[]>();
214 
220  public IList<string> list_str { get; set; } = new List<string>();
221 
234  public string list_encoding { get; set; } = ListEncoding.BINARY;
235 
435  public IDictionary<string, string> options { get; set; } = new Dictionary<string, string>();
436 
440 
653  IList<byte[]> list,
654  IDictionary<string, string> options = null)
655  {
656  this.table_name = table_name ?? "";
657  this.list = list ?? new List<byte[]>();
658  this.list_str = new List<string>();
660  this.options = options ?? new Dictionary<string, string>();
661  } // end constructor
662 
892  IList<byte[]> list,
893  IList<string> list_str,
894  string list_encoding = null,
895  IDictionary<string, string> options = null)
896  {
897  this.table_name = table_name ?? "";
898  this.list = list ?? new List<byte[]>();
899  this.list_str = list_str ?? new List<string>();
901  this.options = options ?? new Dictionary<string, string>();
902  } // end full constructor
903  } // end class RawInsertRecordsRequest
904 
927  {
931  public struct Options
932  {
952  public const string UPDATE_ON_EXISTING_PK = "update_on_existing_pk";
953 
954  public const string TRUE = "true";
955  public const string FALSE = "false";
956 
981  public const string IGNORE_EXISTING_PK = "ignore_existing_pk";
982 
986  public const string PK_CONFLICT_PREDICATE_HIGHER = "pk_conflict_predicate_higher";
987 
991  public const string PK_CONFLICT_PREDICATE_LOWER = "pk_conflict_predicate_lower";
992 
1006  public const string RETURN_RECORD_IDS = "return_record_ids";
1007 
1022  public const string TRUNCATE_STRINGS = "truncate_strings";
1023 
1038  public const string RETURN_INDIVIDUAL_ERRORS = "return_individual_errors";
1039 
1054  public const string ALLOW_PARTIAL_BATCH = "allow_partial_batch";
1055 
1069  public const string DRY_RUN = "dry_run";
1070  } // end struct Options
1071 
1077  public string table_name { get; set; }
1078 
1084  public IList<T> data { get; set; } = new List<T>();
1085 
1285  public IDictionary<string, string> options { get; set; } = new Dictionary<string, string>();
1286 
1290 
1502  IList<T> data,
1503  IDictionary<string, string> options = null)
1504  {
1505  this.table_name = table_name ?? "";
1506  this.data = data ?? new List<T>();
1507  this.options = options ?? new Dictionary<string, string>();
1508  } // end constructor
1509  } // end class InsertRecordsRequest
1510 
1515  {
1519  public struct Info
1520  {
1524  public const string BAD_RECORD_INDICES = "bad_record_indices";
1525 
1528  public const string ERROR_N = "error_N";
1529  } // end struct Info
1530 
1533  public IList<string> record_ids { get; set; } = new List<string>();
1534 
1536  public int count_inserted { get; set; }
1537 
1539  public int count_updated { get; set; }
1540 
1557  public IDictionary<string, string> info { get; set; } = new Dictionary<string, string>();
1558  } // end class InsertRecordsResponse
1559 } // 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.
const string PK_CONFLICT_PREDICATE_HIGHER
The record with higher value for the column resolves the primary-key insert conflict.
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 PK_CONFLICT_PREDICATE_HIGHER
The record with higher value for the column resolves the primary-key insert conflict.
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 PK_CONFLICT_PREDICATE_LOWER
The record with lower value for the column resolves the primary-key insert conflict.
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.
const string PK_CONFLICT_PREDICATE_LOWER
The record with lower value for the column resolves the primary-key insert conflict.
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...