Immutable collection of metadata about a Kinetica type.
More...
Immutable collection of metadata about a Kinetica type.
Equivalent to Rust's Type struct.
This class contains all the information needed to create and encode records of this type, including schema information, column metadata, and key indices.
record.Put("name", "Alice");
Definition at line 36 of file Type.cs.
◆ Type()
| Type.Type |
( |
string |
label, |
|
|
IEnumerable< Column > |
columns |
|
) |
| |
|
inline |
Creates a Type from column definitions.
- Parameters
-
| label | The type label/name. |
| columns | The column definitions. |
- Exceptions
-
| ArgumentNullException | If label or columns is null. |
| ArgumentException | If columns is empty or contains duplicates. |
Definition at line 53 of file Type.cs.
◆ Builder()
Creates a TypeBuilder for fluent construction.
Equivalent to Rust's Type::builder().
- Parameters
-
| label | The type label/name. |
- Returns
- A new TypeBuilder instance.
◆ FromShowTableResponse()
◆ FromTable()
Fetch type from an existing Kinetica table (synchronous version).
- Parameters
-
| kinetica | The Kinetica connection. |
| tableName | The table name. |
- Returns
- A Type representing the table schema.
Definition at line 149 of file Type.cs.
◆ FromTableAsync()
Fetch type from an existing Kinetica table.
Equivalent to Rust's Type::from_table().
- Parameters
-
| kinetica | The Kinetica connection. |
| tableName | The table name. |
- Returns
- A Type representing the table schema.
Definition at line 128 of file Type.cs.
◆ GetColumn()
| Column? Type.GetColumn |
( |
int |
index | ) |
|
|
inline |
Gets a column by index.
- Parameters
-
- Returns
- The column, or null if index is out of range.
Definition at line 312 of file Type.cs.
◆ GetColumnByName()
| Column? Type.GetColumnByName |
( |
string |
name | ) |
|
|
inline |
Gets a column by name.
- Parameters
-
| name | The column name (case-insensitive). |
- Returns
- The column, or null if not found.
Definition at line 324 of file Type.cs.
◆ GetColumnIndex()
| int? Type.GetColumnIndex |
( |
string |
name | ) |
|
|
inline |
Gets a column index by name.
- Parameters
-
| name | The column name (case-insensitive). |
- Returns
- The column index, or null if not found.
Definition at line 336 of file Type.cs.
◆ GetColumnIndexOrThrow()
| int Type.GetColumnIndexOrThrow |
( |
string |
name | ) |
|
|
inline |
Gets a column index by name, throwing if not found.
- Parameters
-
| name | The column name (case-insensitive). |
- Returns
- The column index.
- Exceptions
-
| KeyNotFoundException | If the column is not found. |
Definition at line 349 of file Type.cs.
◆ NewInstance()
Creates a new GenericRecord instance of this type.
Equivalent to Rust's Type::new_instance().
- Returns
- A new GenericRecord with all values initialized to null.
◆ ToString()
| override string Type.ToString |
( |
| ) |
|
|
inline |
◆ ColumnCount
| int Type.ColumnCount => _columns.Count |
Gets the number of columns.
Definition at line 286 of file Type.cs.
◆ Columns
| IReadOnlyList<Column> Type.Columns => _columns |
Gets all columns.
Definition at line 301 of file Type.cs.
◆ HasPrimaryKey
| bool Type.HasPrimaryKey => _primaryKeyIndices.Count > 0 |
Returns true if this type has a primary key.
Definition at line 298 of file Type.cs.
◆ HasShardKey
| bool Type.HasShardKey => _shardKeyIndices.Count > 0 |
Returns true if this type has a shard key.
Definition at line 295 of file Type.cs.
◆ Label
| string Type.Label => _label |
Gets the type label/name.
Definition at line 277 of file Type.cs.
◆ PrimaryKeyIndices
| IReadOnlyList<int> Type.PrimaryKeyIndices => _primaryKeyIndices |
Gets the primary key column indices.
Definition at line 292 of file Type.cs.
◆ SchemaString
| string Type.SchemaString => _schemaString |
◆ ShardKeyIndices
| IReadOnlyList<int> Type.ShardKeyIndices => _shardKeyIndices |
Gets the shard key column indices.
Definition at line 289 of file Type.cs.
◆ TypeId
| string? Type.TypeId => _typeId |
The documentation for this class was generated from the following file: