Skip to main content

A generic record that can hold values for any Kinetica type. More…

Inheritance diagram for kinetica.Records.GenericRecord:
Collaboration diagram for kinetica.Records.GenericRecord:

Public Member Functions

 GenericRecord (Type type)
 Creates a new GenericRecord for the given type.
 
bool Put (int index, int value)
 Sets an integer value by column index.
 
bool Put (int index, long value)
 Sets a long value by column index.
 
bool Put (int index, float value)
 Sets a float value by column index.
 
bool Put (int index, double value)
 Sets a double value by column index.
 
bool Put (int index, string? value)
 Sets a string value by column index.
 
bool Put (int index, byte[]? value)
 Sets a bytes value by column index.
 
bool Put (int index, bool value)
 Sets a boolean value by column index.
 
bool PutNull (int index)
 Sets a null value by column index.
 
bool Put (int index, RecordValue value)
 Sets a RecordValue by column index.
 
bool Put (string name, int value)
 Sets an integer value by column name.
 
bool Put (string name, long value)
 Sets a long value by column name.
 
bool Put (string name, float value)
 Sets a float value by column name.
 
bool Put (string name, double value)
 Sets a double value by column name.
 
bool Put (string name, string? value)
 Sets a string value by column name.
 
bool Put (string name, byte[]? value)
 Sets a bytes value by column name.
 
bool Put (string name, bool value)
 Sets a boolean value by column name.
 
bool PutNull (string name)
 Sets a null value by column name.
 
bool Put (string name, RecordValue value)
 Sets a RecordValue by column name.
 
RecordValueGet (int index)
 Gets the raw RecordValue at the specified index.
 
int? GetInt (int index)
 Gets an integer value by column index.
 
long? GetLong (int index)
 Gets a long value by column index.
 
float? GetFloat (int index)
 Gets a float value by column index.
 
double? GetDouble (int index)
 Gets a double value by column index.
 
string? GetString (int index)
 Gets a string value by column index.
 
byte?[] GetBytes (int index)
 Gets a bytes value by column index.
 
bool? GetBool (int index)
 Gets a boolean value by column index.
 
RecordValueGet (string name)
 Gets the raw RecordValue by column name.
 
int? GetInt (string name)
 Gets an integer value by column name.
 
long? GetLong (string name)
 Gets a long value by column name.
 
float? GetFloat (string name)
 Gets a float value by column name.
 
double? GetDouble (string name)
 Gets a double value by column name.
 
string? GetString (string name)
 Gets a string value by column name.
 
byte?[] GetBytes (string name)
 Gets a bytes value by column name.
 
bool? GetBool (string name)
 Gets a boolean value by column name.
 
string GetAvroSchema ()
 Returns the Avro schema as a JSON string for this record type.
 
ShardKeyValues GetShardKeyValues ()
 Returns shard key column names and their typed values.
 
GenericRecord Clone ()
 Creates a copy of this record.
 
void Clear ()
 Resets all values to null.
 
object?[] ToObjectArray ()
 Gets all values as objects (for Avro serialization).
 
override string ToString ()
 
 GenericRecord (Type type)
 Creates a new GenericRecord for the given type.
 
bool Put (int index, int value)
 Sets an integer value by column index.
 
bool Put (int index, long value)
 Sets a long value by column index.
 
bool Put (int index, float value)
 Sets a float value by column index.
 
bool Put (int index, double value)
 Sets a double value by column index.
 
bool Put (int index, string? value)
 Sets a string value by column index.
 
bool Put (int index, byte[]? value)
 Sets a bytes value by column index.
 
bool Put (int index, bool value)
 Sets a boolean value by column index.
 
bool PutNull (int index)
 Sets a null value by column index.
 
bool Put (int index, RecordValue value)
 Sets a RecordValue by column index.
 
bool Put (string name, int value)
 Sets an integer value by column name.
 
bool Put (string name, long value)
 Sets a long value by column name.
 
bool Put (string name, float value)
 Sets a float value by column name.
 
bool Put (string name, double value)
 Sets a double value by column name.
 
bool Put (string name, string? value)
 Sets a string value by column name.
 
