7 using System.Collections.Generic;
42 public class RawUpdateRecordsRequest : KineticaData
45 private const string Schema_ =
@" 48 ""name"": ""RawUpdateRecordsRequest"", 49 ""namespace"": ""kinetica"", 51 { ""name"": ""table_name"", ""type"": ""string"" }, 52 { ""name"": ""expressions"", ""type"": { ""type"": ""array"", ""items"": ""string"" } }, 53 { ""name"": ""new_values_maps"", ""type"": { ""type"": ""array"", ""items"": { ""type"": ""map"", ""values"": [""string"", ""null""] } } }, 54 { ""name"": ""records_to_insert"", ""type"": { ""type"": ""array"", ""items"": ""bytes"" } }, 55 { ""name"": ""records_to_insert_str"", ""type"": { ""type"": ""array"", ""items"": ""string"" } }, 56 { ""name"": ""record_encoding"", ""type"": ""string"" }, 57 { ""name"": ""options"", ""type"": { ""type"": ""map"", ""values"": ""string"" } } 66 public struct RecordEncoding
68 public const string BINARY =
"binary";
69 public const string JSON =
"json";
98 public const string TRUE =
"true";
99 public const string FALSE =
"false";
203 public const string RECORD_ID =
"record_id";
217 public IList<string>
expressions {
get;
set; } =
new List<string>();
225 public IList<IDictionary<string, string>>
new_values_maps {
get;
set; } =
new List<IDictionary<string, string>>();
460 public IDictionary<string, string>
options {
get;
set; } =
new Dictionary<string, string>();
695 IDictionary<string, string>
options =
null)
698 this.expressions =
expressions ??
new List<string>();
955 IDictionary<string, string>
options =
null)
958 this.expressions =
expressions ??
new List<string>();
1028 public const string TRUE =
"true";
1029 public const string FALSE =
"false";
1133 public const string RECORD_ID =
"record_id";
1147 public IList<string> expressions {
get;
set; } =
new List<string>();
1155 public IList<IDictionary<string, string>> new_values_maps {
get;
set; } =
new List<IDictionary<string, string>>();
1163 public IList<T>
data {
get;
set; } =
new List<T>();
1368 public IDictionary<string, string>
options {
get;
set; } =
new Dictionary<string, string>();
1599 IList<string> expressions,
1600 IList<IDictionary<string, string>> new_values_maps,
1601 IList<T> data =
null,
1602 IDictionary<string, string> options =
null)
1604 this.table_name = table_name ??
"";
1605 this.expressions = expressions ??
new List<string>();
1607 this.
data = data ??
new List<T>();
1615 public class UpdateRecordsResponse : KineticaData
1623 public IList<long>
counts_updated {
get;
set; } =
new List<long>();
1635 public IDictionary<string, string>
info {
get;
set; } =
new Dictionary<string, string>();
string table_name
Name of table to be updated, in [schema_name.
long count_updated
Total number of records updated.
A set of parameters for Kinetica.updateRecords.
const string TRUNCATE_STRINGS
If set to TRUE, any strings which are too long for their charN string fields will be truncated to fit...
const string USE_EXPRESSIONS_IN_NEW_VALUES_MAPS
When set to TRUE, all new values in new_values_maps are considered as expression values.
const string UPDATE_ON_EXISTING_PK
Specifies the record collision policy for updating a table with a primary key.
const string RECORD_ID
ID of a single record to be updated (returned in the call to Kinetica.insertRecords or Kinetica....
IList< T > data
An optional list of new binary-avro encoded records to insert, one for each update.
RawUpdateRecordsRequest(string table_name, IList< string > expressions, IList< IDictionary< string, string >> new_values_maps, IList< byte[]> records_to_insert=null, IDictionary< string, string > options=null)
Constructs a RawUpdateRecordsRequest object with the specified parameters.
string record_encoding
Identifies which of records_to_insert and records_to_insert_str should be used.
IList< IDictionary< string, string > > new_values_maps
List of new values for the matching records.
const string BYPASS_SAFETY_CHECKS
When set to TRUE, all predicates are available for primary key updates.
const string RECORD_ID
ID of a single record to be updated (returned in the call to Kinetica.insertRecordsRaw or Kinetica....
const string UPDATE_PARTITION
Force qualifying records to be deleted and reinserted so their partition membership will be reevaluat...
long count_inserted
Total number of records inserted (due to expressions not matching any existing records).
UpdateRecordsRequest()
Constructs an UpdateRecordsRequest object with default parameters.
const string GLOBAL_EXPRESSION
An optional global expression to reduce the search space of the predicates listed in expressions.
IList< byte[]> records_to_insert
An optional list of new binary-avro encoded records to insert, one for each update.
UpdateRecordsRequest(string table_name, IList< string > expressions, IList< IDictionary< string, string >> new_values_maps, IList< T > data=null, IDictionary< string, string > options=null)
Constructs an UpdateRecordsRequest object with the specified parameters.
const string BYPASS_SAFETY_CHECKS
When set to TRUE, all predicates are available for primary key updates.
IList< long > counts_inserted
Total number of records inserted per predicate in expressions (will be either 0 or 1 for each express...
const string IGNORE_EXISTING_PK
Specifies the record collision error-suppression policy for updating a table with a primary key,...
IDictionary< string, string > info
Additional information.
IList< IDictionary< string, string > > new_values_maps
List of new values for the matching records.
string table_name
Name of table to be updated, in [schema_name.
IList< string > records_to_insert_str
An optional list of JSON encoded objects to insert, one for each update, to be added if the particula...
const string USE_EXPRESSIONS_IN_NEW_VALUES_MAPS
When set to TRUE, all new values in new_values_maps are considered as expression values.
A set of string constants for the parameter record_encoding.
IDictionary< string, string > options
Optional parameters.
const string TRUNCATE_STRINGS
If set to TRUE, any strings which are too long for their charN string fields will be truncated to fit...
IList< long > counts_updated
Total number of records updated per predicate in expressions.
RawUpdateRecordsRequest(string table_name, IList< string > expressions, IList< IDictionary< string, string >> new_values_maps, IList< byte[]> records_to_insert=null, IList< string > records_to_insert_str=null, string record_encoding=null, IDictionary< string, string > options=null)
Constructs a RawUpdateRecordsRequest object with the specified parameters.
const string UPDATE_PARTITION
Force qualifying records to be deleted and reinserted so their partition membership will be reevaluat...
IList< string > expressions
A list of the actual predicates, one for each update; format should follow the guidelines here.
KineticaData - class to help with Avro Encoding for Kinetica
const string UPDATE_ON_EXISTING_PK
Specifies the record collision policy for updating a table with a primary key.
const string IGNORE_EXISTING_PK
Specifies the record collision error-suppression policy for updating a table with a primary key,...
RawUpdateRecordsRequest()
Constructs a RawUpdateRecordsRequest object with default parameters.
IDictionary< string, string > options
Optional parameters.
const string GLOBAL_EXPRESSION
An optional global expression to reduce the search space of the predicates listed in expressions.
A set of string constants for the parameter options.