Kinetica   C#   API  Version 7.2.3.1
ShardKeyValues Struct Reference

Collection of shard key column names and values. More...

Inherits IReadOnlyList<(string Name, ShardKeyValue Value)>.

+ Collaboration diagram for ShardKeyValues:

Public Member Functions

 ShardKeyValues (params(string Name, ShardKeyValue Value)[] values)
 Creates a ShardKeyValues collection from the specified values. More...
 
IEnumerator<(string Name, ShardKeyValue Value)> GetEnumerator ()
 Gets an enumerator for the shard key values. More...
 
IEnumerator IEnumerable. GetEnumerator ()
 

Static Public Member Functions

static ShardKeyValues Single (string name, ShardKeyValue value)
 Creates a ShardKeyValues collection with a single value. More...
 
static ShardKeyValues Two (string name1, ShardKeyValue value1, string name2, ShardKeyValue value2)
 Creates a ShardKeyValues collection with two values. More...
 
static ShardKeyValues Three (string name1, ShardKeyValue value1, string name2, ShardKeyValue value2, string name3, ShardKeyValue value3)
 Creates a ShardKeyValues collection with three values. More...
 
static ShardKeyValues Four (string name1, ShardKeyValue value1, string name2, ShardKeyValue value2, string name3, ShardKeyValue value3, string name4, ShardKeyValue value4)
 Creates a ShardKeyValues collection with four values. More...
 

Public Attributes

int Count => _values?.Length ?? 0
 Gets the number of shard key values. More...
 
string Name
 Gets the shard key value at the specified index. More...
 

Static Public Attributes

static ShardKeyValues Empty => new(Array.Empty<(string, ShardKeyValue)>())
 Creates an empty ShardKeyValues collection. More...
 

Properties

string ShardKeyValue Value this[int index] [get]
 

Detailed Description

Collection of shard key column names and values.

Equivalent to Rust's ShardKeyValues (SmallVec<[(&'static str, ShardKeyValue); 4]>).

This struct is optimized for small collections (up to 4 shard key columns) which is the common case.

Definition at line 317 of file ShardKeyValue.cs.

Constructor & Destructor Documentation

◆ ShardKeyValues()

ShardKeyValues.ShardKeyValues ( params(string Name, ShardKeyValue Value) []  values)
inline

Creates a ShardKeyValues collection from the specified values.

Definition at line 325 of file ShardKeyValue.cs.

Member Function Documentation

◆ Four()

static ShardKeyValues ShardKeyValues.Four ( string  name1,
ShardKeyValue  value1,
string  name2,
ShardKeyValue  value2,
string  name3,
ShardKeyValue  value3,
string  name4,
ShardKeyValue  value4 
)
static

Creates a ShardKeyValues collection with four values.

◆ GetEnumerator() [1/2]

IEnumerator<(string Name, ShardKeyValue Value)> ShardKeyValues.GetEnumerator ( )
inline

Gets an enumerator for the shard key values.

Definition at line 368 of file ShardKeyValue.cs.

◆ GetEnumerator() [2/2]

IEnumerator IEnumerable. ShardKeyValues.GetEnumerator ( )

◆ Single()

static ShardKeyValues ShardKeyValues.Single ( string  name,
ShardKeyValue  value 
)
static

Creates a ShardKeyValues collection with a single value.

◆ Three()

static ShardKeyValues ShardKeyValues.Three ( string  name1,
ShardKeyValue  value1,
string  name2,
ShardKeyValue  value2,
string  name3,
ShardKeyValue  value3 
)
static

Creates a ShardKeyValues collection with three values.

◆ Two()

static ShardKeyValues ShardKeyValues.Two ( string  name1,
ShardKeyValue  value1,
string  name2,
ShardKeyValue  value2 
)
static

Creates a ShardKeyValues collection with two values.

Member Data Documentation

◆ Count

int ShardKeyValues.Count => _values?.Length ?? 0

Gets the number of shard key values.

Definition at line 354 of file ShardKeyValue.cs.

◆ Empty

ShardKeyValues ShardKeyValues.Empty => new(Array.Empty<(string, ShardKeyValue)>())
static

Creates an empty ShardKeyValues collection.

Definition at line 322 of file ShardKeyValue.cs.

◆ Name

string ShardKeyValues.Name

Gets the shard key value at the specified index.

Definition at line 357 of file ShardKeyValue.cs.

Property Documentation

◆ this[int index]

string ShardKeyValue Value ShardKeyValues.this[int index]
get

Definition at line 358 of file ShardKeyValue.cs.


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