bool Put (string name, byte[]? value)
 Sets a bytes value by column name.
 
bool Put (string name, bool value)
 Sets a boolean value by column name.
 
bool PutNull (string name)
 Sets a null value by column name.
 
bool Put (string name, RecordValue value)
 Sets a RecordValue by column name.
 
RecordValueGet (int index)
 Gets the raw RecordValue at the specified index.
 
int? GetInt (int index)
 Gets an integer value by column index.
 
long? GetLong (int index)
 Gets a long value by column index.
 
float? GetFloat (int index)
 Gets a float value by column index.
 
double? GetDouble (int index)
 Gets a double value by column index.
 
string? GetString (int index)
 Gets a string value by column index.
 
byte?[] GetBytes (int index)
 Gets a bytes value by column index.
 
bool? GetBool (int index)
 Gets a boolean value by column index.
 
RecordValueGet (string name)
 Gets the raw RecordValue by column name.
 
int? GetInt (string name)
 Gets an integer value by column name.
 
long? GetLong (string name)
 Gets a long value by column name.
 
float? GetFloat (string name)
 Gets a float value by column name.
 
double? GetDouble (string name)
 Gets a double value by column name.
 
string? GetString (string name)
 Gets a string value by column name.
 
byte?[] GetBytes (string name)
 Gets a bytes value by column name.
 
bool? GetBool (string name)
 Gets a boolean value by column name.
 
string GetAvroSchema ()
 Returns the Avro schema as a JSON string for this record type.
 
ShardKeyValues GetShardKeyValues ()
 Returns shard key column names and their typed values.
 
GenericRecord Clone ()
 Creates a copy of this record.
 
void Clear ()
 Resets all values to null.
 
object?[] ToObjectArray ()
 Gets all values as objects (for Avro serialization).
 
override string ToString ()
 

Static Public Member Functions

static IReadOnlyDictionary< string, IList< string > > GetTypeProperties (Type type)
 Returns type properties for this record type.
 
static IReadOnlyDictionary< string, IList< string > > GetTypeProperties (Type type)
 Returns type properties for this record type.
 

Properties

Type RecordType [get]
 Gets the Type definition for this record.
 

Detailed Description

A generic record that can hold values for any Kinetica type.

Equivalent to Rust’s GenericRecord struct.

This class stores values in an array indexed by column position, and uses the associated Type for schema information. It implements both IKineticaRecord and IShardKeyExtractor for use with BulkInserter.

var recordType = await Type.FromTableAsync(kinetica, “my_table”);
var record = recordType.NewInstance();
// Set values by index
record.Put(0, 42);
record.Put(1, “Alice”);
// Set values by name
record.Put(“score”, 95.5);
// Get values
int? id = record.GetInt(0);
string? name = record.GetString(“name”);
Immutable collection of metadata about a Kinetica type.
Definition Type.cs:33
static async Task< Type > FromTableAsync(kinetica.Kinetica kinetica, string tableName)
Fetch type from an existing Kinetica table.
Definition Type.cs:124

Definition at line 32 of file GenericRecord.cs.

Constructor & Destructor Documentation

◆ GenericRecord() [1/2]

kinetica.Records.GenericRecord.GenericRecord (Typetype)
inline

Creates a new GenericRecord for the given type.

All values are initialized to Null.

Parameters
typeThe Type definition for this record.

Definition at line 42 of file GenericRecord.cs.

◆ GenericRecord() [2/2]

kinetica.Records.GenericRecord.GenericRecord (Typetype)
inline

Creates a new GenericRecord for the given type.

All values are initialized to Null.

Parameters
typeThe Type definition for this record.

Definition at line 42 of file GenericRecord.cs.

Member Function Documentation

◆ Clear() [1/2]

void kinetica.Records.GenericRecord.Clear ()
inline

Resets all values to null.

Definition at line 428 of file GenericRecord.cs.

◆ Clear() [2/2]

void kinetica.Records.GenericRecord.Clear ()
inline

Resets all values to null.

Definition at line 428 of file GenericRecord.cs.

◆ Clone() [1/2]

