Kinetica C# API  Version 6.0.1.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 
36  {
37 
43  public struct ListEncoding
44  {
45  public const string BINARY = "binary";
46  public const string JSON = "json";
47  } // end struct ListEncoding
48 
49 
81  public struct Options
82  {
83 
96  public const string UPDATE_ON_EXISTING_PK = "update_on_existing_pk";
97  public const string TRUE = "true";
98  public const string FALSE = "false";
99 
103  public const string RETURN_RECORD_IDS = "return_record_ids";
104 
107  public const string ROUTE_TO_ADDRESS = "route_to_address";
108  } // end struct Options
109 
110 
113  public string table_name { get; set; }
114 
120  public IList<byte[]> list { get; set; } = new List<byte[]>();
121 
126  public IList<string> list_str { get; set; } = new List<string>();
127 
131  public string list_encoding { get; set; } = ListEncoding.BINARY;
132 
162  public IDictionary<string, string> options { get; set; } = new Dictionary<string, string>();
163 
164 
168 
210  IList<byte[]> list,
211  IDictionary<string, string> options = null)
212  {
213  this.table_name = table_name ?? "";
214  this.list = list ?? new List<byte[]>();
215  this.list_str = new List<string>();
216  this.list_encoding = ListEncoding.BINARY;
217  this.options = options ?? new Dictionary<string, string>();
218  } // end constructor
219 
220 
270  IList<byte[]> list,
271  IList<string> list_str,
272  string list_encoding = null,
273  IDictionary<string, string> options = null)
274  {
275  this.table_name = table_name ?? "";
276  this.list = list ?? new List<byte[]>();
277  this.list_str = list_str ?? new List<string>();
278  this.list_encoding = list_encoding ?? ListEncoding.BINARY;
279  this.options = options ?? new Dictionary<string, string>();
280  } // end full constructor
281 
282  } // end class RawInsertRecordsRequest
283 
284 
285 
310  public class InsertRecordsRequest<T> : KineticaData
311  {
312 
344  public struct Options
345  {
346 
359  public const string UPDATE_ON_EXISTING_PK = "update_on_existing_pk";
360  public const string TRUE = "true";
361  public const string FALSE = "false";
362 
366  public const string RETURN_RECORD_IDS = "return_record_ids";
367 
370  public const string ROUTE_TO_ADDRESS = "route_to_address";
371  } // end struct Options
372 
373 
376  public string table_name { get; set; }
377 
383  public IList<T> data { get; set; } = new List<T>();
384 
414  public IDictionary<string, string> options { get; set; } = new Dictionary<string, string>();
415 
416 
419  public InsertRecordsRequest() { }
420 
461  public InsertRecordsRequest( string table_name,
462  IList<T> data,
463  IDictionary<string, string> options = null)
464  {
465  this.table_name = table_name ?? "";
466  this.data = data ?? new List<T>();
467  this.options = options ?? new Dictionary<string, string>();
468  } // end constructor
469 
470  } // end class InsertRecordsRequest
471 
472 
473 
476  {
477 
480  public IList<string> record_ids { get; set; } = new List<string>();
481 
483  public int count_inserted { get; set; }
484 
486  public int count_updated { get; set; }
487 
488  } // end class InsertRecordsResponse
489 
490 
491 
492 
493 } // 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.
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 UPDATE_ON_EXISTING_PK
Specifies the record collision policy for inserting into a table with a primary key.
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 ROUTE_TO_ADDRESS
Route to a specific rank/tom.
A set of parameters for /insert/records.
const string RETURN_RECORD_IDS
If true then return the internal record id along for each inserted record.
A set of results returned by /insert/records.
KineticaData - class to help with Avro Encoding for Kinetica
Definition: KineticaData.cs:14