Immutable collection of metadata about a Kinetica type. More…
Public Member Functions | |
| Type (string label, IEnumerable< Column > columns) | |
| Creates a Type from column definitions. | |
| Column? | GetColumn (int index) |
| Gets a column by index. | |
| Column? | GetColumnByName (string name) |
| Gets a column by name. | |
| int? | GetColumnIndex (string name) |
| Gets a column index by name. | |
| int | GetColumnIndexOrThrow (string name) |
| Gets a column index by name, throwing if not found. | |
| GenericRecord | NewInstance () |
| Creates a new GenericRecord instance of this type. | |
| override string | ToString () |
Static Public Member Functions | |
| static TypeBuilder | Builder (string label) |
| Creates a TypeBuilder for fluent construction. | |
| static async Task< Type > | FromTableAsync (kinetica.Kinetica kinetica, string tableName) |
| Fetch type from an existing Kinetica table. | |
| static Type | FromTable (kinetica.Kinetica kinetica, string tableName) |
| Fetch type from an existing Kinetica table (synchronous version). | |
| static Type | FromShowTableResponse (string tableName, kinetica.ShowTableResponse response) |
| Build Type from ShowTableResponse. | |
Properties | |
| string | Label [get] |
| Gets the type label/name. | |
| string | SchemaString [get] |
| Gets the Avro schema string. | |
| string? | TypeId [get] |
| Gets the type ID (if fetched from Kinetica). | |
| int | ColumnCount [get] |
| Gets the number of columns. | |
| IReadOnlyList< int > | ShardKeyIndices [get] |
| Gets the shard key column indices. | |
| IReadOnlyList< int > | PrimaryKeyIndices [get] |
| Gets the primary key column indices. | |
| bool | HasShardKey [get] |
| Returns true if this type has a shard key. | |
| bool | HasPrimaryKey [get] |
| Returns true if this type has a primary key. | |
| IReadOnlyList< Column > | Columns [get] |
| Gets all columns. | |
Detailed Description
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.
// From existing table
// Or create programmatically
var recordType = Type.Builder(“my_record”)
.AddIntColumn(“id”).PrimaryKey().ShardKey()
.AddStringColumn(“name”)
.AddDoubleColumn(“score”).Nullable()
.Build();
// Create records
var record = recordType.NewInstance();
record.Put(0, 42);
record.Put(“name”, “Alice”);
Type(string label, IEnumerable< Column > columns)
Creates a Type from column definitions.
Definition Type.cs:49
Definition AvroEncoders.cs:10
Constructor & Destructor Documentation
◆ Type()
| inline |
Member Function Documentation
◆ Builder()
| static |
Creates a TypeBuilder for fluent construction.
Equivalent to Rust’s Type::builder().
Parameters
| label | The type label/name. |
Returns
A new TypeBuilder instance.
◆ FromShowTableResponse()
| inlinestatic |
Build Type from ShowTableResponse.
Equivalent to Rust’s Type::from_table_response().
◆ FromTable()
| inlinestatic |
◆ FromTableAsync()
| inlinestatic |
◆ GetColumn()
| inline |
◆ GetColumnByName()
| inline |
◆ GetColumnIndex()
| inline |
◆ GetColumnIndexOrThrow()
| inline |
◆ NewInstance()
| GenericRecord kinetica.Records.Type.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()
Property Documentation
◆ ColumnCount
| get |
◆ Columns
| get |
◆ HasPrimaryKey
| get |
◆ HasShardKey
| get |
◆ Label
| get |
◆ PrimaryKeyIndices
| get |
◆ SchemaString
| get |
◆ ShardKeyIndices
| get |
◆ TypeId
| get |
The documentation for this class was generated from the following file:
- Kinetica/Records/Type.cs