Skip to main content

A typed value for shard key computation. More…

Inherits IEquatable, and IEquatable.

Public Member Functions

int AsInt ()
 Gets the value as a 32-bit integer.
 
long AsLong ()
 Gets the value as a 64-bit integer.
 
float AsFloat ()
 Gets the value as a 32-bit float.
 
double AsDouble ()
 Gets the value as a 64-bit double.
 
string? AsString ()
 Gets the value as a string.
 
bool AsBool ()
 Gets the value as a boolean.
 
bool TryGetInt (out int value)
 Tries to get the value as an integer.
 
bool TryGetLong (out long value)
 Tries to get the value as a long.
 
bool TryGetString (out string? value)
 Tries to get the value as a string.
 
bool Equals (ShardKeyValue other)
 
override bool Equals (object? obj)
 
override int GetHashCode ()
 
override string ToString ()
 
int AsInt ()
 Gets the value as a 32-bit integer.
 
long AsLong ()
 Gets the value as a 64-bit integer.
 
float AsFloat ()
 Gets the value as a 32-bit float.
 
double AsDouble ()
 Gets the value as a 64-bit double.
 
string? AsString ()
 Gets the value as a string.
 
bool AsBool ()
 Gets the value as a boolean.
 
bool TryGetInt (out int value)
 Tries to get the value as an integer.
 
bool TryGetLong (out long value)
 Tries to get the value as a long.
 
bool TryGetString (out string? value)
 Tries to get the value as a string.
 
bool Equals (ShardKeyValue other)
 
override bool Equals (object? obj)
 
override int GetHashCode ()
 
override string ToString ()
 

Static Public Member Functions

static ShardKeyValue Null ()
 Creates a null shard key value.
 
static ShardKeyValue Int (int value)
 Creates a 32-bit integer shard key value.
 
static ShardKeyValue Long (long value)
 Creates a 64-bit integer shard key value.
 
static ShardKeyValue Float (float value)
 Creates a 32-bit float shard key value.
 
static ShardKeyValue Double (double value)
 Creates a 64-bit double shard key value.
 
static ShardKeyValue String (string value)
 Creates a string shard key value.
 
static ShardKeyValue Date (string value)
 Creates a date shard key value (YYYY-MM-DD format).
 
static ShardKeyValue DateTime (string value)
 Creates a datetime shard key value (YYYY-MM-DD HH:MM:SS.mmm format).
 
static ShardKeyValue Time (string value)
 Creates a time shard key value (HH:MM:SS.mmm format).
 
static ShardKeyValue Ipv4 (string value)
 Creates an IPv4 shard key value (dotted-quad format).
 
static ShardKeyValue Decimal (string value)
 Creates a decimal shard key value (string representation).
 
static ShardKeyValue Boolean (bool value)
 Creates a boolean shard key value.
 
static ShardKeyValue Int8 (sbyte value)
 Creates an 8-bit integer shard key value.
 
static ShardKeyValue Int16 (short value)
 Creates a 16-bit integer shard key value.
 
static ShardKeyValue Timestamp (long value)
 Creates a timestamp shard key value (milliseconds since Unix epoch).
 
static ShardKeyValue Uuid (string value)
 Creates a UUID shard key value (standard format).
 
static ShardKeyValue Ulong (string value)
 Creates an unsigned long shard key value (string representation).
 
static bool operator== (ShardKeyValue left, ShardKeyValue right)
 Determines whether two ShardKeyValue instances are equal.
 
static bool operator!= (ShardKeyValue left, ShardKeyValue right)
 Determines whether two ShardKeyValue instances are not equal.
 
static ShardKeyValue Null ()
 Creates a null shard key value.
 
static ShardKeyValue Int (int value)
 Creates a 32-bit integer shard key value.
 
static ShardKeyValue Long (long value)
 Creates a 64-bit integer shard key value.
 
static ShardKeyValue Float (float value)
 Creates a 32-bit float shard key value.
 
static ShardKeyValue Double (double value)
 Creates a 64-bit double shard key value.
 
static ShardKeyValue String (string value)
 Creates a string shard key value.
 
static ShardKeyValue Date (string value)
 Creates a date shard key value (YYYY-MM-DD format).
 
