Kinetica   C#   API  Version 7.2.3.1
RecordValue Struct Reference

A typed value that can be stored in a GenericRecord. More...

Inherits IEquatable< RecordValue >.

Public Member Functions

int? AsInt ()
 Gets the value as a 32-bit integer. More...
 
long? AsLong ()
 Gets the value as a 64-bit integer. More...
 
float? AsFloat ()
 Gets the value as a 32-bit float. More...
 
double? AsDouble ()
 Gets the value as a 64-bit double. More...
 
string? AsString ()
 Gets the value as a string. More...
 
byte? [] AsBytes ()
 Gets the value as a byte array. More...
 
bool? AsBool ()
 Gets the value as a boolean (from int). More...
 
bool TryGetInt (out int value)
 Tries to get the value as an integer. More...
 
bool TryGetLong (out long value)
 Tries to get the value as a long. More...
 
bool TryGetFloat (out float value)
 Tries to get the value as a float. More...
 
bool TryGetDouble (out double value)
 Tries to get the value as a double. More...
 
bool TryGetString (out string? value)
 Tries to get the value as a string. More...
 
bool TryGetBytes (out byte[]? value)
 Tries to get the value as bytes. More...
 
bool TryGetBool (out bool value)
 Tries to get the value as a boolean. More...
 
bool Equals (RecordValue other)
 
override bool Equals (object? obj)
 
override int GetHashCode ()
 
override string ToString ()
 

Static Public Member Functions

static RecordValue Null ()
 Creates a null record value. More...
 
static RecordValue Int (int value)
 Creates a 32-bit integer record value. More...
 
static RecordValue Long (long value)
 Creates a 64-bit integer record value. More...
 
static RecordValue Float (float value)
 Creates a 32-bit float record value. More...
 
static RecordValue Double (double value)
 Creates a 64-bit double record value. More...
 
static RecordValue String (string value)
 Creates a string record value. More...
 
static RecordValue Bytes (byte[] value)
 Creates a bytes record value. More...
 
static RecordValue Boolean (bool value)
 Creates a boolean record value (stored as int). More...
 
static implicit operator RecordValue (int value)
 
static implicit operator RecordValue (long value)
 
static implicit operator RecordValue (float value)
 
static implicit operator RecordValue (double value)
 
static implicit operator RecordValue (string value)
 
static implicit operator RecordValue (byte[] value)
 
static implicit operator RecordValue (bool value)
 
static implicit operator RecordValue (int? value)
 
static implicit operator RecordValue (long? value)
 
static implicit operator RecordValue (float? value)
 
static implicit operator RecordValue (double? value)
 
static implicit operator RecordValue (bool? value)
 
static bool operator== (RecordValue left, RecordValue right)
 
static bool operator != (RecordValue left, RecordValue right)
 

Public Attributes

RecordValueType Type => _type
 Gets the type of this record value. More...
 
bool IsNull => _type == RecordValueType.Null
 Returns true if this value is null. More...
 

Detailed Description

A typed value that can be stored in a GenericRecord.

Equivalent to Rust's RecordValue enum.

This struct provides type-safe storage for record field values.

Definition at line 34 of file RecordValue.cs.

Member Function Documentation

◆ AsBool()

bool? RecordValue.AsBool ( )
inline

Gets the value as a boolean (from int).

Definition at line 180 of file RecordValue.cs.

◆ AsBytes()

byte? [] RecordValue.AsBytes ( )
inline

Gets the value as a byte array.

Definition at line 168 of file RecordValue.cs.

◆ AsDouble()

double? RecordValue.AsDouble ( )
inline

Gets the value as a 64-bit double.

Definition at line 143 of file RecordValue.cs.

◆ AsFloat()

float? RecordValue.AsFloat ( )
inline

Gets the value as a 32-bit float.

Definition at line 131 of file RecordValue.cs.

◆ AsInt()

int? RecordValue.AsInt ( )
inline

Gets the value as a 32-bit integer.

Definition at line 106 of file RecordValue.cs.

◆ AsLong()

long? RecordValue.AsLong ( )
inline

Gets the value as a 64-bit integer.

Definition at line 118 of file RecordValue.cs.

◆ AsString()

string? RecordValue.AsString ( )
inline

Gets the value as a string.

Definition at line 156 of file RecordValue.cs.

◆ Boolean()

static RecordValue RecordValue.Boolean ( bool  value)
static

