Kinetica C# API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Pages
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 
10 
11 namespace kinetica
12 {
13 
41  {
42 
59  public struct ListEncoding
60  {
61  public const string BINARY = "binary";
62  public const string JSON = "json";
63  } // end struct ListEncoding
64 
65 
251  public struct Options
252  {
253 
287  public const string UPDATE_ON_EXISTING_PK = "update_on_existing_pk";
288  public const string TRUE = "true";
289  public const string FALSE = "false";
290 
329  public const string IGNORE_EXISTING_PK = "ignore_existing_pk";
330 
346  public const string RETURN_RECORD_IDS = "return_record_ids";
347 
363  public const string TRUNCATE_STRINGS = "truncate_strings";
364 
384  public const string RETURN_INDIVIDUAL_ERRORS = "return_individual_errors";
385 
403  public const string ALLOW_PARTIAL_BATCH = "allow_partial_batch";
404 
420  public const string DRY_RUN = "dry_run";
421  } // end struct Options
422 
423 
429  public string table_name { get; set; }
430 
436  public IList<byte[]> list { get; set; } = new List<byte[]>();
437 
442  public IList<string> list_str { get; set; } = new List<string>();
443 
459  public string list_encoding { get; set; } = ListEncoding.BINARY;
460 
644  public IDictionary<string, string> options { get; set; } = new Dictionary<string, string>();
645 
646 
650 
849  IList<byte[]> list,
850  IDictionary<string, string> options = null)
851  {
852  this.table_name = table_name ?? "";
853  this.list = list ?? new List<byte[]>();
854  this.list_str = new List<string>();
855  this.list_encoding = ListEncoding.BINARY;
856  this.options = options ?? new Dictionary<string, string>();
857  } // end constructor
858 
859 
1079  IList<byte[]> list,
1080  IList<string> list_str,
1081  string list_encoding = null,
1082  IDictionary<string, string> options = null)
1083  {
1084  this.table_name = table_name ?? "";
1085  this.list = list ?? new List<byte[]>();
1086  this.list_str = list_str ?? new List<string>();
1087  this.list_encoding = list_encoding ?? ListEncoding.BINARY;
1088  this.options = options ?? new Dictionary<string, string>();
1089  } // end full constructor
1090 
1091  } // end class RawInsertRecordsRequest
1092 
1093 
1094 
1124  public class InsertRecordsRequest<T> : KineticaData
1125  {
1126 
1312  public struct Options
1313  {
1314 
1348  public const string UPDATE_ON_EXISTING_PK = "update_on_existing_pk";
1349  public const string TRUE = "true";
1350  public const string FALSE = "false";
1351 
1390  public const string IGNORE_EXISTING_PK = "ignore_existing_pk";
1391 
1407  public const string RETURN_RECORD_IDS = "return_record_ids";
1408 
1424  public const string TRUNCATE_STRINGS = "truncate_strings";
1425 
1445  public const string RETURN_INDIVIDUAL_ERRORS = "return_individual_errors";
1446 
1464  public const string ALLOW_PARTIAL_BATCH = "allow_partial_batch";
1465 
1481  public const string DRY_RUN = "dry_run";
1482  } // end struct Options
1483 
1484 
1490  public string table_name { get; set; }
1491 
1497  public IList<T> data { get; set; } = new List<T>();
1498 
1682  public IDictionary<string, string> options { get; set; } = new Dictionary<string, string>();
1683 
1684 
1688 
1886  public InsertRecordsRequest( string table_name,
1887  IList<T> data,
1888  IDictionary<string, string> options = null)
1889  {
1890  this.table_name = table_name ?? "";
1891  this.data = data ?? new List<T>();
1892  this.options = options ?? new Dictionary<string, string>();
1893  } // end constructor
1894 
1895  } // end class InsertRecordsRequest
1896 
1897 
1898 
1903  {
1904 
1924  public struct Info
1925  {
1926 
1930  public const string BAD_RECORD_INDICES = "bad_record_indices";
1931 
1934  public const string ERROR_N = "error_N";
1935  } // end struct Info
1936 
1937 
1940  public IList<string> record_ids { get; set; } = new List<string>();
1941 
1943  public int count_inserted { get; set; }
1944 
1946  public int count_updated { get; set; }
1947 
1965  public IDictionary<string, string> info { get; set; } = new Dictionary<string, string>();
1966 
1967  } // end class InsertRecordsResponse
1968 
1969 
1970 
1971 
1972 } // end namespace kinetica
int count_inserted
The number of records inserted.
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.
InsertRecordsRequest()
Constructs an InsertRecordsRequest object with default 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.
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.
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...
InsertRecordsRequest(string table_name, IList< T > data, IDictionary< string, string > options=null)
Constructs an InsertRecordsRequest object with the specified parameters.
IDictionary< string, string > options
Optional parameters.
RawInsertRecordsRequest()
Constructs a RawInsertRecordsRequest object with default parameters.
string list_encoding
The encoding of the records to be inserted.
The encoding of the records to be inserted.
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.insertRecords{T}(string,IList{T},IDictionary{string, string}).
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{T}(string,IList{T},IDictionary{string, string}).
KineticaData - class to help with Avro Encoding for Kinetica
Definition: KineticaData.cs:14