Skip to main content

Immutable collection of metadata about a Kinetica type. More…

Public Member Functions

 Type (string label, IEnumerable< Column > columns)
 Creates a Type from column definitions.
 
ColumnGetColumn (int index)
 Gets a column by index.
 
ColumnGetColumnByName (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 ()
 
 Type (string label, IEnumerable< Column > columns)
 Creates a Type from column definitions.
 
ColumnGetColumn (int index)
 Gets a column by index.
 
ColumnGetColumnByName (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< TypeFromTableAsync (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.
 
static TypeBuilder Builder (string label)
 Creates a TypeBuilder for fluent construction.
 
static async Task< TypeFromTableAsync (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< ColumnColumns [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
var recordType = await Type.FromTableAsync(kinetica, “my_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

Definition at line 32 of file Type.cs.

Constructor & Destructor Documentation

◆ Type() [1/2]

kinetica.Records.Type.Type (stringlabel,
IEnumerable< Column >columns )
inline

Creates a Type from column definitions.

Parameters
labelThe type label/name.
columnsThe column definitions.
Exceptions
ArgumentNullExceptionIf label or columns is null.
ArgumentExceptionIf columns is empty or contains duplicates.

Definition at line 49 of file Type.cs.

◆ Type() [2/2]

kinetica.Records.Type.Type (stringlabel,
IEnumerable< Column >columns )
inline

Creates a Type from column definitions.

Parameters
labelThe type label/name.
columnsThe column definitions.
Exceptions
ArgumentNullExceptionIf label or columns is null.
ArgumentExceptionIf columns is empty or contains duplicates.

Definition at line 49 of file Type.cs.

Member Function Documentation

◆ Builder() [1/2]

static TypeBuilder kinetica.Records.Type.Builder (stringlabel)
static

Creates a TypeBuilder for fluent construction.

Equivalent to Rust’s Type::builder().

Parameters
labelThe type label/name.
Returns
A new TypeBuilder instance.

◆ Builder() [2/2]

static TypeBuilder kinetica.Records.Type.Builder (stringlabel)
static

Creates a TypeBuilder for fluent construction.

Equivalent to Rust’s Type::builder().

Parameters
labelThe type label/name.
Returns
A new TypeBuilder instance.

◆ FromShowTableResponse() [1/2]

static Type kinetica.Records.Type.FromShowTableResponse (stringtableName,
kinetica.ShowTableResponseresponse )
inlinestatic

Build Type from ShowTableResponse.

Equivalent to Rust’s Type::from_table_response().

Definition at line 164 of file Type.cs.

◆ FromShowTableResponse() [2/2]

static Type kinetica.Records.Type.FromShowTableResponse (stringtableName,
kinetica.ShowTableResponseresponse )
inlinestatic

Build Type from ShowTableResponse.

Equivalent to Rust’s Type::from_table_response().

Definition at line 164 of file Type.cs.

◆ FromTable() [1/2]

static Type kinetica.Records.Type.FromTable (kinetica.Kineticakinetica,
stringtableName )
inlinestatic

Fetch type from an existing Kinetica table (synchronous version).

Parameters
kineticaThe Kinetica connection.
tableNameThe table name.
Returns
A Type representing the table schema.

Definition at line 145 of file Type.cs.

◆ FromTable() [2/2]

static Type kinetica.Records.Type.FromTable (kinetica.Kineticakinetica,
stringtableName )
inlinestatic

Fetch type from an existing Kinetica table (synchronous version).

Parameters
kineticaThe Kinetica connection.
tableNameThe table name.
Returns
A Type representing the table schema.

Definition at line 145 of file Type.cs.

◆ FromTableAsync() [1/2]

static async Task< Type > kinetica.Records.Type.FromTableAsync (kinetica.Kineticakinetica,
stringtableName )
inlinestatic

Fetch type from an existing Kinetica table.

Equivalent to Rust’s Type::from_table().

Parameters
kineticaThe Kinetica connection.
tableNameThe table name.
Returns
A Type representing the table schema.

Definition at line 124 of file Type.cs.

◆ FromTableAsync() [2/2]

static async Task< Type > kinetica.Records.Type.FromTableAsync (kinetica.Kineticakinetica,
stringtableName )
inlinestatic

Fetch type from an existing Kinetica table.

Equivalent to Rust’s Type::from_table().

Parameters
kineticaThe Kinetica connection.
tableNameThe table name.
Returns
A Type representing the table schema.

Definition at line 124 of file Type.cs.

◆ GetColumn() [1/2]

Column? kinetica.Records.Type.GetColumn (intindex)
inline

Gets a column by index.

Parameters
indexThe column index.
Returns
The column, or null if index is out of range.

Definition at line 308 of file Type.cs.

◆ GetColumn() [2/2]

Column? kinetica.Records.Type.GetColumn (intindex)
inline

Gets a column by index.

Parameters
indexThe column index.
Returns
The column, or null if index is out of range.

Definition at line 308 of file Type.cs.

◆ GetColumnByName() [1/2]

Column? kinetica.Records.Type.GetColumnByName (stringname)
inline

Gets a column by name.

Parameters
nameThe column name (case-insensitive).
Returns
The column, or null if not found.

Definition at line 320 of file Type.cs.

◆ GetColumnByName() [2/2]

Column? kinetica.Records.Type.GetColumnByName (stringname)
inline

Gets a column by name.

Parameters
nameThe column name (case-insensitive).
Returns
The column, or null if not found.

Definition at line 320 of file Type.cs.

◆ GetColumnIndex() [1/2]

int? kinetica.Records.Type.GetColumnIndex (stringname)
inline

Gets a column index by name.

Parameters
nameThe column name (case-insensitive).
Returns
The column index, or null if not found.

Definition at line 332 of file Type.cs.

◆ GetColumnIndex() [2/2]

int? kinetica.Records.Type.GetColumnIndex (stringname)
inline

Gets a column index by name.

Parameters
nameThe column name (case-insensitive).
Returns
The column index, or null if not found.

Definition at line 332 of file Type.cs.

◆ GetColumnIndexOrThrow() [1/2]

int kinetica.Records.Type.GetColumnIndexOrThrow (stringname)
inline

Gets a column index by name, throwing if not found.

Parameters
nameThe column name (case-insensitive).
Returns
The column index.
Exceptions
KeyNotFoundExceptionIf the column is not found.

Definition at line 345 of file Type.cs.

◆ GetColumnIndexOrThrow() [2/2]

int kinetica.Records.Type.GetColumnIndexOrThrow (stringname)
inline

Gets a column index by name, throwing if not found.

Parameters
nameThe column name (case-insensitive).
Returns
The column index.
Exceptions
KeyNotFoundExceptionIf the column is not found.

Definition at line 345 of file Type.cs.

◆ NewInstance() [1/2]

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.

◆ NewInstance() [2/2]

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() [1/2]

override string kinetica.Records.Type.ToString ()
inline

Definition at line 430 of file Type.cs.

◆ ToString() [2/2]

override string kinetica.Records.Type.ToString ()
inline

Definition at line 430 of file Type.cs.

Property Documentation

◆ ColumnCount

int kinetica.Records.Type.ColumnCount
get

Gets the number of columns.

Definition at line 282 of file Type.cs.

◆ Columns

IReadOnlyList< Column > kinetica.Records.Type.Columns
get

Gets all columns.

Definition at line 297 of file Type.cs.

◆ HasPrimaryKey

bool kinetica.Records.Type.HasPrimaryKey
get

Returns true if this type has a primary key.

Definition at line 294 of file Type.cs.

◆ HasShardKey

bool kinetica.Records.Type.HasShardKey
get

Returns true if this type has a shard key.

Definition at line 291 of file Type.cs.

◆ Label

string kinetica.Records.Type.Label
get

Gets the type label/name.

Definition at line 273 of file Type.cs.

◆ PrimaryKeyIndices

IReadOnlyList< int > kinetica.Records.Type.PrimaryKeyIndices
get

Gets the primary key column indices.

Definition at line 288 of file Type.cs.

◆ SchemaString

string kinetica.Records.Type.SchemaString
get

Gets the Avro schema string.

Definition at line 276 of file Type.cs.

◆ ShardKeyIndices

IReadOnlyList< int > kinetica.Records.Type.ShardKeyIndices
get

Gets the shard key column indices.

Definition at line 285 of file Type.cs.

◆ TypeId

string kinetica.Records.Type.TypeId
get

Gets the type ID (if fetched from Kinetica).

Definition at line 279 of file Type.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/Records/Type.cs
  • Kinetica/Records/Type.cs