Creates a boolean record value (stored as int).

◆ Bytes()

static RecordValue RecordValue.Bytes ( byte []  value)
static

Creates a bytes record value.

◆ Double()

static RecordValue RecordValue.Double ( double  value)
static

Creates a 64-bit double record value.

◆ Equals() [1/2]

bool RecordValue.Equals ( RecordValue  other)
inline

Definition at line 292 of file RecordValue.cs.

◆ Equals() [2/2]

override bool RecordValue.Equals ( object?  obj)

◆ Float()

static RecordValue RecordValue.Float ( float  value)
static

Creates a 32-bit float record value.

◆ GetHashCode()

override int RecordValue.GetHashCode ( )
inline

Definition at line 321 of file RecordValue.cs.

◆ Int()

static RecordValue RecordValue.Int ( int  value)
static

Creates a 32-bit integer record value.

◆ Long()

static RecordValue RecordValue.Long ( long  value)
static

Creates a 64-bit integer record value.

◆ Null()

static RecordValue RecordValue.Null ( )
static

Creates a null record value.

◆ operator !=()

static bool RecordValue.operator != ( RecordValue  left,
RecordValue  right 
)
static

◆ operator RecordValue() [1/12]

static implicit RecordValue.operator RecordValue ( int  value)
static

◆ operator RecordValue() [2/12]

static implicit RecordValue.operator RecordValue ( long  value)
static

◆ operator RecordValue() [3/12]

static implicit RecordValue.operator RecordValue ( float  value)
static

◆ operator RecordValue() [4/12]

static implicit RecordValue.operator RecordValue ( double  value)
static

◆ operator RecordValue() [5/12]

static implicit RecordValue.operator RecordValue ( string  value)
static

◆ operator RecordValue() [6/12]

static implicit RecordValue.operator RecordValue ( byte []  value)
static

◆ operator RecordValue() [7/12]

static implicit RecordValue.operator RecordValue ( bool  value)
static

◆ operator RecordValue() [8/12]

static implicit RecordValue.operator RecordValue ( int?  value)
static

◆ operator RecordValue() [9/12]

static implicit RecordValue.operator RecordValue ( long?  value)
static

◆ operator RecordValue() [10/12]

static implicit RecordValue.operator RecordValue ( float?  value)
static

◆ operator RecordValue() [11/12]

static implicit RecordValue.operator RecordValue ( double?  value)
static

◆ operator RecordValue() [12/12]

static implicit RecordValue.operator RecordValue ( bool?  value)
static

◆ operator==()

static bool RecordValue.operator== ( RecordValue  left,
RecordValue  right 
)
static

◆ String()

static RecordValue RecordValue.String ( string  value)
static

Creates a string record value.

◆ ToString()

override string RecordValue.ToString ( )
inline

Definition at line 339 of file RecordValue.cs.

◆ TryGetBool()

bool RecordValue.TryGetBool ( out bool  value)
inline

Tries to get the value as a boolean.

Definition at line 277 of file RecordValue.cs.

◆ TryGetBytes()

bool RecordValue.TryGetBytes ( out byte? []  value)
inline

Tries to get the value as bytes.

Definition at line 260 of file RecordValue.cs.

◆ TryGetDouble()

bool RecordValue.TryGetDouble ( out double  value)
inline

Tries to get the value as a double.

Definition at line 231 of file RecordValue.cs.

◆ TryGetFloat()

bool RecordValue.TryGetFloat ( out float  value)
inline

Tries to get the value as a float.

Definition at line 219 of file RecordValue.cs.

◆ TryGetInt()

bool RecordValue.TryGetInt ( out int  value)
inline

Tries to get the value as an integer.

Definition at line 195 of file RecordValue.cs.

◆ TryGetLong()

bool RecordValue.TryGetLong ( out long  value)
inline

Tries to get the value as a long.

Definition at line 207 of file RecordValue.cs.

◆ TryGetString()

bool RecordValue.TryGetString ( out string?  value)
inline

Tries to get the value as a string.

Definition at line 243 of file RecordValue.cs.

Member Data Documentation

◆ IsNull

bool RecordValue.IsNull => _type == RecordValueType.Null

Returns true if this value is null.

Definition at line 53 of file RecordValue.cs.

◆ Type

RecordValueType RecordValue.Type => _type

Gets the type of this record value.

Definition at line 50 of file RecordValue.cs.


The documentation for this struct was generated from the following file: