Kinetica   C#   API  Version 7.2.3.1
GenericRecordKeyBuilder Class Reference

Builds expressions and routing keys for GenericRecord and dictionary-based records. More...

Public Member Functions

 GenericRecordKeyBuilder (bool isPrimaryKey, KineticaType ktype)
 Creates a GenericRecordKeyBuilder for the given KineticaType. More...
 
bool HasKey ()
 Returns whether this builder has any routing key columns. More...
 
IList< string > GetRoutingColumnNames ()
 Gets the names of the routing key columns. More...
 
string? BuildExpression (IDictionary< string, object?> keyValues)
 Builds a SQL expression for looking up records by key values. More...
 

Detailed Description

Builds expressions and routing keys for GenericRecord and dictionary-based records.

Used for key lookup in the ADO.NET driver where we don't have strongly-typed records.

Definition at line 12 of file GenericRecordKeyBuilder.cs.

Constructor & Destructor Documentation

◆ GenericRecordKeyBuilder()

GenericRecordKeyBuilder.GenericRecordKeyBuilder ( bool  isPrimaryKey,
KineticaType  ktype 
)
inline

Creates a GenericRecordKeyBuilder for the given KineticaType.

Parameters
isPrimaryKeyIf true, uses primary key columns; otherwise uses shard key columns.
ktypeThe KineticaType describing the table schema.

Definition at line 65 of file GenericRecordKeyBuilder.cs.

Member Function Documentation

◆ BuildExpression()

string? GenericRecordKeyBuilder.BuildExpression ( IDictionary< string, object?>  keyValues)
inline

Builds a SQL expression for looking up records by key values.

Parameters
keyValuesDictionary of column name -> value for the key columns.
Returns
A SQL expression like "(col1 = 'val1' and col2 = 123)"

Definition at line 309 of file GenericRecordKeyBuilder.cs.

◆ GetRoutingColumnNames()

IList<string> GenericRecordKeyBuilder.GetRoutingColumnNames ( )
inline

Gets the names of the routing key columns.

Definition at line 299 of file GenericRecordKeyBuilder.cs.

◆ HasKey()

bool GenericRecordKeyBuilder.HasKey ( )
inline

Returns whether this builder has any routing key columns.

Definition at line 291 of file GenericRecordKeyBuilder.cs.


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