|
Kinetica C# API
Version 7.2.3.1
|
A typed value for shard key computation. More...
Inherits IEquatable< ShardKeyValue >.
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... | |
| bool | AsBool () |
| Gets the value as a boolean. 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 | TryGetString (out string? value) |
| Tries to get the value as a string. More... | |
| 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. More... | |
| static ShardKeyValue | Int (int value) |
| Creates a 32-bit integer shard key value. More... | |
| static ShardKeyValue | Long (long value) |
| Creates a 64-bit integer shard key value. More... | |
| static ShardKeyValue | Float (float value) |
| Creates a 32-bit float shard key value. More... | |
| static ShardKeyValue | Double (double value) |
| Creates a 64-bit double shard key value. More... | |
| static ShardKeyValue | String (string value) |
| Creates a string shard key value. More... | |
| static ShardKeyValue | Date (string value) |
| Creates a date shard key value (YYYY-MM-DD format). More... | |
| static ShardKeyValue | DateTime (string value) |
| Creates a datetime shard key value (YYYY-MM-DD HH:MM:SS.mmm format). More... | |
| static ShardKeyValue | Time (string value) |
| Creates a time shard key value (HH:MM:SS.mmm format). More... | |
| static ShardKeyValue | Ipv4 (string value) |
| Creates an IPv4 shard key value (dotted-quad format). More... | |
| static ShardKeyValue | Decimal (string value) |
| Creates a decimal shard key value (string representation). More... | |
| static ShardKeyValue | Boolean (bool value) |
| Creates a boolean shard key value. More... | |
| static ShardKeyValue | Int8 (sbyte value) |
| Creates an 8-bit integer shard key value. More... | |
| static ShardKeyValue | Int16 (short value) |
| Creates a 16-bit integer shard key value. More... | |
| static ShardKeyValue | Timestamp (long value) |
| Creates a timestamp shard key value (milliseconds since Unix epoch). More... | |
| static ShardKeyValue | Uuid (string value) |
| Creates a UUID shard key value (standard format). More... | |
| static ShardKeyValue | Ulong (string value) |
| Creates an unsigned long shard key value (string representation). More... | |
| static bool | operator== (ShardKeyValue left, ShardKeyValue right) |
| static bool | operator != (ShardKeyValue left, ShardKeyValue right) |
Public Attributes | |
| ShardKeyValueType | Type => _type |
| Gets the type of this shard key value. More... | |
| bool | IsNull => _type == ShardKeyValueType.Null |
| Returns true if this value is null. More... | |
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 57 of file ShardKeyValue.cs.
|
inline |
Gets the value as a boolean.
| InvalidOperationException | If the value type is not Boolean. |
Definition at line 205 of file ShardKeyValue.cs.
|
inline |
Gets the value as a 64-bit double.
| InvalidOperationException | If the value type is not Double or Float. |
Definition at line 177 of file ShardKeyValue.cs.
|
inline |
Gets the value as a 32-bit float.
| InvalidOperationException | If the value type is not Float. |
Definition at line 165 of file ShardKeyValue.cs.
|
inline |
Gets the value as a 32-bit integer.
| InvalidOperationException | If the value type is not Int, Int8, Int16, or Boolean. |
Definition at line 138 of file ShardKeyValue.cs.
|
inline |
Gets the value as a 64-bit integer.
| InvalidOperationException | If the value type is not numeric. |
Definition at line 151 of file ShardKeyValue.cs.
|
inline |
Gets the value as a string.
| InvalidOperationException | If the value type is not a string-based type. |
Definition at line 189 of file ShardKeyValue.cs.
|
static |
Creates a boolean shard key value.
|
static |
Creates a date shard key value (YYYY-MM-DD format).
|
static |
Creates a datetime shard key value (YYYY-MM-DD HH:MM:SS.mmm format).
|
static |
Creates a decimal shard key value (string representation).
|
static |
Creates a 64-bit double shard key value.
|
inline |
Definition at line 257 of file ShardKeyValue.cs.
| override bool ShardKeyValue.Equals | ( | object? | obj | ) |
|
static |
Creates a 32-bit float shard key value.
|
inline |
Definition at line 275 of file ShardKeyValue.cs.
|
static |
Creates a 32-bit integer shard key value.
|
static |
Creates a 16-bit integer shard key value.
|
static |
Creates an 8-bit integer shard key value.
|
static |
Creates an IPv4 shard key value (dotted-quad format).
|
static |
Creates a 64-bit integer shard key value.
|
static |
Creates a null shard key value.
|
static |
|
static |
|
static |
Creates a string shard key value.
|
static |
Creates a time shard key value (HH:MM:SS.mmm format).
|
static |
Creates a timestamp shard key value (milliseconds since Unix epoch).
|
inline |
Definition at line 294 of file ShardKeyValue.cs.
|
inline |
Tries to get the value as an integer.
Definition at line 215 of file ShardKeyValue.cs.
|
inline |
Tries to get the value as a long.
Definition at line 227 of file ShardKeyValue.cs.
|
inline |
Tries to get the value as a string.
Definition at line 240 of file ShardKeyValue.cs.
|
static |
Creates an unsigned long shard key value (string representation).
|
static |
Creates a UUID shard key value (standard format).
| bool ShardKeyValue.IsNull => _type == ShardKeyValueType.Null |
Returns true if this value is null.
Definition at line 76 of file ShardKeyValue.cs.
| ShardKeyValueType ShardKeyValue.Type => _type |
Gets the type of this shard key value.
Definition at line 73 of file ShardKeyValue.cs.