Kinetica C# API  Version 7.0.19.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 
35  {
36 
53  public struct ListEncoding
54  {
55  public const string BINARY = "binary";
56  public const string JSON = "json";
57  } // end struct ListEncoding
58 
59 
195  public struct Options
196  {
197 
222  public const string UPDATE_ON_EXISTING_PK = "update_on_existing_pk";
223  public const string TRUE = "true";
224  public const string FALSE = "false";
225 
241  public const string RETURN_RECORD_IDS = "return_record_ids";
242 
258  public const string TRUNCATE_STRINGS = "truncate_strings";
259 
279  public const string RETURN_INDIVIDUAL_ERRORS = "return_individual_errors";
280 
298  public const string ALLOW_PARTIAL_BATCH = "allow_partial_batch";
299 
315  public const string DRY_RUN = "dry_run";
316  } // end struct Options
317 
318 
321  public string table_name { get; set; }
322 
328  public IList<byte[]> list { get; set; } = new List<byte[]>();
329 
334  public IList<string> list_str { get; set; } = new List<string>();
335 
351  public string list_encoding { get; set; } = ListEncoding.BINARY;
352 
486  public IDictionary<string, string> options { get; set; } = new Dictionary<string, string>();
487 
488 
492 
638  IList<byte[]> list,
639  IDictionary<string, string> options = null)
640  {
641  this.table_name = table_name ?? "";
642  this.list = list ?? new List<byte[]>();
643  this.list_str = new List<string>();
644  this.list_encoding = ListEncoding.BINARY;
645  this.options = options ?? new Dictionary<string, string>();
646  } // end constructor
647 
648 
815  IList<byte[]> list,
816  IList<string> list_str,
817  string list_encoding = null,
818  IDictionary<string, string> options = null)
819  {
820  this.table_name = table_name ?? "";
821  this.list = list ?? new List<byte[]>();
822  this.list_str = list_str ?? new List<string>();
823  this.list_encoding = list_encoding ?? ListEncoding.BINARY;
824  this.options = options ?? new Dictionary<string, string>();
825  } // end full constructor
826 
827  } // end class RawInsertRecordsRequest
828 
829 
830 
854  public class InsertRecordsRequest<T> : KineticaData
855  {
856 
992  public struct Options
993  {
994 
1019  public const string UPDATE_ON_EXISTING_PK = "update_on_existing_pk";
1020  public const string TRUE = "true";
1021  public const string FALSE = "false";
1022 
1038  public const string RETURN_RECORD_IDS = "return_record_ids";
1039 
1055  public const string TRUNCATE_STRINGS = "truncate_strings";
1056 
1076  public const string RETURN_INDIVIDUAL_ERRORS = "return_individual_errors";
1077 
1095  public const string ALLOW_PARTIAL_BATCH = "allow_partial_batch";
1096 
1112  public const string DRY_RUN = "dry_run";
1113  } // end struct Options
1114 
1115 
1118  public string table_name { get; set; }
1119 
1125  public IList<T> data { get; set; } = new List<T>();
1126 
1260  public IDictionary<string, string> options { get; set; } = new Dictionary<string, string>();
1261 
1262 
1266 
1411  public InsertRecordsRequest( string table_name,
1412  IList<T> data,
1413  IDictionary<string, string> options = null)
1414  {
1415  this.table_name = table_name ?? "";
1416  this.data = data ?? new List<T>();
1417  this.options = options ?? new Dictionary<string, string>();
1418  } // end constructor
1419 
1420  } // end class InsertRecordsRequest
1421 
1422 
1423 
1428  {
1429 
1449  public struct Info
1450  {
1451 
1455  public const string BAD_RECORD_INDICES = "bad_record_indices";
1456 
1459  public const string ERROR_N = "error_N";
1460  } // end struct Info
1461 
1462 
1465  public IList<string> record_ids { get; set; } = new List<string>();
1466 
1468  public int count_inserted { get; set; }
1469 
1471  public int count_updated { get; set; }
1472 
1490  public IDictionary<string, string> info { get; set; } = new Dictionary<string, string>();
1491 
1492  } // end class InsertRecordsResponse
1493 
1494 
1495 
1496 
1497 } // 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
Table to which the records are 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...
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.
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