static ShardKeyValue DateTime (string value)
 Creates a datetime shard key value (YYYY-MM-DD HH:MM:SS.mmm format).
 
static ShardKeyValue Time (string value)
 Creates a time shard key value (HH:MM:SS.mmm format).
 
static ShardKeyValue Ipv4 (string value)
 Creates an IPv4 shard key value (dotted-quad format).
 
static ShardKeyValue Decimal (string value)
 Creates a decimal shard key value (string representation).
 
static ShardKeyValue Boolean (bool value)
 Creates a boolean shard key value.
 
static ShardKeyValue Int8 (sbyte value)
 Creates an 8-bit integer shard key value.
 
static ShardKeyValue Int16 (short value)
 Creates a 16-bit integer shard key value.
 
static ShardKeyValue Timestamp (long value)
 Creates a timestamp shard key value (milliseconds since Unix epoch).
 
static ShardKeyValue Uuid (string value)
 Creates a UUID shard key value (standard format).
 
static ShardKeyValue Ulong (string value)
 Creates an unsigned long shard key value (string representation).
 
static bool operator== (ShardKeyValue left, ShardKeyValue right)
 Determines whether two ShardKeyValue instances are equal.
 
static bool operator!= (ShardKeyValue left, ShardKeyValue right)
 Determines whether two ShardKeyValue instances are not equal.
 

Properties

ShardKeyValueType Type [get]
 Gets the type of this shard key value.
 
bool IsNull [get]
 Returns true if this value is null.
 

Detailed Description

A typed value for shard key computation.

Equivalent to Rust’s ShardKeyValue enum.

This struct provides type-safe storage for shard key values without requiring boxing or string parsing at routing time.

Definition at line 55 of file ShardKeyValue.cs.

Member Function Documentation

◆ AsBool() [1/2]

bool kinetica.Records.ShardKeyValue.AsBool ()
inline

Gets the value as a boolean.

Exceptions
InvalidOperationExceptionIf the value type is not Boolean.

Definition at line 203 of file ShardKeyValue.cs.

◆ AsBool() [2/2]

bool kinetica.Records.ShardKeyValue.AsBool ()
inline

Gets the value as a boolean.

Exceptions
InvalidOperationExceptionIf the value type is not Boolean.

Definition at line 203 of file ShardKeyValue.cs.

◆ AsDouble() [1/2]

double kinetica.Records.ShardKeyValue.AsDouble ()
inline

Gets the value as a 64-bit double.

Exceptions
InvalidOperationExceptionIf the value type is not Double or Float.

Definition at line 175 of file ShardKeyValue.cs.

◆ AsDouble() [2/2]

double kinetica.Records.ShardKeyValue.AsDouble ()
inline

Gets the value as a 64-bit double.

Exceptions
InvalidOperationExceptionIf the value type is not Double or Float.

Definition at line 175 of file ShardKeyValue.cs.

◆ AsFloat() [1/2]

float kinetica.Records.ShardKeyValue.AsFloat ()
inline

Gets the value as a 32-bit float.

Exceptions
InvalidOperationExceptionIf the value type is not Float.

Definition at line 163 of file ShardKeyValue.cs.

◆ AsFloat() [2/2]

float kinetica.Records.ShardKeyValue.AsFloat ()
inline

Gets the value as a 32-bit float.

Exceptions
InvalidOperationExceptionIf the value type is not Float.

Definition at line 163 of file ShardKeyValue.cs.

◆ AsInt() [1/2]

int kinetica.Records.ShardKeyValue.AsInt ()
inline

Gets the value as a 32-bit integer.

Exceptions
InvalidOperationExceptionIf the value type is not Int, Int8, Int16, or Boolean.

Definition at line 136 of file ShardKeyValue.cs.

◆ AsInt() [2/2]

int kinetica.Records.ShardKeyValue.AsInt ()
inline

Gets the value as a 32-bit integer.

Exceptions
InvalidOperationExceptionIf the value type is not Int, Int8, Int16, or Boolean.

Definition at line 136 of file ShardKeyValue.cs.

◆ AsLong() [1/2]

long kinetica.Records.ShardKeyValue.AsLong ()
inline

Gets the value as a 64-bit integer.

Exceptions
InvalidOperationExceptionIf the value type is not numeric.

Definition at line 149 of file ShardKeyValue.cs.

◆ AsLong() [2/2]

long kinetica.Records.ShardKeyValue.AsLong ()
inline

Gets the value as a 64-bit integer.

Exceptions
InvalidOperationExceptionIf the value type is not numeric.

Definition at line 149 of file ShardKeyValue.cs.

◆ AsString() [1/2]

string? kinetica.Records.ShardKeyValue.AsString ()
inline

Gets the value as a string.

Exceptions
InvalidOperationExceptionIf the value type is not a string-based type.

Definition at line 187 of file ShardKeyValue.cs.

◆ AsString() [2/2]

string? kinetica.Records.ShardKeyValue.AsString ()
inline

Gets the value as a string.

Exceptions
InvalidOperationExceptionIf the value type is not a string-based type.

Definition at line 187 of file ShardKeyValue.cs.

◆ Boolean() [1/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.Boolean (boolvalue)
static

Creates a boolean shard key value.

◆ Boolean() [2/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.Boolean (boolvalue)
static

Creates a boolean shard key value.

◆ Date() [1/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.Date (stringvalue)
static

Creates a date shard key value (YYYY-MM-DD format).

◆ Date() [2/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.Date (stringvalue)
static

Creates a date shard key value (YYYY-MM-DD format).

◆ DateTime() [1/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.DateTime (stringvalue)
static

Creates a datetime shard key value (YYYY-MM-DD HH:MM:SS.mmm format).

◆ DateTime() [2/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.DateTime (stringvalue)
static

Creates a datetime shard key value (YYYY-MM-DD HH:MM:SS.mmm format).

◆ Decimal() [1/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.Decimal (stringvalue)
static

Creates a decimal shard key value (string representation).

◆ Decimal() [2/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.Decimal (stringvalue)
static

Creates a decimal shard key value (string representation).

◆ Double() [1/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.Double (doublevalue)
static

Creates a 64-bit double shard key value.

◆ Double() [2/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.Double (doublevalue)
static

Creates a 64-bit double shard key value.

◆ Equals() [1/4]

override bool kinetica.Records.ShardKeyValue.Equals (object?obj)

◆ Equals() [2/4]

override bool kinetica.Records.ShardKeyValue.Equals (object?obj)

◆ Equals() [3/4]

bool kinetica.Records.ShardKeyValue.Equals (ShardKeyValueother)
inline

Definition at line 256 of file ShardKeyValue.cs.

◆ Equals() [4/4]

bool kinetica.Records.ShardKeyValue.Equals (ShardKeyValueother)
inline

Definition at line 256 of file ShardKeyValue.cs.

◆ Float() [1/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.Float (floatvalue)
static

Creates a 32-bit float shard key value.

◆ Float() [2/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.Float (floatvalue)
static

Creates a 32-bit float shard key value.

◆ GetHashCode() [1/2]

override int kinetica.Records.ShardKeyValue.GetHashCode ()
inline

Definition at line 276 of file ShardKeyValue.cs.

◆ GetHashCode() [2/2]

override int kinetica.Records.ShardKeyValue.GetHashCode ()
inline

Definition at line 276 of file ShardKeyValue.cs.

◆ Int() [1/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.Int (intvalue)
static

Creates a 32-bit integer shard key value.

◆ Int() [2/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.Int (intvalue)
static

Creates a 32-bit integer shard key value.

◆ Int16() [1/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.Int16 (shortvalue)
static

Creates a 16-bit integer shard key value.

◆ Int16() [2/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.Int16 (shortvalue)
static

Creates a 16-bit integer shard key value.

◆ Int8() [1/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.Int8 (sbytevalue)
static

Creates an 8-bit integer shard key value.

◆ Int8() [2/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.Int8 (sbytevalue)
static

Creates an 8-bit integer shard key value.

◆ Ipv4() [1/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.Ipv4 (stringvalue)
static

Creates an IPv4 shard key value (dotted-quad format).

◆ Ipv4() [2/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.Ipv4 (stringvalue)
static

Creates an IPv4 shard key value (dotted-quad format).

◆ Long() [1/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.Long (longvalue)
static

Creates a 64-bit integer shard key value.

◆ Long() [2/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.Long (longvalue)
static

Creates a 64-bit integer shard key value.

◆ Null() [1/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.Null ()
static

Creates a null shard key value.

◆ Null() [2/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.Null ()
static

Creates a null shard key value.

◆ operator!=() [1/2]

static bool kinetica.Records.ShardKeyValue.operator!= (ShardKeyValueleft,
ShardKeyValueright )
static

Determines whether two ShardKeyValue instances are not equal.

◆ operator!=() [2/2]

static bool kinetica.Records.ShardKeyValue.operator!= (ShardKeyValueleft,
ShardKeyValueright )
static

Determines whether two ShardKeyValue instances are not equal.

◆ operator==() [1/2]

static bool kinetica.Records.ShardKeyValue.operator== (ShardKeyValueleft,
ShardKeyValueright )
static

Determines whether two ShardKeyValue instances are equal.

◆ operator==() [2/2]

static bool kinetica.Records.ShardKeyValue.operator== (ShardKeyValueleft,
ShardKeyValueright )
static

Determines whether two ShardKeyValue instances are equal.

◆ String() [1/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.String (stringvalue)
static

Creates a string shard key value.

◆ String() [2/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.String (stringvalue)
static

Creates a string shard key value.

◆ Time() [1/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.Time (stringvalue)
static

Creates a time shard key value (HH:MM:SS.mmm format).

◆ Time() [2/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.Time (stringvalue)
static

Creates a time shard key value (HH:MM:SS.mmm format).

◆ Timestamp() [1/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.Timestamp (longvalue)
static

Creates a timestamp shard key value (milliseconds since Unix epoch).

◆ Timestamp() [2/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.Timestamp (longvalue)
static

Creates a timestamp shard key value (milliseconds since Unix epoch).

◆ ToString() [1/2]

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

Definition at line 298 of file ShardKeyValue.cs.

◆ ToString() [2/2]

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

Definition at line 298 of file ShardKeyValue.cs.

◆ TryGetInt() [1/2]

bool kinetica.Records.ShardKeyValue.TryGetInt (out intvalue)
inline

Tries to get the value as an integer.

Definition at line 213 of file ShardKeyValue.cs.

◆ TryGetInt() [2/2]

bool kinetica.Records.ShardKeyValue.TryGetInt (out intvalue)
inline

Tries to get the value as an integer.

Definition at line 213 of file ShardKeyValue.cs.

◆ TryGetLong() [1/2]

bool kinetica.Records.ShardKeyValue.TryGetLong (out longvalue)
inline

Tries to get the value as a long.

Definition at line 225 of file ShardKeyValue.cs.

◆ TryGetLong() [2/2]

bool kinetica.Records.ShardKeyValue.TryGetLong (out longvalue)
inline

Tries to get the value as a long.

Definition at line 225 of file ShardKeyValue.cs.

◆ TryGetString() [1/2]

bool kinetica.Records.ShardKeyValue.TryGetString (out string?value)
inline

Tries to get the value as a string.

Definition at line 238 of file ShardKeyValue.cs.

◆ TryGetString() [2/2]

bool kinetica.Records.ShardKeyValue.TryGetString (out string?value)
inline

Tries to get the value as a string.

Definition at line 238 of file ShardKeyValue.cs.

◆ Ulong() [1/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.Ulong (stringvalue)
static

Creates an unsigned long shard key value (string representation).

◆ Ulong() [2/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.Ulong (stringvalue)
static

Creates an unsigned long shard key value (string representation).

◆ Uuid() [1/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.Uuid (stringvalue)
static

Creates a UUID shard key value (standard format).

◆ Uuid() [2/2]

static ShardKeyValue kinetica.Records.ShardKeyValue.Uuid (stringvalue)
static

Creates a UUID shard key value (standard format).

Property Documentation

◆ IsNull

bool kinetica.Records.ShardKeyValue.IsNull
get

Returns true if this value is null.

Definition at line 74 of file ShardKeyValue.cs.

◆ Type

ShardKeyValueType kinetica.Records.ShardKeyValue.Type
get

Gets the type of this shard key value.

Definition at line 71 of file ShardKeyValue.cs.


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