GenericRecord kinetica.Records.GenericRecord.Clone ()
inline

Creates a copy of this record.

Definition at line 418 of file GenericRecord.cs.

◆ Clone() [2/2]

GenericRecord kinetica.Records.GenericRecord.Clone ()
inline

Creates a copy of this record.

Definition at line 418 of file GenericRecord.cs.

◆ Get() [1/4]

RecordValue? kinetica.Records.GenericRecord.Get (intindex)
inline

Gets the raw RecordValue at the specified index.

Definition at line 201 of file GenericRecord.cs.

◆ Get() [2/4]

RecordValue? kinetica.Records.GenericRecord.Get (intindex)
inline

Gets the raw RecordValue at the specified index.

Definition at line 201 of file GenericRecord.cs.

◆ Get() [3/4]

RecordValue? kinetica.Records.GenericRecord.Get (stringname)
inline

Gets the raw RecordValue by column name.

Definition at line 261 of file GenericRecord.cs.

◆ Get() [4/4]

RecordValue? kinetica.Records.GenericRecord.Get (stringname)
inline

Gets the raw RecordValue by column name.

Definition at line 261 of file GenericRecord.cs.

◆ GetAvroSchema() [1/2]

string kinetica.Records.GenericRecord.GetAvroSchema ()

Returns the Avro schema as a JSON string for this record type.

Implements kinetica.Records.IKineticaRecord.

◆ GetAvroSchema() [2/2]

string kinetica.Records.GenericRecord.GetAvroSchema ()

Returns the Avro schema as a JSON string for this record type.

Implements kinetica.Records.IKineticaRecord.

◆ GetBool() [1/4]

bool? kinetica.Records.GenericRecord.GetBool (intindex)
inline

Gets a boolean value by column index.

Definition at line 250 of file GenericRecord.cs.

◆ GetBool() [2/4]

bool? kinetica.Records.GenericRecord.GetBool (intindex)
inline

Gets a boolean value by column index.

Definition at line 250 of file GenericRecord.cs.

◆ GetBool() [3/4]

bool? kinetica.Records.GenericRecord.GetBool (stringname)
inline

Gets a boolean value by column name.

Definition at line 310 of file GenericRecord.cs.

◆ GetBool() [4/4]

bool? kinetica.Records.GenericRecord.GetBool (stringname)
inline

Gets a boolean value by column name.

Definition at line 310 of file GenericRecord.cs.

◆ GetBytes() [1/4]

byte?[] kinetica.Records.GenericRecord.GetBytes (intindex)
inline

Gets a bytes value by column index.

Definition at line 243 of file GenericRecord.cs.

◆ GetBytes() [2/4]

byte?[] kinetica.Records.GenericRecord.GetBytes (intindex)
inline

Gets a bytes value by column index.

Definition at line 243 of file GenericRecord.cs.

◆ GetBytes() [3/4]

byte?[] kinetica.Records.GenericRecord.GetBytes (stringname)
inline

Gets a bytes value by column name.

Definition at line 303 of file GenericRecord.cs.

◆ GetBytes() [4/4]

byte?[] kinetica.Records.GenericRecord.GetBytes (stringname)
inline

Gets a bytes value by column name.

Definition at line 303 of file GenericRecord.cs.

◆ GetDouble() [1/4]

double? kinetica.Records.GenericRecord.GetDouble (intindex)
inline

Gets a double value by column index.

Definition at line 229 of file GenericRecord.cs.

◆ GetDouble() [2/4]

double? kinetica.Records.GenericRecord.GetDouble (intindex)
inline

Gets a double value by column index.

Definition at line 229 of file GenericRecord.cs.

◆ GetDouble() [3/4]

double? kinetica.Records.GenericRecord.GetDouble (stringname)
inline

Gets a double value by column name.

Definition at line 289 of file GenericRecord.cs.

◆ GetDouble() [4/4]

double? kinetica.Records.GenericRecord.GetDouble (stringname)
inline

Gets a double value by column name.

Definition at line 289 of file GenericRecord.cs.

◆ GetFloat() [1/4]

float? kinetica.Records.GenericRecord.GetFloat (intindex)
inline

Gets a float value by column index.

Definition at line 222 of file GenericRecord.cs.

◆ GetFloat() [2/4]

float? kinetica.Records.GenericRecord.GetFloat (intindex)
inline

Gets a float value by column index.

Definition at line 222 of file GenericRecord.cs.

◆ GetFloat() [3/4]

float? kinetica.Records.GenericRecord.GetFloat (stringname)
inline

Gets a float value by column name.

Definition at line 282 of file GenericRecord.cs.

◆ GetFloat() [4/4]

float? kinetica.Records.GenericRecord.GetFloat (stringname)
inline

Gets a float value by column name.

Definition at line 282 of file GenericRecord.cs.

◆ GetInt() [1/4]

int? kinetica.Records.GenericRecord.GetInt (intindex)
inline

Gets an integer value by column index.

Definition at line 208 of file GenericRecord.cs.

◆ GetInt() [2/4]

int? kinetica.Records.GenericRecord.GetInt (intindex)
inline

Gets an integer value by column index.

Definition at line 208 of file GenericRecord.cs.

◆ GetInt() [3/4]

int? kinetica.Records.GenericRecord.GetInt (stringname)
inline

Gets an integer value by column name.

Definition at line 268 of file GenericRecord.cs.

◆ GetInt() [4/4]

int? kinetica.Records.GenericRecord.GetInt (stringname)
inline

Gets an integer value by column name.

Definition at line 268 of file GenericRecord.cs.

◆ GetLong() [1/4]

long? kinetica.Records.GenericRecord.GetLong (intindex)
inline

Gets a long value by column index.

Definition at line 215 of file GenericRecord.cs.

◆ GetLong() [2/4]

long? kinetica.Records.GenericRecord.GetLong (intindex)
inline

Gets a long value by column index.

Definition at line 215 of file GenericRecord.cs.

◆ GetLong() [3/4]

long? kinetica.Records.GenericRecord.GetLong (stringname)
inline

Gets a long value by column name.

Definition at line 275 of file GenericRecord.cs.

◆ GetLong() [4/4]

long? kinetica.Records.GenericRecord.GetLong (stringname)
inline

Gets a long value by column name.

Definition at line 275 of file GenericRecord.cs.

◆ GetShardKeyValues() [1/2]

ShardKeyValues kinetica.Records.GenericRecord.GetShardKeyValues ()
inline

Returns shard key column names and their typed values.

Implements kinetica.Records.IShardKeyExtractor.

Definition at line 346 of file GenericRecord.cs.

◆ GetShardKeyValues() [2/2]

ShardKeyValues kinetica.Records.GenericRecord.GetShardKeyValues ()
inline

Returns shard key column names and their typed values.

Implements kinetica.Records.IShardKeyExtractor.

Definition at line 346 of file GenericRecord.cs.

◆ GetString() [1/4]

string? kinetica.Records.GenericRecord.GetString (intindex)
inline

Gets a string value by column index.

Definition at line 236 of file GenericRecord.cs.

◆ GetString() [2/4]

string? kinetica.Records.GenericRecord.GetString (intindex)
inline

Gets a string value by column index.

Definition at line 236 of file GenericRecord.cs.

◆ GetString() [3/4]

string? kinetica.Records.GenericRecord.GetString (stringname)
inline

Gets a string value by column name.

Definition at line 296 of file GenericRecord.cs.

◆ GetString() [4/4]

string? kinetica.Records.GenericRecord.GetString (stringname)
inline

Gets a string value by column name.

Definition at line 296 of file GenericRecord.cs.

◆ GetTypeProperties() [1/2]

static IReadOnlyDictionary< string, IList< string > > kinetica.Records.GenericRecord.GetTypeProperties (Typetype)
inlinestatic

Returns type properties for this record type.

Definition at line 328 of file GenericRecord.cs.

◆ GetTypeProperties() [2/2]

static IReadOnlyDictionary< string, IList< string > > kinetica.Records.GenericRecord.GetTypeProperties (Typetype)
inlinestatic

Returns type properties for this record type.

Definition at line 328 of file GenericRecord.cs.

◆ Put() [1/32]

bool kinetica.Records.GenericRecord.Put (intindex,
boolvalue )
inline

Sets a boolean value by column index.

Definition at line 106 of file GenericRecord.cs.

◆ Put() [2/32]

bool kinetica.Records.GenericRecord.Put (intindex,
boolvalue )
inline

Sets a boolean value by column index.

Definition at line 106 of file GenericRecord.cs.

◆ Put() [3/32]

bool kinetica.Records.GenericRecord.Put (intindex,
byte?[]value )
inline

Sets a bytes value by column index.

Definition at line 98 of file GenericRecord.cs.

◆ Put() [4/32]

bool kinetica.Records.GenericRecord.Put (intindex,
byte?[]value )
inline

Sets a bytes value by column index.

Definition at line 98 of file GenericRecord.cs.

◆ Put() [5/32]

bool kinetica.Records.GenericRecord.Put (intindex,
doublevalue )
inline

Sets a double value by column index.

Definition at line 82 of file GenericRecord.cs.

◆ Put() [6/32]

bool kinetica.Records.GenericRecord.Put (intindex,
doublevalue )
inline

Sets a double value by column index.

Definition at line 82 of file GenericRecord.cs.

◆ Put() [7/32]

bool kinetica.Records.GenericRecord.Put (intindex,
floatvalue )
inline

Sets a float value by column index.

Definition at line 74 of file GenericRecord.cs.

◆ Put() [8/32]

bool kinetica.Records.GenericRecord.Put (intindex,
floatvalue )
inline

Sets a float value by column index.

Definition at line 74 of file GenericRecord.cs.

◆ Put() [9/32]

bool kinetica.Records.GenericRecord.Put (intindex,
intvalue )
inline

Sets an integer value by column index.

Definition at line 58 of file GenericRecord.cs.

◆ Put() [10/32]

bool kinetica.Records.GenericRecord.Put (intindex,
intvalue )
inline

Sets an integer value by column index.

Definition at line 58 of file GenericRecord.cs.

◆ Put() [11/32]

bool kinetica.Records.GenericRecord.Put (intindex,
longvalue )
inline

Sets a long value by column index.

Definition at line 66 of file GenericRecord.cs.

◆ Put() [12/32]

bool kinetica.Records.GenericRecord.Put (intindex,
longvalue )
inline

Sets a long value by column index.

Definition at line 66 of file GenericRecord.cs.

◆ Put() [13/32]

bool kinetica.Records.GenericRecord.Put (intindex,
RecordValuevalue )
inline

Sets a RecordValue by column index.

Definition at line 122 of file GenericRecord.cs.

◆ Put() [14/32]

bool kinetica.Records.GenericRecord.Put (intindex,
RecordValuevalue )
inline

Sets a RecordValue by column index.

Definition at line 122 of file GenericRecord.cs.

◆ Put() [15/32]

bool kinetica.Records.GenericRecord.Put (intindex,
string?value )
inline

Sets a string value by column index.

Definition at line 90 of file GenericRecord.cs.

◆ Put() [16/32]

bool kinetica.Records.GenericRecord.Put (intindex,
string?value )
inline

Sets a string value by column index.

Definition at line 90 of file GenericRecord.cs.

◆ Put() [17/32]

bool kinetica.Records.GenericRecord.Put (stringname,
boolvalue )
inline

Sets a boolean value by column name.

Definition at line 176 of file GenericRecord.cs.

◆ Put() [18/32]

bool kinetica.Records.GenericRecord.Put (stringname,
boolvalue )
inline

Sets a boolean value by column name.

Definition at line 176 of file GenericRecord.cs.

◆ Put() [19/32]

bool kinetica.Records.GenericRecord.Put (stringname,
byte?[]value )
inline

Sets a bytes value by column name.

Definition at line 169 of file GenericRecord.cs.

◆ Put() [20/32]

bool kinetica.Records.GenericRecord.Put (stringname,
byte?[]value )
inline

Sets a bytes value by column name.

Definition at line 169 of file GenericRecord.cs.

◆ Put() [21/32]

bool kinetica.Records.GenericRecord.Put (stringname,
doublevalue )
inline

Sets a double value by column name.

Definition at line 155 of file GenericRecord.cs.

◆ Put() [22/32]

bool kinetica.Records.GenericRecord.Put (stringname,
doublevalue )
inline

Sets a double value by column name.

Definition at line 155 of file GenericRecord.cs.

◆ Put() [23/32]

bool kinetica.Records.GenericRecord.Put (stringname,
floatvalue )
inline

Sets a float value by column name.

Definition at line 148 of file GenericRecord.cs.

◆ Put() [24/32]

bool kinetica.Records.GenericRecord.Put (stringname,
floatvalue )
inline

Sets a float value by column name.

Definition at line 148 of file GenericRecord.cs.

◆ Put() [25/32]

bool kinetica.Records.GenericRecord.Put (stringname,
intvalue )
inline

Sets an integer value by column name.

Definition at line 134 of file GenericRecord.cs.

◆ Put() [26/32]

bool kinetica.Records.GenericRecord.Put (stringname,
intvalue )
inline

Sets an integer value by column name.

Definition at line 134 of file GenericRecord.cs.

◆ Put() [27/32]

bool kinetica.Records.GenericRecord.Put (stringname,
longvalue )
inline

Sets a long value by column name.

Definition at line 141 of file GenericRecord.cs.

◆ Put() [28/32]

bool kinetica.Records.GenericRecord.Put (stringname,
longvalue )
inline

Sets a long value by column name.

Definition at line 141 of file GenericRecord.cs.

◆ Put() [29/32]

bool kinetica.Records.GenericRecord.Put (stringname,
RecordValuevalue )
inline

Sets a RecordValue by column name.

Definition at line 190 of file GenericRecord.cs.

◆ Put() [30/32]

bool kinetica.Records.GenericRecord.Put (stringname,
RecordValuevalue )
inline

Sets a RecordValue by column name.

Definition at line 190 of file GenericRecord.cs.

◆ Put() [31/32]

bool kinetica.Records.GenericRecord.Put (stringname,
string?value )
inline

Sets a string value by column name.

Definition at line 162 of file GenericRecord.cs.

◆ Put() [32/32]

bool kinetica.Records.GenericRecord.Put (stringname,
string?value )
inline

Sets a string value by column name.

Definition at line 162 of file GenericRecord.cs.

◆ PutNull() [1/4]

bool kinetica.Records.GenericRecord.PutNull (intindex)
inline

Sets a null value by column index.

Definition at line 114 of file GenericRecord.cs.

◆ PutNull() [2/4]

bool kinetica.Records.GenericRecord.PutNull (intindex)
inline

Sets a null value by column index.

Definition at line 114 of file GenericRecord.cs.

◆ PutNull() [3/4]

bool kinetica.Records.GenericRecord.PutNull (stringname)
inline

Sets a null value by column name.

Definition at line 183 of file GenericRecord.cs.

◆ PutNull() [4/4]

bool kinetica.Records.GenericRecord.PutNull (stringname)
inline

Sets a null value by column name.

Definition at line 183 of file GenericRecord.cs.

◆ ToObjectArray() [1/2]

object?[] kinetica.Records.GenericRecord.ToObjectArray ()
inline

Gets all values as objects (for Avro serialization).

Definition at line 442 of file GenericRecord.cs.

◆ ToObjectArray() [2/2]

object?[] kinetica.Records.GenericRecord.ToObjectArray ()
inline

Gets all values as objects (for Avro serialization).

Definition at line 442 of file GenericRecord.cs.

◆ ToString() [1/2]

override string kinetica.Records.GenericRecord.ToString ()
inline

Definition at line 466 of file GenericRecord.cs.

◆ ToString() [2/2]

override string kinetica.Records.GenericRecord.ToString ()
inline

Definition at line 466 of file GenericRecord.cs.

Property Documentation

◆ RecordType

Type kinetica.Records.GenericRecord.RecordType
get

Gets the Type definition for this record.

Definition at line 53 of file GenericRecord.cs.


The documentation for this class was generated from the following files: