Kinetica   C#   API  Version 7.2.3.1
RecordKeyBuilder< T > Class Template Reference

Builds or creates RecordKey objects based on a given record. More...

Public Member Functions

 RecordKeyBuilder (Type type)
 Creates a RecordKeyBuilder from a Type definition. More...
 
 RecordKeyBuilder (kinetica.KineticaType ktype, bool isPrimaryKey=false)
 Creates a RecordKeyBuilder from a KineticaType (for backwards compatibility). More...
 
RecordKeyBuild (ShardKeyValues values)
 Builds a RecordKey from the given shard key values. More...
 
 RecordKeyBuilder (bool is_primary_key, KineticaType ktype)
 
RecordKey build (T record)
 Build a RecordKey object based on a record. More...
 
string buildExpression (T record)
 Build an expression to be passed to getRecords in the option. More...
 
bool hasKey ()
 Returns whether this builder builds any routing keys. More...
 
bool hasSameKey (RecordKeyBuilder< T > other)
 Returns if other is equivalent to this builder. More...
 

Public Attributes

bool HasKey => _shardKeyIndices.Count > 0
 Returns true if this builder has shard key columns. More...
 
int KeyColumnCount => _shardKeyIndices.Count
 Gets the number of shard key columns. More...
 

Detailed Description

Builds or creates RecordKey objects based on a given record.

Template Parameters
TThe type of record to build keys off of.

Definition at line 11 of file RecordKeyBuilder.cs.

Constructor & Destructor Documentation

◆ RecordKeyBuilder() [1/3]

RecordKeyBuilder< T >.RecordKeyBuilder ( Type  type)
inline

Creates a RecordKeyBuilder from a Type definition.

Definition at line 28 of file RecordKeyBuilder.cs.

◆ RecordKeyBuilder() [2/3]

RecordKeyBuilder< T >.RecordKeyBuilder ( kinetica.KineticaType  ktype,
bool  isPrimaryKey = false 
)
inline

Creates a RecordKeyBuilder from a KineticaType (for backwards compatibility).

Definition at line 64 of file RecordKeyBuilder.cs.

◆ RecordKeyBuilder() [3/3]

RecordKeyBuilder< T >.RecordKeyBuilder ( bool  is_primary_key,
KineticaType  ktype 
)
inline

Definition at line 65 of file RecordKeyBuilder.cs.

Member Function Documentation

◆ Build()

RecordKey? RecordKeyBuilder< T >.Build ( ShardKeyValues  values)
inline

Builds a RecordKey from the given shard key values.

Definition at line 118 of file RecordKeyBuilder.cs.

◆ build()

RecordKey RecordKeyBuilder< T >.build ( record)
inline

Build a RecordKey object based on a record.

Parameters
recordThe object based on which the key is to be built.
Returns
The record key that helps is routing this record correctly.

Definition at line 366 of file RecordKeyBuilder.cs.

◆ buildExpression()

string RecordKeyBuilder< T >.buildExpression ( record)
inline

Build an expression to be passed to getRecords in the option.

The expression is based on the record provided, but only values of shard columns will be used, the rest will be ignored.

Parameters
recordThe object based on which the expression is to be built.
Returns
The record key that helps is routing this record correctly.

Definition at line 508 of file RecordKeyBuilder.cs.

◆ hasKey()

bool RecordKeyBuilder< T >.hasKey ( )
inline

Returns whether this builder builds any routing keys.

That is, if there are any routing columns in the relevant record type.

Returns
Bool value indicating if this builder builds keys.

Definition at line 596 of file RecordKeyBuilder.cs.

◆ hasSameKey()

bool RecordKeyBuilder< T >.hasSameKey ( RecordKeyBuilder< T >  other)
inline

Returns if other is equivalent to this builder.

Parameters
otherThe other key builder.
Returns
Whether the other builder is the same as this one.

Definition at line 608 of file RecordKeyBuilder.cs.

Member Data Documentation

◆ HasKey

bool RecordKeyBuilder< T >.HasKey => _shardKeyIndices.Count > 0

Returns true if this builder has shard key columns.

Definition at line 108 of file RecordKeyBuilder.cs.

◆ KeyColumnCount

int RecordKeyBuilder< T >.KeyColumnCount => _shardKeyIndices.Count

Gets the number of shard key columns.

Definition at line 113 of file RecordKeyBuilder.cs.


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