Object that permits efficient retrieval of records from GPUdb using GenericRecord and dictionary-based records, with support for multi-head access and HA failover. More…
Public Member Functions | |
| GenericRecordRetriever (Kinetica kdb, string tableName, KineticaType ktype, WorkerList? workers=null) | |
| Create a GenericRecordRetriever for the given table. | |
| 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. | |
| 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. | |
| bool | HasAllShardKeyValues (IDictionary< string, object?> keyValues) |
| Checks if the given key values contain all required shard key columns. | |
| int | GetWorkerIndexForKey (IDictionary< string, object?> keyValues) |
| Computes the worker index that would handle records with the given key values. | |
| GenericRecordRetriever (Kinetica kdb, string tableName, KineticaType ktype, WorkerList? workers=null) | |
| Create a GenericRecordRetriever for the given table. | |
| 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. | |
| 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. | |
| bool | HasAllShardKeyValues (IDictionary< string, object?> keyValues) |
| Checks if the given key values contain all required shard key columns. | |
| int | GetWorkerIndexForKey (IDictionary< string, object?> keyValues) |
| Computes the worker index that would handle records with the given key values. | |
Properties | |
| Kinetica | KineticaDB [get] |
| Gets the Kinetica connection. | |
| string | TableName [get] |
| Gets the table name. | |
| KineticaType | KType [get] |
| Gets the KineticaType for the table. | |
| int | NumClusterSwitches [get] |
| Gets the number of cluster switches due to HA failover. | |
| int | HARingSize [get] |
| Gets the HA ring size. | |
| bool | MultiHeadEnabled [get] |
| Gets whether multi-head retrieval is enabled. | |
| IList< string > | ShardKeyColumnNames [get] |
| Gets the shard key column names, or empty if table is not sharded. | |
Detailed Description
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 14 of file GenericRecordRetriever.cs.
Constructor & Destructor Documentation
◆ GenericRecordRetriever() [1/2]
| 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 91 of file GenericRecordRetriever.cs.
◆ GenericRecordRetriever() [2/2]
| 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 91 of file GenericRecordRetriever.cs.
Member Function Documentation
◆ GetRecordsByExpression() [1/2]
| 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 405 of file GenericRecordRetriever.cs.
◆ GetRecordsByExpression() [2/2]
| 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 405 of file GenericRecordRetriever.cs.
◆ GetRecordsByKey() [1/2]
| 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 333 of file GenericRecordRetriever.cs.
◆ GetRecordsByKey() [2/2]
| 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 333 of file GenericRecordRetriever.cs.
◆ GetWorkerIndexForKey() [1/2]
| 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 447 of file GenericRecordRetriever.cs.
◆ GetWorkerIndexForKey() [2/2]
| 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 447 of file GenericRecordRetriever.cs.
◆ HasAllShardKeyValues() [1/2]
| inline |
Checks if the given key values contain all required shard key columns.
| keyValues | Dictionary of column name -> value. |
Definition at line 427 of file GenericRecordRetriever.cs.
◆ HasAllShardKeyValues() [2/2]
| inline |
Checks if the given key values contain all required shard key columns.
| keyValues | Dictionary of column name -> value. |
Definition at line 427 of file GenericRecordRetriever.cs.
Property Documentation
◆ HARingSize
| get |
Gets the HA ring size.
Definition at line 68 of file GenericRecordRetriever.cs.
◆ KineticaDB
| get |
Gets the Kinetica connection.
Definition at line 48 of file GenericRecordRetriever.cs.
◆ KType
| get |
Gets the KineticaType for the table.
Definition at line 58 of file GenericRecordRetriever.cs.
◆ MultiHeadEnabled
| get |
Gets whether multi-head retrieval is enabled.
Definition at line 73 of file GenericRecordRetriever.cs.
◆ NumClusterSwitches
| get |
Gets the number of cluster switches due to HA failover.
Definition at line 63 of file GenericRecordRetriever.cs.
◆ ShardKeyColumnNames
| get |
Gets the shard key column names, or empty if table is not sharded.
Definition at line 78 of file GenericRecordRetriever.cs.
◆ TableName
| get |
Gets the table name.
Definition at line 53 of file GenericRecordRetriever.cs.
The documentation for this class was generated from the following files:
- _build/public-os_ubuntu24.04-arch_amd64-cc_gcc_13.3.0/install/Kinetica/Utils/GenericRecordRetriever.cs
- Kinetica/Utils/GenericRecordRetriever.cs