|
Kinetica C# API
Version 7.2.3.1
|
Object that permits efficient retrieval of records from GPUdb using GenericRecord More...
Collaboration diagram for GenericRecordRetriever:Public Member Functions | |
| GenericRecordRetriever (Kinetica kdb, string tableName, KineticaType ktype, WorkerList? workers=null) | |
| Create a GenericRecordRetriever for the given table. More... | |
| ExecuteSqlResponse | GetRecordsByKey (IDictionary< string, object?> keyValues, string? expression=null, IList< string >? columns=null, long offset=0, long limit=-9999) |
| Retrieves records for a given shard key using SQL with fast index lookup. More... | |
| ExecuteSqlResponse | GetRecordsByExpression (string whereExpression, IList< string >? columns=null, long offset=0, long limit=-9999) |
| Retrieves records using a SQL WHERE clause expression with fast index lookup optimization. More... | |
| bool | HasAllShardKeyValues (IDictionary< string, object?> keyValues) |
| Checks if the given key values contain all required shard key columns. More... | |
| int | GetWorkerIndexForKey (IDictionary< string, object?> keyValues) |
| Computes the worker index that would handle records with the given key values. More... | |
Public Attributes | |
| Kinetica | KineticaDB => _kinetica |
| Gets the Kinetica connection. More... | |
| string | TableName => _tableName |
| Gets the table name. More... | |
| KineticaType | KType => _ktype |
| Gets the KineticaType for the table. More... | |
| int | NumClusterSwitches => _numClusterSwitches |
| Gets the number of cluster switches due to HA failover. More... | |
| int | HARingSize => _dbHaRingSize |
| Gets the HA ring size. More... | |
| bool | MultiHeadEnabled => _multiHeadEnabled |
| Gets whether multi-head retrieval is enabled. More... | |
| IList< string > | ShardKeyColumnNames => _shardKeyBuilder?.GetRoutingColumnNames() ?? new List<string>() |
| Gets the shard key column names, or empty if table is not sharded. More... | |
Object that permits efficient retrieval of records from GPUdb using GenericRecord
and dictionary-based records, with support for multi-head access and HA failover.
This is used by the ADO.NET driver for key lookup operations where we don't have strongly-typed record classes. It uses SQL execution with optimized expression building based on shard keys.
GenericRecordRetriever instances are thread safe and may be used from any number of threads simultaneously.
Definition at line 18 of file GenericRecordRetriever.cs.
|
inline |
Create a GenericRecordRetriever for the given table.
| kdb | The Kinetica connection. |
| tableName | The table name to retrieve from. |
| ktype | The KineticaType for the table. |
| workers | Optional worker list for multi-head retrieval. |
Definition at line 95 of file GenericRecordRetriever.cs.
|
inline |
Retrieves records using a SQL WHERE clause expression with fast index lookup optimization.
| whereExpression | SQL WHERE clause expression. |
| columns | Optional list of columns to retrieve. Null means all columns. |
| offset | Starting record offset (default 0). |
| limit | Maximum number of records to retrieve (default -9999 means no limit). |
Definition at line 409 of file GenericRecordRetriever.cs.
|
inline |
Retrieves records for a given shard key using SQL with fast index lookup.
All records matching the key and satisfying the optional additional expression will be returned, up to the specified limit.
| keyValues | Dictionary of column name -> value for the shard key columns. |
| expression | An optional additional filter expression. |
| columns | Optional list of columns to retrieve. Null means all columns (SELECT *). |
| offset | Starting record offset (default 0). |
| limit | Maximum number of records to retrieve (default -9999 means no limit). |
Definition at line 337 of file GenericRecordRetriever.cs.
|
inline |
Computes the worker index that would handle records with the given key values.
This is useful for understanding data distribution.
| keyValues | Dictionary of column name -> value for the shard key columns. |
Definition at line 451 of file GenericRecordRetriever.cs.
|
inline |
Checks if the given key values contain all required shard key columns.
| keyValues | Dictionary of column name -> value. |
Definition at line 431 of file GenericRecordRetriever.cs.
| int GenericRecordRetriever.HARingSize => _dbHaRingSize |
Gets the HA ring size.
Definition at line 72 of file GenericRecordRetriever.cs.
| Kinetica GenericRecordRetriever.KineticaDB => _kinetica |
Gets the Kinetica connection.
Definition at line 52 of file GenericRecordRetriever.cs.
| KineticaType GenericRecordRetriever.KType => _ktype |
Gets the KineticaType for the table.
Definition at line 62 of file GenericRecordRetriever.cs.
| bool GenericRecordRetriever.MultiHeadEnabled => _multiHeadEnabled |
Gets whether multi-head retrieval is enabled.
Definition at line 77 of file GenericRecordRetriever.cs.
| int GenericRecordRetriever.NumClusterSwitches => _numClusterSwitches |
Gets the number of cluster switches due to HA failover.
Definition at line 67 of file GenericRecordRetriever.cs.
| IList<string> GenericRecordRetriever.ShardKeyColumnNames => _shardKeyBuilder?.GetRoutingColumnNames() ?? new List<string>() |
Gets the shard key column names, or empty if table is not sharded.
Definition at line 82 of file GenericRecordRetriever.cs.
| string GenericRecordRetriever.TableName => _tableName |
Gets the table name.
Definition at line 57 of file GenericRecordRetriever.cs.