# C# gRPC driver

## [](#_connection_header)Connection

### [](#_TypeDB)TypeDB

`class`

**Package**: `TypeDB.Driver`

#### [](#_static_IDriver_TypeDB_Driver_TypeDB_Driver_string_address_Credentials_credentials_DriverOptions_driverOptions_)method `Driver`

```cs
static IDriver Driver(string address, Credentials credentials, DriverOptions driverOptions)
```

Open a TypeDB Driver to a TypeDB server available at the provided address.

Input parameters   

Name

Description

Type

`address`

The address of the TypeDB server.

`string`

`credentials`

The credentials to connect with.

`Credentials`

`driverOptions`

The driver connection options to connect with.

`DriverOptions`

Returns

`IDriver`

Code examples

```cs
TypeDB.Driver(address, credentials, driverOptions);
```

#### [](#_static_IDriver_TypeDB_Driver_TypeDB_Driver_ISet_string_addresses_Credentials_credentials_DriverOptions_driverOptions_)method `Driver`

```cs
static IDriver Driver(ISet< string > addresses, Credentials credentials, DriverOptions driverOptions)
```

Open a TypeDB Driver to a TypeDB cluster available at the provided addresses.

Input parameters   

Name

Description

Type

`addresses`

The addresses of TypeDB cluster servers for connection.

`ISet< string >`

`credentials`

The credentials to connect with.

`Credentials`

`driverOptions`

The driver connection options to connect with.

`DriverOptions`

Returns

`IDriver`

Code examples

```cs
TypeDB.Driver(addresses, credentials, driverOptions);
```

#### [](#_static_IDriver_TypeDB_Driver_TypeDB_Driver_IDictionary_string_string_addressTranslation_Credentials_credentials_DriverOptions_driverOptions_)method `Driver`

```cs
static IDriver Driver(IDictionary< string, string > addressTranslation, Credentials credentials, DriverOptions driverOptions)
```

Open a TypeDB Driver to a TypeDB cluster, using the provided address translation.

Input parameters   

Name

Description

Type

`addressTranslation`

The translation of public TypeDB cluster server addresses (keys) to server-side private addresses (values).

`IDictionary< string, string >`

`credentials`

The credentials to connect with.

`Credentials`

`driverOptions`

The driver connection options to connect with.

`DriverOptions`

Returns

`IDriver`

Code examples

```cs
TypeDB.Driver(addressTranslation, credentials, driverOptions); TypeDB.Driver Definition TypeDB.cs:29 TypeDB Definition TypeDB.cs:29
```

### [](#_IDriver)IDriver

`class`

**Package**: `TypeDB.Driver.Api`

#### [](#_void_TypeDB_Driver_Api_IDriver_Close_)method `Close`

```cs
void Close()
```

Closes the driver. Before instantiating a new driver, the driver that’s currently open should first be closed.

Returns

`void`

Code examples

```cs
driver.Close();
```

#### [](#_IDatabaseManager_TypeDB_Driver_Api_IDriver_Databases)method `Databases`

```cs
IDatabaseManager TypeDB.Driver.Api.IDriver.Databases
```

The `IDatabaseManager` for this connection, providing access to database management methods.

Returns

`IDatabaseManager`

Code examples

```cs
driver.Databases;
```

#### [](#_IServer_TypeDB_Driver_Api_IDriver_GetPrimaryServer_ServerRouting_serverRouting_null_)method `GetPrimaryServer`

```cs
IServer? GetPrimaryServer(ServerRouting? serverRouting = null)
```

Returns the primary server for this driver connection.

Input parameters   

Name

Description

Type

`serverRouting`

The server routing to use for the operation.

Returns

`IServer?`

Code examples

```cs
driver.GetPrimaryServer(new ServerRouting.Auto()); TypeDB.Driver.Api.ServerRouting.Auto Automatic server routing. Driver automatically selects the server (primary in clusters). Definition ServerRouting.cs:47 TypeDB.Driver.Api.ServerRouting Server routing directive for operations against a distributed server. All driver methods have default... Definition ServerRouting.cs:28
```

#### [](#_ServerVersion_TypeDB_Driver_Api_IDriver_GetServerVersion_ServerRouting_serverRouting_null_)method `GetServerVersion`

```cs
ServerVersion GetServerVersion(ServerRouting? serverRouting = null)
```

Retrieves the server’s version.

Input parameters   

Name

Description

Type

`serverRouting`

The server routing to use for the operation.

Returns

`ServerVersion`

Code examples

```cs
driver.GetServerVersion();
```

#### [](#_ISet_IServer_TypeDB_Driver_Api_IDriver_GetServers_ServerRouting_serverRouting_null_)method `GetServers`

```cs
ISet< IServer > GetServers(ServerRouting? serverRouting = null)
```

Set of servers for this driver connection.

Input parameters   

Name

Description

Type

`serverRouting`

The server routing to use for the operation.

Returns

`ISet< IServer >`

Code examples

```cs
driver.GetServers(new ServerRouting.Auto());
```

#### [](#_bool_TypeDB_Driver_Api_IDriver_IsOpen_)method `IsOpen`

```cs
bool IsOpen()
```

Checks whether this connection is presently open.

Returns

`bool`

Code examples

```cs
driver.IsOpen();
```

#### [](#_ITransaction_TypeDB_Driver_Api_IDriver_Transaction_string_database_TransactionType_type_)method `Transaction`

```cs
ITransaction Transaction(string database, TransactionType type)
```

Opens a transaction to the given database on the running TypeDB server.

Input parameters   

Name

Description

Type

`database`

The name of the database with which the transaction connects.

`string`

`type`

The type of transaction to be created (READ, WRITE, or SCHEMA).

`TransactionType`

Returns

`ITransaction`

Code examples

```cs
driver.Transaction(database, TransactionType.Read); TypeDB.Driver.Api.TransactionType TransactionType Used to specify the type of transaction. Definition ITransaction.cs:151
```

#### [](#_ITransaction_TypeDB_Driver_Api_IDriver_Transaction_string_database_TransactionType_type_TransactionOptions_options_)method `Transaction`

```cs
ITransaction Transaction(string database, TransactionType type, TransactionOptions options)
```

Opens a transaction to the given database on the running TypeDB server.

Input parameters   

Name

Description

Type

`database`

The name of the database with which the transaction connects.

`string`

`type`

The type of transaction to be created (READ, WRITE, or SCHEMA).

`TransactionType`

`options`

`TransactionOptions` to configure the opened transaction.

`TransactionOptions`

Returns

`ITransaction`

Code examples

```cs
driver.Transaction(database, TransactionType.Read, options);
```

#### [](#_IUserManager_TypeDB_Driver_Api_IDriver_Users)method `Users`

```cs
IUserManager TypeDB.Driver.Api.IDriver.Users
```

The `IUserManager` for this connection, providing access to user management methods.

Returns

`IUserManager`

Code examples

```cs
driver.Users;
```

### [](#_Credentials)Credentials

`class`

**Package**: `TypeDB.Driver.Api`

User credentials for connecting to TypeDB Server.

Credentials credentials = new Credentials("admin", "password");

TypeDB.Driver.Api.Credentials

User credentials for connecting to TypeDB Server.

Definition Credentials.cs:33

#### [](#_TypeDB_Driver_Api_Credentials_Credentials_string_username_string_password_)method `Credentials`

```cs
Credentials(string username, string password)
```

Creates a new Credentials for connecting to TypeDB Server.

Input parameters   

Name

Description

Type

`username`

The name of the user to connect as.

`string`

`password`

The password for the user.

`string`

Returns

`Credentials`

### [](#_DriverOptions)DriverOptions

`class`

**Package**: `TypeDB.Driver.Api`

TypeDB driver options. `DriverOptions` are used to specify the driver’s connection behavior.

#### [](#_TypeDB_Driver_Api_DriverOptions_DriverOptions_DriverTlsConfig_tlsConfig_)method `DriverOptions`

```cs
DriverOptions(DriverTlsConfig tlsConfig)
```

Produces a new `DriverOptions` object for connecting to TypeDB Server using custom TLS settings. WARNING: Disabled TLS settings will make the driver sending passwords as plaintext.

Input parameters   

Name

Description

Type

`tlsConfig`

The TLS configuration for the connection.

`DriverTlsConfig`

Returns

`DriverOptions`

Code examples

```cs
DriverOptions options = new DriverOptions(DriverTlsConfig.EnabledWithNativeRootCA()) { RequestTimeoutMillis = 30000 }; TypeDB.Driver.Api.DriverOptions TypeDB driver options. DriverOptions are used to specify the driver's connection behavior. Definition DriverOptions.cs:29 TypeDB.Driver.Api.DriverTlsConfig TLS configuration for the TypeDB driver. Definition DriverTlsConfig.cs:37 TypeDB.Driver.Api.DriverTlsConfig.EnabledWithNativeRootCA static DriverTlsConfig EnabledWithNativeRootCA() Creates a TLS configuration enabled with system native trust roots. Definition DriverTlsConfig.cs:65
```

#### [](#_int_TypeDB_Driver_Api_DriverOptions_PrimaryFailoverRetries)method `PrimaryFailoverRetries`

```cs
int TypeDB.Driver.Api.DriverOptions.PrimaryFailoverRetries
```

Gets or sets the number of retries the driver performs to find and reach the cluster primary after a failed request, before giving up. Total attempts per user request = `N + 1`. Each retry either follows the server’s redirect address (fast path) or polls the known replicas with a 2-second sleep between polls (slow path). Set to `0` to disable failover. Defaults to 1.

Returns

`int`

Code examples

```cs
options.PrimaryFailoverRetries = 3;
```

#### [](#_long_TypeDB_Driver_Api_DriverOptions_RequestTimeoutMillis)method `RequestTimeoutMillis`

```cs
long TypeDB.Driver.Api.DriverOptions.RequestTimeoutMillis
```

Gets or sets the maximum time (in milliseconds) to wait for a response to a unary RPC request. This applies to operations like database creation, user management, and initial transaction opening. It does NOT apply to operations within transactions (queries, commits). Defaults to 2 hours (7200000 milliseconds).

Returns

`long`

Code examples

```cs
options.RequestTimeoutMillis = 30000;
```

#### [](#_DriverTlsConfig_TypeDB_Driver_Api_DriverOptions_TlsConfig)method `TlsConfig`

```cs
DriverTlsConfig TypeDB.Driver.Api.DriverOptions.TlsConfig
```

Gets or sets the TLS configuration associated with this `DriverOptions`. Specifies the TLS configuration of the connection to TypeDB. WARNING: Disabled TLS settings will make the driver sending passwords as plaintext.

Returns

`DriverTlsConfig`

Code examples

```cs
options.TlsConfig = DriverTlsConfig.EnabledWithNativeRootCA();
```

### [](#_IDatabaseManager)IDatabaseManager

`class`

**Package**: `TypeDB.Driver.Api`

Provides access to all database management methods.

#### [](#_bool_TypeDB_Driver_Api_IDatabaseManager_Contains_string_name_)method `Contains`

```cs
bool Contains(string name)
```

Checks if a database with the given name exists.

Input parameters   

Name

Description

Type

`name`

The database name to be checked

`string`

Returns

`bool`

Code examples

```cs
driver.Databases.Contains(name);
```

#### [](#_void_TypeDB_Driver_Api_IDatabaseManager_Create_string_name_)method `Create`

```cs
void Create(string name)
```

Create a database with the given name.

Input parameters   

Name

Description

Type

`name`

The name of the database to be created

`string`

Returns

`void`

Code examples

```cs
driver.Databases.Create(name);
```

#### [](#_IDatabase_TypeDB_Driver_Api_IDatabaseManager_Get_string_name_)method `Get`

```cs
IDatabase Get(string name)
```

Retrieve the database with the given name.

Input parameters   

Name

Description

Type

`name`

The name of the database to retrieve

`string`

Returns

`IDatabase`

Code examples

```cs
driver.Databases.Get(name);
```

#### [](#_IList_IDatabase_TypeDB_Driver_Api_IDatabaseManager_GetAll_)method `GetAll`

```cs
IList< IDatabase > GetAll()
```

Retrieves all databases present on the TypeDB server.

Returns

`IList< IDatabase >`

Code examples

```cs
driver.Databases.GetAll();
```

#### [](#_void_TypeDB_Driver_Api_IDatabaseManager_ImportFromFile_string_name_string_schema_string_dataFile_)method `ImportFromFile`

```cs
void ImportFromFile(string name, string schema, string dataFile)
```

Creates a database with the given name based on previously exported data. This is a blocking operation and may take a significant amount of time depending on the database size.

Input parameters   

Name

Description

Type

`name`

The name of the database to be created.

`string`

`schema`

The schema definition query string for the database.

`string`

`dataFile`

The exported database file path to import the data from.

`string`

Returns

`void`

Code examples

```cs
driver.Databases.ImportFromFile("mydb", schemaString, "/path/to/data.typedb");
```

### [](#_IDatabase)IDatabase

`class`

**Package**: `TypeDB.Driver.Api`

A TypeDB database.

#### [](#_void_TypeDB_Driver_Api_IDatabase_Delete_)method `Delete`

```cs
void Delete()
```

Deletes this database.

Returns

`void`

Code examples

```cs
database.Delete();
```

#### [](#_void_TypeDB_Driver_Api_IDatabase_ExportToFile_string_schemaFile_string_dataFile_)method `ExportToFile`

```cs
void ExportToFile(string schemaFile, string dataFile)
```

Exports this database to a schema definition file and a data file on disk. This is a blocking operation and may take a significant amount of time depending on the database size.

Input parameters   

Name

Description

Type

`schemaFile`

The path to the schema definition file to be created.

`string`

`dataFile`

The path to the data file to be created.

`string`

Returns

`void`

Code examples

```cs
database.ExportToFile("schema.tql", "data.typedb");
```

#### [](#_string_TypeDB_Driver_Api_IDatabase_GetSchema_)method `GetSchema`

```cs
string GetSchema()
```

Returns the full schema text as a valid TypeQL define query string.

Returns

`string`

Code examples

```cs
database.GetSchema();
```

#### [](#_string_TypeDB_Driver_Api_IDatabase_GetTypeSchema_)method `GetTypeSchema`

```cs
string GetTypeSchema()
```

Returns the types in the schema as a valid TypeQL define query string.

Returns

`string`

Code examples

```cs
database.GetTypeSchema();
```

#### [](#_string_TypeDB_Driver_Api_IDatabase_Name)method `Name`

```cs
string TypeDB.Driver.Api.IDatabase.Name
```

The database name as a string.

Returns

`string`

Code examples

```cs
database.Name;
```

### [](#_IUserManager)IUserManager

`class`

**Package**: `TypeDB.Driver.Api`

Provides access to all user management methods.

#### [](#_bool_TypeDB_Driver_Api_IUserManager_Contains_string_username_)method `Contains`

```cs
bool Contains(string username)
```

Checks if a user with the given name exists.

Input parameters   

Name

Description

Type

`username`

The user name to be checked.

`string`

Returns

`bool`

Code examples

```cs
driver.Users.Contains(username);
```

#### [](#_void_TypeDB_Driver_Api_IUserManager_Create_string_username_string_password_)method `Create`

```cs
void Create(string username, string password)
```

Creates a user with the given name and password.

Input parameters   

Name

Description

Type

`username`

The name of the user to be created.

`string`

`password`

The password of the user to be created.

`string`

Returns

`void`

Code examples

```cs
driver.Users.Create(username, password);
```

#### [](#_IUser_TypeDB_Driver_Api_IUserManager_Get_string_username_)method `Get`

```cs
IUser? Get(string username)
```

Retrieves a user with the given name.

Input parameters   

Name

Description

Type

`username`

The name of the user to retrieve.

`string`

Returns

`IUser?`

Code examples

```cs
driver.Users.Get(username);
```

#### [](#_ISet_IUser_TypeDB_Driver_Api_IUserManager_GetAll_)method `GetAll`

```cs
ISet< IUser > GetAll()
```

Retrieves all users which exist on the TypeDB server.

Returns

`ISet< IUser >`

Code examples

```cs
driver.Users.GetAll();
```

#### [](#_IUser_TypeDB_Driver_Api_IUserManager_GetCurrentUser_)method `GetCurrentUser`

```cs
IUser GetCurrentUser()
```

Retrieves the currently logged in user.

Returns

`IUser`

Code examples

```cs
driver.Users.GetCurrentUser();
```

### [](#_IUser)IUser

`class`

**Package**: `TypeDB.Driver.Api`

TypeDB user information.

#### [](#_void_TypeDB_Driver_Api_IUser_Delete_)method `Delete`

```cs
void Delete()
```

Deletes this user.

Returns

`void`

#### [](#_string_TypeDB_Driver_Api_IUser_Name)method `Name`

```cs
string TypeDB.Driver.Api.IUser.Name
```

Returns the name of this user.

Returns

`string`

#### [](#_void_TypeDB_Driver_Api_IUser_UpdatePassword_string_password_)method `UpdatePassword`

```cs
void UpdatePassword(string password)
```

Updates the password for this user.

Input parameters   

Name

Description

Type

`password`

The new password.

`string`

Returns

`void`

## [](#_transaction_header)Transaction

### [](#_ITransaction)ITransaction

`class`

**Package**: `TypeDB.Driver.Api`

A transaction with a TypeDB database.

#### [](#_Promise_IAnalyzedQuery_TypeDB_Driver_Api_ITransaction_Analyze_string_query_)method `Analyze`

```cs
Promise< IAnalyzedQuery > Analyze(string query)
```

Analyzes a TypeQL query and returns information about its structure and type inference results.

Input parameters   

Name

Description

Type

`query`

The TypeQL query string to analyze.

`string`

Returns

`Promise< IAnalyzedQuery >`

#### [](#_void_TypeDB_Driver_Api_ITransaction_Close_)method `Close`

```cs
void Close()
```

Closes the transaction.

Returns

`void`

#### [](#_void_TypeDB_Driver_Api_ITransaction_Commit_)method `Commit`

```cs
void Commit()
```

Commits the changes made via this transaction to the TypeDB database. Whether or not the transaction is committed successfully, it gets closed after the commit call.

Returns

`void`

#### [](#_bool_TypeDB_Driver_Api_ITransaction_IsOpen_)method `IsOpen`

```cs
bool IsOpen()
```

Checks whether this transaction is open.

Returns

`bool`

#### [](#_void_TypeDB_Driver_Api_ITransaction_OnClose_Action_Exception_function_)method `OnClose`

```cs
void OnClose(Action< Exception? > function)
```

Registers a callback function which will be executed when this transaction is closed.

Input parameters   

Name

Description

Type

`function`

The callback function.

`Action< Exception? >`

Returns

`void`

#### [](#_Promise_IQueryAnswer_TypeDB_Driver_Api_ITransaction_Query_string_query_)method `Query`

```cs
Promise< IQueryAnswer > Query(string query)
```

Executes a TypeQL query in this transaction.

Input parameters   

Name

Description

Type

`query`

The TypeQL query string to execute.

`string`

Returns

`Promise< IQueryAnswer >`

#### [](#_Promise_IQueryAnswer_TypeDB_Driver_Api_ITransaction_Query_string_query_QueryOptions_options_)method `Query`

```cs
Promise< IQueryAnswer > Query(string query, QueryOptions options)
```

Executes a TypeQL query in this transaction with custom options.

Input parameters   

Name

Description

Type

`query`

The TypeQL query string to execute.

`string`

`options`

Query options.

`QueryOptions`

Returns

`Promise< IQueryAnswer >`

#### [](#_Promise_IQueryAnswer_TypeDB_Driver_Api_ITransaction_Query_string_query_IGivenRows_givenRows_)method `Query`

```cs
Promise< IQueryAnswer > Query(string query, IGivenRows givenRows)
```

Executes a TypeQL query with input rows in this transaction.

Input parameters   

Name

Description

Type

`query`

The TypeQL query string to execute.

`string`

`givenRows`

Input rows.

`IGivenRows`

Returns

`Promise< IQueryAnswer >`

#### [](#_Promise_IQueryAnswer_TypeDB_Driver_Api_ITransaction_Query_string_query_List_Dictionary_string_object_givenRows_)method `Query`

```cs
Promise< IQueryAnswer > Query(string query, List< Dictionary< string, object? > > givenRows)
```

Executes a TypeQL query with input rows supplied as a list of dictionaries of raw values.

Input parameters   

Name

Description

Type

`query`

The TypeQL query string to execute.

`string`

`givenRows`

Rows as dictionaries from variable name to `IConcept` or a supported .NET primitive.

`List< Dictionary< string, object? > >`

Returns

`Promise< IQueryAnswer >`

#### [](#_Promise_IQueryAnswer_TypeDB_Driver_Api_ITransaction_Query_string_query_List_string_givenVariables_List_List_object_givenRows_)method `Query`

```cs
Promise< IQueryAnswer > Query(string query, List< string > givenVariables, List< List< object? > > givenRows)
```

Executes a TypeQL query with input rows supplied as parallel variable and value lists of raw values.

Input parameters   

Name

Description

Type

`query`

The TypeQL query string to execute.

`string`

`givenVariables`

Variable names.

`List< string >`

`givenRows`

Row values; each entry must be `IConcept` or a supported .NET primitive.

`List< List< object? > >`

Returns

`Promise< IQueryAnswer >`

#### [](#_Promise_IQueryAnswer_TypeDB_Driver_Api_ITransaction_Query_string_query_QueryOptions_options_IGivenRows_givenRows_)method `Query`

```cs
Promise< IQueryAnswer > Query(string query, QueryOptions options, IGivenRows givenRows)
```

Executes a TypeQL query with input rows in this transaction.

Input parameters   

Name

Description

Type

`query`

The TypeQL query string to execute.

`string`

`options`

Query options.

`QueryOptions`

`givenRows`

Input rows built via `TypeDB.Concept.GivenRows`.

`IGivenRows`

Returns

`Promise< IQueryAnswer >`

Code examples

```cs
string query = "given $n: string, $a: integer; insert $p isa person, has name == $n, has age == $a;"; IGivenRows rows = TypeDB.Concept.GivenRows( new List<string> { "n", "a" }, new List<List<IConcept?>> { new List<IConcept?> { TypeDB.Concept.NewString("Alice"), TypeDB.Concept.NewInteger(28) }, // First row new List<IConcept?> { TypeDB.Concept.NewString("Bob"), TypeDB.Concept.NewInteger(26) } // Second row } ); transaction.Query(query, new QueryOptions(), rows).Resolve(); TypeDB.Driver.Api.IGivenRows Definition IGivenRows.cs:22 TypeDB Definition TypeDB.cs:29
```

#### [](#_Promise_IQueryAnswer_TypeDB_Driver_Api_ITransaction_Query_string_query_QueryOptions_options_List_Dictionary_string_object_givenRows_)method `Query`

```cs
Promise< IQueryAnswer > Query(string query, QueryOptions options, List< Dictionary< string, object? > > givenRows)
```

Executes a TypeQL query with input rows and options, rows supplied as a list of dictionaries of raw values.

Input parameters   

Name

Description

Type

`query`

The TypeQL query string to execute.

`string`

`options`

Query options.

`QueryOptions`

`givenRows`

Rows as dictionaries from variable name to `IConcept` or a supported .NET primitive.

`List< Dictionary< string, object? > >`

Returns

`Promise< IQueryAnswer >`

#### [](#_Promise_IQueryAnswer_TypeDB_Driver_Api_ITransaction_Query_string_query_QueryOptions_options_List_string_givenVariables_List_List_object_givenRows_)method `Query`

```cs
Promise< IQueryAnswer > Query(string query, QueryOptions options, List< string > givenVariables, List< List< object? > > givenRows)
```

Executes a TypeQL query with input rows and options, rows supplied as parallel variable and value lists of raw values.

Input parameters   

Name

Description

Type

`query`

The TypeQL query string to execute.

`string`

`options`

Query options.

`QueryOptions`

`givenVariables`

Variable names.

`List< string >`

`givenRows`

Row values; each entry must be `IConcept` or a supported .NET primitive.

`List< List< object? > >`

Returns

`Promise< IQueryAnswer >`

#### [](#_void_TypeDB_Driver_Api_ITransaction_Rollback_)method `Rollback`

```cs
void Rollback()
```

Rolls back the uncommitted changes made via this transaction.

Returns

`void`

#### [](#_TransactionType_TypeDB_Driver_Api_ITransaction_Type)method `Type`

```cs
TransactionType TypeDB.Driver.Api.ITransaction.Type
```

The transaction’s type (Read, Write, or Schema).

Returns

`TransactionType`

### [](#_TransactionType)TransactionType

`class`

**Package**: `TypeDB.Driver.Api`

Used to specify the type of transaction.

driver.Transaction(database, TransactionType.Read);

TypeDB.Driver.Api.TransactionType

TransactionType

Used to specify the type of transaction.

Definition ITransaction.cs:151

### [](#_TransactionOptions)TransactionOptions

`class`

**Package**: `TypeDB.Driver.Api`

TypeDB transaction options. `TransactionOptions` can be used to override the default server behaviour for opened transactions.

#### [](#_long_TypeDB_Driver_Api_TransactionOptions_SchemaLockAcquireTimeoutMillis)method `SchemaLockAcquireTimeoutMillis`

```cs
long? TypeDB.Driver.Api.TransactionOptions.SchemaLockAcquireTimeoutMillis
```

Gets or sets the schema lock acquire timeout in milliseconds. If set, specifies how long the driver should wait if opening a transaction is blocked by an exclusive schema write lock.

Returns

`long?`

Code examples

```cs
options.SchemaLockAcquireTimeoutMillis = 3000;
```

#### [](#_TypeDB_Driver_Api_TransactionOptions_TransactionOptions_)method `TransactionOptions`

```cs
TransactionOptions()
```

Produces a new `TransactionOptions` object.

Returns

`TransactionOptions`

Code examples

```cs
TransactionOptions options = new TransactionOptions { TransactionTimeoutMillis = 10_000, SchemaLockAcquireTimeoutMillis = 3000 }; TypeDB.Driver.Api.TransactionOptions TypeDB transaction options. TransactionOptions can be used to override the default server behaviour f... Definition TransactionOptions.cs:30
```

#### [](#_long_TypeDB_Driver_Api_TransactionOptions_TransactionTimeoutMillis)method `TransactionTimeoutMillis`

```cs
long? TypeDB.Driver.Api.TransactionOptions.TransactionTimeoutMillis
```

Gets or sets the transaction timeout in milliseconds. If set, specifies a timeout for killing transactions automatically, preventing memory leaks in unclosed transactions.

Returns

`long?`

Code examples

```cs
options.TransactionTimeoutMillis = 5000;
```

### [](#_QueryOptions)QueryOptions

`class`

**Package**: `TypeDB.Driver.Api`

TypeDB query options. `QueryOptions` can be used to override the default server behaviour for executed queries.

#### [](#_bool_TypeDB_Driver_Api_QueryOptions_IncludeInstanceTypes)method `IncludeInstanceTypes`

```cs
bool? TypeDB.Driver.Api.QueryOptions.IncludeInstanceTypes
```

Gets or sets whether to include instance types in ConceptRow answers. If set, specifies if types should be included in instance structs returned in ConceptRow answers. This option allows reducing the amount of unnecessary data transmitted.

Returns

`bool?`

Code examples

```cs
options.IncludeInstanceTypes = true;
```

#### [](#_bool_TypeDB_Driver_Api_QueryOptions_IncludeQueryStructure)method `IncludeQueryStructure`

```cs
bool? TypeDB.Driver.Api.QueryOptions.IncludeQueryStructure
```

Gets or sets whether to include the query structure in the ConceptRow header. If set, requests the server to return the structure of the query in the ConceptRow header.

Returns

`bool?`

Code examples

```cs
options.IncludeQueryStructure = true;
```

#### [](#_long_TypeDB_Driver_Api_QueryOptions_PrefetchSize)method `PrefetchSize`

```cs
long? TypeDB.Driver.Api.QueryOptions.PrefetchSize
```

Gets or sets the prefetch size for query results. If set, specifies the number of extra query responses sent before the client side has to re-request more responses. Increasing this may increase performance for queries with a huge number of answers, as it can reduce the number of network round-trips at the cost of more resources on the server side. Minimal value: 1.

Returns

`long?`

Code examples

```cs
options.PrefetchSize = 50;
```

#### [](#_TypeDB_Driver_Api_QueryOptions_QueryOptions_)method `QueryOptions`

```cs
QueryOptions()
```

Produces a new `QueryOptions` object.

Returns

`QueryOptions`

Code examples

```cs
QueryOptions options = new QueryOptions { PrefetchSize = 50, IncludeQueryStructure = true }; TypeDB.Driver.Api.QueryOptions TypeDB query options. QueryOptions can be used to override the default server behaviour for executed ... Definition QueryOptions.cs:30
```

## [](#_answer_header)Answer

### [](#_IQueryAnswer)IQueryAnswer

`class`

**Package**: `TypeDB.Driver.Api.Answer`

General answer on a query returned by a server. Can be a simple Ok response or a collection of concepts.

#### [](#_IConceptDocumentIterator_TypeDB_Driver_Api_Answer_IQueryAnswer_AsConceptDocuments_)method `AsConceptDocuments`

```cs
IConceptDocumentIterator AsConceptDocuments()
```

Casts the query answer to IConceptDocumentIterator.

Implemented in TypeDB.Driver.Api.Answer.IConceptDocumentIterator.

Returns

`IConceptDocumentIterator`

Code examples

```cs
queryAnswer.AsConceptDocuments()
```

#### [](#_IConceptRowIterator_TypeDB_Driver_Api_Answer_IQueryAnswer_AsConceptRows_)method `AsConceptRows`

```cs
IConceptRowIterator AsConceptRows()
```

Casts the query answer to IConceptRowIterator.

Implemented in TypeDB.Driver.Api.Answer.IConceptRowIterator.

Returns

`IConceptRowIterator`

Code examples

```cs
queryAnswer.AsConceptRows()
```

#### [](#_IOkQueryAnswer_TypeDB_Driver_Api_Answer_IQueryAnswer_AsOk_)method `AsOk`

```cs
IOkQueryAnswer AsOk()
```

Casts the query answer to IOkQueryAnswer.

Implemented in TypeDB.Driver.Api.Answer.IOkQueryAnswer.

Returns

`IOkQueryAnswer`

Code examples

```cs
queryAnswer.AsOk()
```

#### [](#_bool_TypeDB_Driver_Api_Answer_IQueryAnswer_IsConceptDocuments)method `IsConceptDocuments`

```cs
bool TypeDB.Driver.Api.Answer.IQueryAnswer.IsConceptDocuments
```

Checks if the query answer is a IConceptDocumentIterator.

Implemented in TypeDB.Driver.Api.Answer.IConceptDocumentIterator.

Returns

`bool`

Code examples

```cs
queryAnswer.IsConceptDocuments
```

#### [](#_bool_TypeDB_Driver_Api_Answer_IQueryAnswer_IsConceptRows)method `IsConceptRows`

```cs
bool TypeDB.Driver.Api.Answer.IQueryAnswer.IsConceptRows
```

Checks if the query answer is a IConceptRowIterator.

Implemented in TypeDB.Driver.Api.Answer.IConceptRowIterator.

Returns

`bool`

Code examples

```cs
queryAnswer.IsConceptRows
```

#### [](#_bool_TypeDB_Driver_Api_Answer_IQueryAnswer_IsOk)method `IsOk`

```cs
bool TypeDB.Driver.Api.Answer.IQueryAnswer.IsOk
```

Checks if the query answer is an IOkQueryAnswer.

Implemented in TypeDB.Driver.Api.Answer.IOkQueryAnswer.

Returns

`bool`

Code examples

```cs
queryAnswer.IsOk
```

#### [](#_QueryType_TypeDB_Driver_Api_Answer_IQueryAnswer_QueryType)method `QueryType`

```cs
QueryType TypeDB.Driver.Api.Answer.IQueryAnswer.QueryType
```

Retrieves the executed query’s type of this IQueryAnswer.

Returns

`QueryType`

Code examples

```cs
queryAnswer.QueryType
```

### [](#_IOkQueryAnswer)IOkQueryAnswer

`class`

**Package**: `TypeDB.Driver.Api.Answer`

**Supertypes:**

*   `TypeDB.Driver.Api.Answer.IQueryAnswer`
    

Represents a simple Ok message as a server answer. Doesn’t contain concepts.

#### [](#_IOkQueryAnswer_IQueryAnswer_TypeDB_Driver_Api_Answer_IOkQueryAnswer_AsOk_)method `AsOk`

```cs
IOkQueryAnswer IQueryAnswer. AsOk()
```

Casts the query answer to IOkQueryAnswer.

Implements TypeDB.Driver.Api.Answer.IQueryAnswer.

Returns

`IOkQueryAnswer IQueryAnswer.`

Code examples

```cs
queryAnswer.AsOk()
```

#### [](#_bool_IQueryAnswer_TypeDB_Driver_Api_Answer_IOkQueryAnswer_IsOk)method `IsOk`

```cs
bool IQueryAnswer. TypeDB.Driver.Api.Answer.IOkQueryAnswer.IsOk
```

Checks if the query answer is an IOkQueryAnswer.

Implements TypeDB.Driver.Api.Answer.IQueryAnswer.

Returns

`bool IQueryAnswer.`

Code examples

```cs
queryAnswer.IsOk
```

### [](#_IConceptRowIterator)IConceptRowIterator

`class`

**Package**: `TypeDB.Driver.Api.Answer`

**Supertypes:**

*   `TypeDB.Driver.Api.Answer.IQueryAnswer`
    

Represents an iterator over IConceptRows returned as a server answer.

#### [](#_IConceptRowIterator_IQueryAnswer_TypeDB_Driver_Api_Answer_IConceptRowIterator_AsConceptRows_)method `AsConceptRows`

```cs
IConceptRowIterator IQueryAnswer. AsConceptRows()
```

Casts the query answer to IConceptRowIterator.

Implements TypeDB.Driver.Api.Answer.IQueryAnswer.

Returns

`IConceptRowIterator IQueryAnswer.`

Code examples

```cs
queryAnswer.AsConceptRows()
```

#### [](#_bool_IQueryAnswer_TypeDB_Driver_Api_Answer_IConceptRowIterator_IsConceptRows)method `IsConceptRows`

```cs
bool IQueryAnswer. TypeDB.Driver.Api.Answer.IConceptRowIterator.IsConceptRows
```

Checks if the query answer is a IConceptRowIterator.

Implements TypeDB.Driver.Api.Answer.IQueryAnswer.

Returns

`bool IQueryAnswer.`

Code examples

```cs
queryAnswer.IsConceptRows
```

### [](#_IConceptRow)IConceptRow

`class`

**Package**: `TypeDB.Driver.Api.Answer`

Contains a row of concepts with a header.

#### [](#_IEnumerable_string_TypeDB_Driver_Api_Answer_IConceptRow_ColumnNames)method `ColumnNames`

```cs
IEnumerable< string > TypeDB.Driver.Api.Answer.IConceptRow.ColumnNames
```

Produces a collection of all column names (variables) in the header of this IConceptRow. Shared between all the rows in a QueryAnswer.

Returns

`IEnumerable< string >`

Code examples

```cs
conceptRow.ColumnNames
```

#### [](#_IEnumerable_IConcept_TypeDB_Driver_Api_Answer_IConceptRow_Concepts)method `Concepts`

```cs
IEnumerable< IConcept > TypeDB.Driver.Api.Answer.IConceptRow.Concepts
```

Produces a collection over all concepts in this IConceptRow, skipping empty results.

Returns

`IEnumerable< IConcept >`

Code examples

```cs
conceptRow.Concepts
```

#### [](#_IConcept_TypeDB_Driver_Api_Answer_IConceptRow_Get_string_columnName_)method `Get`

```cs
IConcept? Get(string columnName)
```

Retrieves a concept for a given column name (variable). Returns null if the variable has an empty answer. Throws an exception if the variable is not present.

Input parameters   

Name

Description

Type

`columnName`

The variable (column name from ColumnNames)

`string`

Returns

`IConcept?`

Code examples

```cs
conceptRow.Get(columnName)
```

#### [](#_IConcept_TypeDB_Driver_Api_Answer_IConceptRow_GetIndex_long_columnIndex_)method `GetIndex`

```cs
IConcept? GetIndex(long columnIndex)
```

Retrieves a concept for a given index of the header (ColumnNames). Returns null if the index points to an empty answer. Throws an exception if the index is not in the row’s range.

Input parameters   

Name

Description

Type

`columnIndex`

The column index

`long`

Returns

`IConcept?`

Code examples

```cs
conceptRow.GetIndex(columnIndex)
```

#### [](#_IPipeline_TypeDB_Driver_Api_Answer_IConceptRow_QueryStructure)method `QueryStructure`

```cs
IPipeline? TypeDB.Driver.Api.Answer.IConceptRow.QueryStructure
```

Retrieves the query structure pipeline if available. Only available if the query was executed with IncludeQueryStructure option enabled.

Returns

`IPipeline?`

Code examples

```cs
conceptRow.QueryStructure
```

#### [](#_QueryType_TypeDB_Driver_Api_Answer_IConceptRow_QueryType)method `QueryType`

```cs
QueryType TypeDB.Driver.Api.Answer.IConceptRow.QueryType
```

Retrieves the executed query’s type of this IConceptRow. Shared between all the rows in a QueryAnswer.

Returns

`QueryType`

Code examples

```cs
conceptRow.QueryType
```

### [](#_IConceptDocumentIterator)IConceptDocumentIterator

`class`

**Package**: `TypeDB.Driver.Api.Answer`

**Supertypes:**

*   `TypeDB.Driver.Api.Answer.IQueryAnswer`
    

Represents an iterator over concept documents (represented as IJSONs) returned as a server answer.

#### [](#_IConceptDocumentIterator_IQueryAnswer_TypeDB_Driver_Api_Answer_IConceptDocumentIterator_AsConceptDocuments_)method `AsConceptDocuments`

```cs
IConceptDocumentIterator IQueryAnswer. AsConceptDocuments()
```

Casts the query answer to IConceptDocumentIterator.

Implements TypeDB.Driver.Api.Answer.IQueryAnswer.

Returns

`IConceptDocumentIterator IQueryAnswer.`

Code examples

```cs
queryAnswer.AsConceptDocuments()
```

#### [](#_bool_IQueryAnswer_TypeDB_Driver_Api_Answer_IConceptDocumentIterator_IsConceptDocuments)method `IsConceptDocuments`

```cs
bool IQueryAnswer. TypeDB.Driver.Api.Answer.IConceptDocumentIterator.IsConceptDocuments
```

Checks if the query answer is a IConceptDocumentIterator.

Implements TypeDB.Driver.Api.Answer.IQueryAnswer.

Returns

`bool IQueryAnswer.`

Code examples

```cs
queryAnswer.IsConceptDocuments
```

### [](#_IJSON)IJSON

`class`

**Package**: `TypeDB.Driver.Api.Answer`

Represents a JSON value returned from a fetch query.

#### [](#_IReadOnlyList_IJSON_TypeDB_Driver_Api_Answer_IJSON_AsArray_)method `AsArray`

```cs
IReadOnlyList< IJSON > AsArray()
```

Casts this JSON value to an array.

Returns

`IReadOnlyList< IJSON >`

Code examples

```cs
json.AsArray()
```

#### [](#_bool_TypeDB_Driver_Api_Answer_IJSON_AsBoolean_)method `AsBoolean`

```cs
bool AsBoolean()
```

Casts this JSON value to a boolean.

Returns

`bool`

Code examples

```cs
json.AsBoolean()
```

#### [](#_double_TypeDB_Driver_Api_Answer_IJSON_AsNumber_)method `AsNumber`

```cs
double AsNumber()
```

Casts this JSON value to a number.

Returns

`double`

Code examples

```cs
json.AsNumber()
```

#### [](#_IReadOnlyDictionary_string_IJSON_TypeDB_Driver_Api_Answer_IJSON_AsObject_)method `AsObject`

```cs
IReadOnlyDictionary< string, IJSON > AsObject()
```

Casts this JSON value to an object (dictionary).

Returns

`IReadOnlyDictionary< string, IJSON >`

Code examples

```cs
json.AsObject()
```

#### [](#_string_TypeDB_Driver_Api_Answer_IJSON_AsString_)method `AsString`

```cs
string AsString()
```

Casts this JSON value to a string.

Returns

`string`

Code examples

```cs
json.AsString()
```

#### [](#_bool_TypeDB_Driver_Api_Answer_IJSON_IsArray)method `IsArray`

```cs
bool TypeDB.Driver.Api.Answer.IJSON.IsArray
```

Checks if this JSON value is an array.

Returns

`bool`

Code examples

```cs
json.IsArray
```

#### [](#_bool_TypeDB_Driver_Api_Answer_IJSON_IsBoolean)method `IsBoolean`

```cs
bool TypeDB.Driver.Api.Answer.IJSON.IsBoolean
```

Checks if this JSON value is a boolean.

Returns

`bool`

Code examples

```cs
json.IsBoolean
```

#### [](#_bool_TypeDB_Driver_Api_Answer_IJSON_IsNull)method `IsNull`

```cs
bool TypeDB.Driver.Api.Answer.IJSON.IsNull
```

Checks if this JSON value is null.

Returns

`bool`

Code examples

```cs
json.IsNull
```

#### [](#_bool_TypeDB_Driver_Api_Answer_IJSON_IsNumber)method `IsNumber`

```cs
bool TypeDB.Driver.Api.Answer.IJSON.IsNumber
```

Checks if this JSON value is a number.

Returns

`bool`

Code examples

```cs
json.IsNumber
```

#### [](#_bool_TypeDB_Driver_Api_Answer_IJSON_IsObject)method `IsObject`

```cs
bool TypeDB.Driver.Api.Answer.IJSON.IsObject
```

Checks if this JSON value is an object.

Returns

`bool`

Code examples

```cs
json.IsObject
```

#### [](#_bool_TypeDB_Driver_Api_Answer_IJSON_IsString)method `IsString`

```cs
bool TypeDB.Driver.Api.Answer.IJSON.IsString
```

Checks if this JSON value is a string.

Returns

`bool`

Code examples

```cs
json.IsString
```

### [](#_QueryType)QueryType

`class`

**Package**: `TypeDB.Driver.Api`

Used to specify the type of the executed query.

conceptRow.QueryType

Enumerator

Read&nbsp;

A read-only query that retrieves data.

Write&nbsp;

A write query that modifies data.

Schema&nbsp;

A schema query that modifies the schema.

### [](#_QueryTypeExtensions)QueryTypeExtensions

`class`

**Package**: `TypeDB.Driver.Api`

Extension methods for QueryType.

#### [](#_static_QueryType_TypeDB_Driver_Api_QueryTypeExtensions_FromNative_PinvokeQueryType_nativeType_)method `FromNative`

```cs
static QueryType FromNative(Pinvoke::QueryType nativeType)
```

Creates a QueryType from a native QueryType.

Returns

`QueryType`

#### [](#_static_bool_TypeDB_Driver_Api_QueryTypeExtensions_IsRead_this_QueryType_type_)method `IsRead`

```cs
static bool IsRead(this QueryType type)
```

Checks if this is a read query.

Returns

`bool`

#### [](#_static_bool_TypeDB_Driver_Api_QueryTypeExtensions_IsSchema_this_QueryType_type_)method `IsSchema`

```cs
static bool IsSchema(this QueryType type)
```

Checks if this is a schema query.

Returns

`bool`

#### [](#_static_bool_TypeDB_Driver_Api_QueryTypeExtensions_IsWrite_this_QueryType_type_)method `IsWrite`

```cs
static bool IsWrite(this QueryType type)
```

Checks if this is a write query.

Returns

`bool`

### [](#_Promise_T_)Promise< T >

`class`

**Package**: `TypeDB.Driver.Common`

A `Promise` represents an asynchronous network operation.

The request it represents is performed immediately. The response is only retrieved once the `Promise` is `Resolve`d.

#### [](#_static_Promise_TTo_TypeDB_Driver_Common_Promise_T_Map_TFrom_TTo_Func_TFrom_resolver_Func_TFrom_TTo_selector_)method `Map< TFrom, TTo >`

```cs
static Promise< TTo > TypeDB.Driver.Common.Promise< T >.Map< TFrom, TTo >(Func< TFrom? > resolver, Func< TFrom, TTo > selector)
```

Helper function to map promises.

Input parameters   

Name

Description

Type

`resolver`

The function to wrap into the promise

`Func< TFrom? >`

`selector`

The mapping (like Select from Linq) function

`Func< TFrom, TTo >`

Returns

`Promise< TTo >`

Code examples

```cs
Promise<TFrom>.Map<TFrom, TTo>(resolver, selector);
```

#### [](#_TypeDB_Driver_Common_Promise_T_Promise_Func_T_resolver_)method `Promise`

```cs
Promise(Func< T? > resolver)
```

Promise constructor

Input parameters   

Name

Description

Type

`resolver`

The function to wrap into the promise

`Func< T? >`

Returns

`Promise`

Code examples

```cs
new Promise(resolver);
```

#### [](#_T_TypeDB_Driver_Common_Promise_T_Resolve_)method `Resolve`

```cs
T? Resolve()
```

Retrieves the result of the Promise.

Returns

`T?`

Code examples

```cs
promise.Resolve();
```

### [](#_VoidPromise)VoidPromise

`class`

**Package**: `TypeDB.Driver.Common`

A `VoidPromise` represents a `Promise` without an operation’s result.

See also

```cs
Promise
```

#### [](#_void_TypeDB_Driver_Common_VoidPromise_Resolve_)method `Resolve`

```cs
void Resolve()
```

Retrieves the result of the Promise.

Returns

`void`

Code examples

```cs
promise.Resolve();
```

#### [](#_TypeDB_Driver_Common_VoidPromise_VoidPromise_Action_resolver_)method `VoidPromise`

```cs
VoidPromise(Action resolver)
```

Promise constructor

Input parameters   

Name

Description

Type

`promise`

The function to wrap into the promise

Returns

`VoidPromise`

Code examples

```cs
new Promise(action);
```

## [](#_concept_header)Concept

### [](#_IConcept)IConcept

`class`

**Package**: `TypeDB.Driver.Api`

The base interface for all concepts in TypeDB.

#### [](#_IAttribute_TypeDB_Driver_Api_IConcept_AsAttribute_)method `AsAttribute`

```cs
IAttribute AsAttribute()
```

Casts the concept to IAttribute.

Implemented in TypeDB.Driver.Api.IAttribute.

Returns

`IAttribute`

Code examples

```cs
concept.AsAttribute()
```

#### [](#_IAttributeType_TypeDB_Driver_Api_IConcept_AsAttributeType_)method `AsAttributeType`

```cs
IAttributeType AsAttributeType()
```

Casts the concept to IAttributeType.

Implemented in TypeDB.Driver.Api.IAttributeType.

Returns

`IAttributeType`

Code examples

```cs
concept.AsAttributeType()
```

#### [](#_IEntity_TypeDB_Driver_Api_IConcept_AsEntity_)method `AsEntity`

```cs
IEntity AsEntity()
```

Casts the concept to IEntity.

Implemented in TypeDB.Driver.Api.IEntity.

Returns

`IEntity`

Code examples

```cs
concept.AsEntity()
```

#### [](#_IEntityType_TypeDB_Driver_Api_IConcept_AsEntityType_)method `AsEntityType`

```cs
IEntityType AsEntityType()
```

Casts the concept to IEntityType.

Implemented in TypeDB.Driver.Api.IEntityType.

Returns

`IEntityType`

Code examples

```cs
concept.AsEntityType()
```

#### [](#_IInstance_TypeDB_Driver_Api_IConcept_AsInstance_)method `AsInstance`

```cs
IInstance AsInstance()
```

Casts the concept to IInstance.

Implemented in TypeDB.Driver.Api.IInstance.

Returns

`IInstance`

Code examples

```cs
concept.AsInstance()
```

#### [](#_IRelation_TypeDB_Driver_Api_IConcept_AsRelation_)method `AsRelation`

```cs
IRelation AsRelation()
```

Casts the concept to IRelation.

Implemented in TypeDB.Driver.Api.IRelation.

Returns

`IRelation`

Code examples

```cs
concept.AsRelation()
```

#### [](#_IRelationType_TypeDB_Driver_Api_IConcept_AsRelationType_)method `AsRelationType`

```cs
IRelationType AsRelationType()
```

Casts the concept to IRelationType.

Implemented in TypeDB.Driver.Api.IRelationType.

Returns

`IRelationType`

Code examples

```cs
concept.AsRelationType()
```

#### [](#_IRoleType_TypeDB_Driver_Api_IConcept_AsRoleType_)method `AsRoleType`

```cs
IRoleType AsRoleType()
```

Casts the concept to IRoleType.

Implemented in TypeDB.Driver.Api.IRoleType.

Returns

`IRoleType`

Code examples

```cs
concept.AsRoleType()
```

#### [](#_IType_TypeDB_Driver_Api_IConcept_AsType_)method `AsType`

```cs
IType AsType()
```

Casts the concept to IType.

Implemented in TypeDB.Driver.Api.IType.

Returns

`IType`

Code examples

```cs
concept.AsType()
```

#### [](#_IValue_TypeDB_Driver_Api_IConcept_AsValue_)method `AsValue`

```cs
IValue AsValue()
```

Casts the concept to IValue.

Implemented in TypeDB.Driver.Api.IValue.

Returns

`IValue`

Code examples

```cs
concept.AsValue()
```

#### [](#_string_TypeDB_Driver_Api_IConcept_GetLabel_)method `GetLabel`

```cs
string GetLabel()
```

Retrieves the unique label of the concept. If this is an Instance, returns the label of the type of this instance ("unknown" if type fetching is disabled). If this is a Value, returns the label of the value type. If this is a Type, returns the label of the type.

Returns

`string`

Code examples

```cs
concept.GetLabel()
```

#### [](#_bool_TypeDB_Driver_Api_IConcept_IsAttribute_)method `IsAttribute`

```cs
bool IsAttribute()
```

Checks if the concept is an IAttribute.

Implemented in TypeDB.Driver.Api.IAttribute.

Returns

`bool`

Code examples

```cs
concept.IsAttribute()
```

#### [](#_bool_TypeDB_Driver_Api_IConcept_IsAttributeType_)method `IsAttributeType`

```cs
bool IsAttributeType()
```

Checks if the concept is an IAttributeType.

Implemented in TypeDB.Driver.Api.IAttributeType.

Returns

`bool`

Code examples

```cs
concept.IsAttributeType()
```

#### [](#_bool_TypeDB_Driver_Api_IConcept_IsBoolean_)method `IsBoolean`

```cs
bool IsBoolean()
```

Returns true if the value which this Concept holds is of type boolean or if this Concept is an AttributeType of type boolean.

Returns

`bool`

Code examples

```cs
concept.IsBoolean()
```

#### [](#_bool_TypeDB_Driver_Api_IConcept_IsDate_)method `IsDate`

```cs
bool IsDate()
```

Returns true if the value which this Concept holds is of type date or if this Concept is an AttributeType of type date.

Returns

`bool`

Code examples

```cs
concept.IsDate()
```

#### [](#_bool_TypeDB_Driver_Api_IConcept_IsDatetime_)method `IsDatetime`

```cs
bool IsDatetime()
```

Returns true if the value which this Concept holds is of type datetime or if this Concept is an AttributeType of type datetime.

Returns

`bool`

Code examples

```cs
concept.IsDatetime()
```

#### [](#_bool_TypeDB_Driver_Api_IConcept_IsDatetimeTZ_)method `IsDatetimeTZ`

```cs
bool IsDatetimeTZ()
```

Returns true if the value which this Concept holds is of type datetime-tz or if this Concept is an AttributeType of type datetime-tz.

Returns

`bool`

Code examples

```cs
concept.IsDatetimeTZ()
```

#### [](#_bool_TypeDB_Driver_Api_IConcept_IsDecimal_)method `IsDecimal`

```cs
bool IsDecimal()
```

Returns true if the value which this Concept holds is of type decimal or if this Concept is an AttributeType of type decimal.

Returns

`bool`

Code examples

```cs
concept.IsDecimal()
```

#### [](#_bool_TypeDB_Driver_Api_IConcept_IsDouble_)method `IsDouble`

```cs
bool IsDouble()
```

Returns true if the value which this Concept holds is of type double or if this Concept is an AttributeType of type double.

Returns

`bool`

Code examples

```cs
concept.IsDouble()
```

#### [](#_bool_TypeDB_Driver_Api_IConcept_IsDuration_)method `IsDuration`

```cs
bool IsDuration()
```

Returns true if the value which this Concept holds is of type duration or if this Concept is an AttributeType of type duration.

Returns

`bool`

Code examples

```cs
concept.IsDuration()
```

#### [](#_bool_TypeDB_Driver_Api_IConcept_IsEntity_)method `IsEntity`

```cs
bool IsEntity()
```

Checks if the concept is an IEntity.

Implemented in TypeDB.Driver.Api.IEntity.

Returns

`bool`

Code examples

```cs
concept.IsEntity()
```

#### [](#_bool_TypeDB_Driver_Api_IConcept_IsEntityType_)method `IsEntityType`

```cs
bool IsEntityType()
```

Checks if the concept is an IEntityType.

Implemented in TypeDB.Driver.Api.IEntityType.

Returns

`bool`

Code examples

```cs
concept.IsEntityType()
```

#### [](#_bool_TypeDB_Driver_Api_IConcept_IsInstance_)method `IsInstance`

```cs
bool IsInstance()
```

Checks if the concept is an instance (entity, relation, or attribute).

Implemented in TypeDB.Driver.Api.IInstance.

Returns

`bool`

Code examples

```cs
concept.IsInstance()
```

#### [](#_bool_TypeDB_Driver_Api_IConcept_IsInteger_)method `IsInteger`

```cs
bool IsInteger()
```

Returns true if the value which this Concept holds is of type integer or if this Concept is an AttributeType of type integer.

Returns

`bool`

Code examples

```cs
concept.IsInteger()
```

#### [](#_bool_TypeDB_Driver_Api_IConcept_IsRelation_)method `IsRelation`

```cs
bool IsRelation()
```

Checks if the concept is a IRelation.

Implemented in TypeDB.Driver.Api.IRelation.

Returns

`bool`

Code examples

```cs
concept.IsRelation()
```

#### [](#_bool_TypeDB_Driver_Api_IConcept_IsRelationType_)method `IsRelationType`

```cs
bool IsRelationType()
```

Checks if the concept is a IRelationType.

Implemented in TypeDB.Driver.Api.IRelationType.

Returns

`bool`

Code examples

```cs
concept.IsRelationType()
```

#### [](#_bool_TypeDB_Driver_Api_IConcept_IsRoleType_)method `IsRoleType`

```cs
bool IsRoleType()
```

Checks if the concept is a IRoleType.

Implemented in TypeDB.Driver.Api.IRoleType.

Returns

`bool`

Code examples

```cs
concept.IsRoleType()
```

#### [](#_bool_TypeDB_Driver_Api_IConcept_IsString_)method `IsString`

```cs
bool IsString()
```

Returns true if the value which this Concept holds is of type string or if this Concept is an AttributeType of type string.

Returns

`bool`

Code examples

```cs
concept.IsString()
```

#### [](#_bool_TypeDB_Driver_Api_IConcept_IsStruct_)method `IsStruct`

```cs
bool IsStruct()
```

Returns true if the value which this Concept holds is of type struct or if this Concept is an AttributeType of type struct.

Returns

`bool`

Code examples

```cs
concept.IsStruct()
```

#### [](#_bool_TypeDB_Driver_Api_IConcept_IsType_)method `IsType`

```cs
bool IsType()
```

Checks if the concept is a IType.

Implemented in TypeDB.Driver.Api.IType.

Returns

`bool`

Code examples

```cs
concept.IsType()
```

#### [](#_bool_TypeDB_Driver_Api_IConcept_IsValue_)method `IsValue`

```cs
bool IsValue()
```

Checks if the concept is a IValue.

Implemented in TypeDB.Driver.Api.IValue.

Returns

`bool`

Code examples

```cs
concept.IsValue()
```

#### [](#_bool_TypeDB_Driver_Api_IConcept_TryGetBoolean_)method `TryGetBoolean`

```cs
bool? TryGetBoolean()
```

Returns a boolean value of this Concept. If it’s not a Value or it has another type, returns null.

Returns

`bool?`

Code examples

```cs
concept.TryGetBoolean()
```

#### [](#_DateOnly_TypeDB_Driver_Api_IConcept_TryGetDate_)method `TryGetDate`

```cs
DateOnly? TryGetDate()
```

Returns a date value of this Concept. If it’s not a Value or it has another type, returns null.

Returns

`DateOnly?`

Code examples

```cs
concept.TryGetDate()
```

#### [](#_Datetime_TypeDB_Driver_Api_IConcept_TryGetDatetime_)method `TryGetDatetime`

```cs
Datetime? TryGetDatetime()
```

Returns a datetime value of this Concept. If it’s not a Value or it has another type, returns null.

Returns

`Datetime?`

Code examples

```cs
concept.TryGetDatetime()
```

#### [](#_DatetimeTZ_TypeDB_Driver_Api_IConcept_TryGetDatetimeTZ_)method `TryGetDatetimeTZ`

```cs
DatetimeTZ? TryGetDatetimeTZ()
```

Returns a datetime-tz value of this Concept. If it’s not a Value or it has another type, returns null.

Returns

`DatetimeTZ?`

Code examples

```cs
concept.TryGetDatetimeTZ()
```

#### [](#_decimal_TypeDB_Driver_Api_IConcept_TryGetDecimal_)method `TryGetDecimal`

```cs
decimal? TryGetDecimal()
```

Returns a decimal value of this Concept. If it’s not a Value or it has another type, returns null.

Returns

`decimal?`

Code examples

```cs
concept.TryGetDecimal()
```

#### [](#_double_TypeDB_Driver_Api_IConcept_TryGetDouble_)method `TryGetDouble`

```cs
double? TryGetDouble()
```

Returns a double value of this Concept. If it’s not a Value or it has another type, returns null.

Returns

`double?`

Code examples

```cs
concept.TryGetDouble()
```

#### [](#_Duration_TypeDB_Driver_Api_IConcept_TryGetDuration_)method `TryGetDuration`

```cs
Duration? TryGetDuration()
```

Returns a duration value of this Concept. If it’s not a Value or it has another type, returns null.

Returns

`Duration?`

Code examples

```cs
concept.TryGetDuration()
```

#### [](#_string_TypeDB_Driver_Api_IConcept_TryGetIID_)method `TryGetIID`

```cs
string? TryGetIID()
```

Retrieves the unique id (IID) of the Concept. Returns null if absent.

Returns

`string?`

Code examples

```cs
concept.TryGetIID()
```

#### [](#_long_TypeDB_Driver_Api_IConcept_TryGetInteger_)method `TryGetInteger`

```cs
long? TryGetInteger()
```

Returns an integer value of this Concept. If it’s not a Value or it has another type, returns null.

Returns

`long?`

Code examples

```cs
concept.TryGetInteger()
```

#### [](#_string_TypeDB_Driver_Api_IConcept_TryGetLabel_)method `TryGetLabel`

```cs
string? TryGetLabel()
```

Retrieves the unique label of the concept, or null if type fetching is disabled for instances.

Returns

`string?`

Code examples

```cs
concept.TryGetLabel()
```

#### [](#_string_TypeDB_Driver_Api_IConcept_TryGetString_)method `TryGetString`

```cs
string? TryGetString()
```

Returns a string value of this Concept. If it’s not a Value or it has another type, returns null.

Returns

`string?`

Code examples

```cs
concept.TryGetString()
```

#### [](#_IReadOnlyDictionary_string_IValue_TypeDB_Driver_Api_IConcept_TryGetStruct_)method `TryGetStruct`

```cs
IReadOnlyDictionary< string, IValue? >? TryGetStruct()
```

Returns a struct value of this Concept. If it’s not a Value or it has another type, returns null.

Returns

`IReadOnlyDictionary< string, IValue? >?`

Code examples

```cs
concept.TryGetStruct()
```

#### [](#_IValue_TypeDB_Driver_Api_IConcept_TryGetValue_)method `TryGetValue`

```cs
IValue? TryGetValue()
```

Retrieves the value which this Concept holds. Returns null if this Concept does not hold any value.

Returns

`IValue?`

Code examples

```cs
concept.TryGetValue()
```

#### [](#_string_TypeDB_Driver_Api_IConcept_TryGetValueType_)method `TryGetValueType`

```cs
string? TryGetValueType()
```

Retrieves the string describing the value type of this Concept. Returns null if absent.

Returns

`string?`

Code examples

```cs
concept.TryGetValueType()
```

### [](#_Transitivity)Transitivity

`class`

**Package**: `TypeDB.Driver.Api.IConcept`

Used to specify whether we need explicit or transitive subtyping, instances, etc.

attributeType.GetOwners(transaction, annotation, Transitivity.Explicit)

TypeDB.Driver.Api.IConcept.Transitivity

Transitivity

Used to specify whether we need explicit or transitive subtyping, instances, etc.

Definition IConcept.cs:593

## [](#_schema_header)Schema

### [](#_IType)IType

`class`

**Package**: `TypeDB.Driver.Api`

**Supertypes:**

*   `TypeDB.Driver.Api.IConcept`
    

Represents a type in TypeDB. In TypeDB 3.0, types are read-only data returned from queries.

#### [](#_IType_IConcept_TypeDB_Driver_Api_IType_AsType_)method `AsType`

```cs
IType IConcept. AsType()
```

Casts the concept to IType.

Implements TypeDB.Driver.Api.IConcept.

Returns

`IType IConcept.`

Code examples

```cs
concept.AsType()
```

#### [](#_bool_IConcept_TypeDB_Driver_Api_IType_IsType_)method `IsType`

```cs
bool IConcept. IsType()
```

Checks if the concept is a IType.

Implements TypeDB.Driver.Api.IConcept.

Returns

`bool IConcept.`

Code examples

```cs
concept.IsType()
```

### [](#_IEntityType)IEntityType

`class`

**Package**: `TypeDB.Driver.Api`

**Supertypes:**

*   `TypeDB.Driver.Api.IType`
    
*   `TypeDB.Driver.Api.IConcept`
    

Represents an entity type in TypeDB. Entity types represent the classification of independent objects in the data model. In TypeDB 3.0, types are read-only data returned from queries.

#### [](#_IEntityType_IConcept_TypeDB_Driver_Api_IEntityType_AsEntityType_)method `AsEntityType`

```cs
IEntityType IConcept. AsEntityType()
```

Casts the concept to IEntityType.

Implements TypeDB.Driver.Api.IConcept.

Returns

`IEntityType IConcept.`

Code examples

```cs
concept.AsEntityType()
```

#### [](#_bool_IConcept_TypeDB_Driver_Api_IEntityType_IsEntityType_)method `IsEntityType`

```cs
bool IConcept. IsEntityType()
```

Checks if the concept is an IEntityType.

Implements TypeDB.Driver.Api.IConcept.

Returns

`bool IConcept.`

Code examples

```cs
concept.IsEntityType()
```

### [](#_IRelationType)IRelationType

`class`

**Package**: `TypeDB.Driver.Api`

**Supertypes:**

*   `TypeDB.Driver.Api.IType`
    
*   `TypeDB.Driver.Api.IConcept`
    

Represents a relation type in TypeDB. Relation types represent relationships between types and have roles. In TypeDB 3.0, types are read-only data returned from queries.

#### [](#_IRelationType_IConcept_TypeDB_Driver_Api_IRelationType_AsRelationType_)method `AsRelationType`

```cs
IRelationType IConcept. AsRelationType()
```

Casts the concept to IRelationType.

Implements TypeDB.Driver.Api.IConcept.

Returns

`IRelationType IConcept.`

Code examples

```cs
concept.AsRelationType()
```

#### [](#_bool_IConcept_TypeDB_Driver_Api_IRelationType_IsRelationType_)method `IsRelationType`

```cs
bool IConcept. IsRelationType()
```

Checks if the concept is a IRelationType.

Implements TypeDB.Driver.Api.IConcept.

Returns

`bool IConcept.`

Code examples

```cs
concept.IsRelationType()
```

### [](#_IRoleType)IRoleType

`class`

**Package**: `TypeDB.Driver.Api`

**Supertypes:**

*   `TypeDB.Driver.Api.IType`
    
*   `TypeDB.Driver.Api.IConcept`
    

Represents a role type in TypeDB. Roles are special internal types used by relations. In TypeDB 3.0, types are read-only data returned from queries.

#### [](#_IRoleType_IConcept_TypeDB_Driver_Api_IRoleType_AsRoleType_)method `AsRoleType`

```cs
IRoleType IConcept. AsRoleType()
```

Casts the concept to IRoleType.

Implements TypeDB.Driver.Api.IConcept.

Returns

`IRoleType IConcept.`

Code examples

```cs
concept.AsRoleType()
```

#### [](#_bool_IConcept_TypeDB_Driver_Api_IRoleType_IsRoleType_)method `IsRoleType`

```cs
bool IConcept. IsRoleType()
```

Checks if the concept is a IRoleType.

Implements TypeDB.Driver.Api.IConcept.

Returns

`bool IConcept.`

Code examples

```cs
concept.IsRoleType()
```

### [](#_IAttributeType)IAttributeType

`class`

**Package**: `TypeDB.Driver.Api`

**Supertypes:**

*   `TypeDB.Driver.Api.IType`
    
*   `TypeDB.Driver.Api.IConcept`
    

Represents an attribute type in TypeDB. Attribute types represent properties that other types can own. In TypeDB 3.0, types are read-only data returned from queries.

#### [](#_IAttributeType_IConcept_TypeDB_Driver_Api_IAttributeType_AsAttributeType_)method `AsAttributeType`

```cs
IAttributeType IConcept. AsAttributeType()
```

Casts the concept to IAttributeType.

Implements TypeDB.Driver.Api.IConcept.

Returns

`IAttributeType IConcept.`

Code examples

```cs
concept.AsAttributeType()
```

#### [](#_bool_IConcept_TypeDB_Driver_Api_IAttributeType_IsAttributeType_)method `IsAttributeType`

```cs
bool IConcept. IsAttributeType()
```

Checks if the concept is an IAttributeType.

Implements TypeDB.Driver.Api.IConcept.

Returns

`bool IConcept.`

Code examples

```cs
concept.IsAttributeType()
```

### [](#_Label)Label

`class`

**Package**: `TypeDB.Driver.Common`

A `Label` holds the uniquely identifying name of a type.

It consists of an optional `scope`, and a `name`, represented `scope:name`. The scope is used only used to distinguish between role-types of the same name declared in different relation types.

Fields   

Name

Type

Description

`readonly string TypeDB​.Driver​.Common​.Label​.Name`

`readonly string TypeDB​.Driver​.Common​.Label​.Name`

Returns the name of this Label. Examples

```cs
label.Name;
```

`readonly? string TypeDB​.Driver​.Common​.Label​.Scope`

`readonly? string TypeDB​.Driver​.Common​.Label​.Scope`

Returns the scope of this Label. Examples

```cs
label.Scope;
```

#### [](#_override_bool_TypeDB_Driver_Common_Label_Equals_object_obj_)method `Equals`

```cs
override bool Equals(object? obj)
```

Checks if this Label is equal to another object.

Input parameters   

Name

Description

Type

`obj`

Object to compare with

`object?`

Returns

`override bool`

Code examples

```cs
label.Equals(obj);
```

#### [](#_override_int_TypeDB_Driver_Common_Label_GetHashCode_)method `GetHashCode`

```cs
override int GetHashCode()
```

Returns

`override int`

#### [](#_TypeDB_Driver_Common_Label_Label_string_scope_string_name_)method `Label`

```cs
Label(string? scope, string name)
```

Creates a Label from a specified scope and name.

Input parameters   

Name

Description

Type

`scope`

Label scope

`string?`

`name`

Label name

`string`

Returns

`Label`

Code examples

```cs
new Label("relation", "role");
```

#### [](#_TypeDB_Driver_Common_Label_Label_string_name_)method `Label`

```cs
Label(string name)
```

Creates a Label from a specified name.

Input parameters   

Name

Description

Type

`name`

Label name

`string`

Returns

`Label`

Code examples

```cs
new Label("entity");
```

#### [](#_string_TypeDB_Driver_Common_Label_ScopedName)method `ScopedName`

```cs
string TypeDB.Driver.Common.Label.ScopedName
```

Returns the string representation of the scoped name.

Returns

`string`

Code examples

```cs
label.ScopedName;
```

#### [](#_override_string_TypeDB_Driver_Common_Label_ToString_)method `ToString`

```cs
override string ToString()
```

Returns the string representation of the scoped name.

Returns

`override string`

Code examples

```cs
label.ToString();
```

## [](#_data_header)Data

### [](#_IInstance)IInstance

`class`

**Package**: `TypeDB.Driver.Api`

**Supertypes:**

*   `TypeDB.Driver.Api.IConcept`
    

Represents an instance (entity, relation, or attribute) in TypeDB. In TypeDB 3.0, instances are read-only data returned from queries.

#### [](#_IInstance_IConcept_TypeDB_Driver_Api_IInstance_AsInstance_)method `AsInstance`

```cs
IInstance IConcept. AsInstance()
```

Casts the concept to IInstance.

Implements TypeDB.Driver.Api.IConcept.

Returns

`IInstance IConcept.`

Code examples

```cs
concept.AsInstance()
```

#### [](#_bool_IConcept_TypeDB_Driver_Api_IInstance_IsInstance_)method `IsInstance`

```cs
bool IConcept. IsInstance()
```

Checks if the concept is an instance (entity, relation, or attribute).

Implements TypeDB.Driver.Api.IConcept.

Returns

`bool IConcept.`

Code examples

```cs
concept.IsInstance()
```

#### [](#_IType_TypeDB_Driver_Api_IInstance_Type)method `Type`

```cs
IType TypeDB.Driver.Api.IInstance.Type
```

The type which this instance belongs to.

Implemented in TypeDB.Driver.Api.IAttribute, TypeDB.Driver.Api.IAttribute, TypeDB.Driver.Api.IEntity, TypeDB.Driver.Api.IEntity, TypeDB.Driver.Api.IRelation, and TypeDB.Driver.Api.IRelation.

Returns

`IType`

### [](#_IEntity)IEntity

`class`

**Package**: `TypeDB.Driver.Api`

**Supertypes:**

*   `TypeDB.Driver.Api.IInstance`
    
*   `TypeDB.Driver.Api.IConcept`
    

Represents an entity instance in TypeDB. Entity instances are independent objects in the data model. In TypeDB 3.0, instances are read-only data returned from queries.

#### [](#_IEntity_IConcept_TypeDB_Driver_Api_IEntity_AsEntity_)method `AsEntity`

```cs
IEntity IConcept. AsEntity()
```

Casts the concept to IEntity.

Implements TypeDB.Driver.Api.IConcept.

Returns

`IEntity IConcept.`

Code examples

```cs
concept.AsEntity()
```

#### [](#_bool_IConcept_TypeDB_Driver_Api_IEntity_IsEntity_)method `IsEntity`

```cs
bool IConcept. IsEntity()
```

Checks if the concept is an IEntity.

Implements TypeDB.Driver.Api.IConcept.

Returns

`bool IConcept.`

Code examples

```cs
concept.IsEntity()
```

#### [](#_new_IEntityType_TypeDB_Driver_Api_IEntity_Type)method `Type [1/2]`

```cs
new IEntityType TypeDB.Driver.Api.IEntity.Type
```

The entity type which this entity instance belongs to.

Implements TypeDB.Driver.Api.IInstance.

Returns

`new IEntityType`

#### [](#_IType_IInstance_TypeDB_Driver_Api_IEntity_Type)method `Type [2/2]`

```cs
IType IInstance. TypeDB.Driver.Api.IEntity.Type
```

The type which this instance belongs to.

Implements TypeDB.Driver.Api.IInstance.

Returns

`IType IInstance.`

### [](#_IRelation)IRelation

`class`

**Package**: `TypeDB.Driver.Api`

**Supertypes:**

*   `TypeDB.Driver.Api.IInstance`
    
*   `TypeDB.Driver.Api.IConcept`
    

Represents a relation instance in TypeDB. Relation instances connect multiple instances together through roles. In TypeDB 3.0, instances are read-only data returned from queries.

#### [](#_IRelation_IConcept_TypeDB_Driver_Api_IRelation_AsRelation_)method `AsRelation`

```cs
IRelation IConcept. AsRelation()
```

Casts the concept to IRelation.

Implements TypeDB.Driver.Api.IConcept.

Returns

`IRelation IConcept.`

Code examples

```cs
concept.AsRelation()
```

#### [](#_bool_IConcept_TypeDB_Driver_Api_IRelation_IsRelation_)method `IsRelation`

```cs
bool IConcept. IsRelation()
```

Checks if the concept is a IRelation.

Implements TypeDB.Driver.Api.IConcept.

Returns

`bool IConcept.`

Code examples

```cs
concept.IsRelation()
```

#### [](#_new_IRelationType_TypeDB_Driver_Api_IRelation_Type)method `Type [1/2]`

```cs
new IRelationType TypeDB.Driver.Api.IRelation.Type
```

The relation type which this relation instance belongs to.

Implements TypeDB.Driver.Api.IInstance.

Returns

`new IRelationType`

#### [](#_IType_IInstance_TypeDB_Driver_Api_IRelation_Type)method `Type [2/2]`

```cs
IType IInstance. TypeDB.Driver.Api.IRelation.Type
```

The type which this instance belongs to.

Implements TypeDB.Driver.Api.IInstance.

Returns

`IType IInstance.`

### [](#_IAttribute)IAttribute

`class`

**Package**: `TypeDB.Driver.Api`

**Supertypes:**

*   `TypeDB.Driver.Api.IInstance`
    
*   `TypeDB.Driver.Api.IConcept`
    

Represents an attribute instance in TypeDB. Attribute instances represent properties with values that can be owned by other instances. In TypeDB 3.0, instances are read-only data returned from queries.

#### [](#_IAttribute_IConcept_TypeDB_Driver_Api_IAttribute_AsAttribute_)method `AsAttribute`

```cs
IAttribute IConcept. AsAttribute()
```

Casts the concept to IAttribute.

Implements TypeDB.Driver.Api.IConcept.

Returns

`IAttribute IConcept.`

Code examples

```cs
concept.AsAttribute()
```

#### [](#_bool_IConcept_TypeDB_Driver_Api_IAttribute_IsAttribute_)method `IsAttribute`

```cs
bool IConcept. IsAttribute()
```

Checks if the concept is an IAttribute.

Implements TypeDB.Driver.Api.IConcept.

Returns

`bool IConcept.`

Code examples

```cs
concept.IsAttribute()
```

#### [](#_new_IAttributeType_TypeDB_Driver_Api_IAttribute_Type)method `Type [1/2]`

```cs
new IAttributeType TypeDB.Driver.Api.IAttribute.Type
```

The attribute type which this attribute instance belongs to.

Implements TypeDB.Driver.Api.IInstance.

Returns

`new IAttributeType`

#### [](#_IType_IInstance_TypeDB_Driver_Api_IAttribute_Type)method `Type [2/2]`

```cs
IType IInstance. TypeDB.Driver.Api.IAttribute.Type
```

The type which this instance belongs to.

Implements TypeDB.Driver.Api.IInstance.

Returns

`IType IInstance.`

### [](#_IValue)IValue

`class`

**Package**: `TypeDB.Driver.Api`

**Supertypes:**

*   `TypeDB.Driver.Api.IConcept`
    

Represents a value concept in TypeDB. In TypeDB 3.0, values are read-only data returned from queries.

#### [](#_IValue_IConcept_TypeDB_Driver_Api_IValue_AsValue_)method `AsValue`

```cs
IValue IConcept. AsValue()
```

Casts the concept to IValue.

Implements TypeDB.Driver.Api.IConcept.

Returns

`IValue IConcept.`

Code examples

```cs
concept.AsValue()
```

#### [](#_object_TypeDB_Driver_Api_IValue_Get_)method `Get`

```cs
object Get()
```

Returns an untyped object value of this value concept. This is useful for value equality or printing without having to switch on the actual contained value.

Returns

`object`

#### [](#_bool_TypeDB_Driver_Api_IValue_GetBoolean_)method `GetBoolean`

```cs
bool GetBoolean()
```

Returns a boolean value of this value concept. If the value has another type, raises an exception.

Returns

`bool`

#### [](#_DateOnly_TypeDB_Driver_Api_IValue_GetDate_)method `GetDate`

```cs
DateOnly GetDate()
```

Returns a date value of this value concept. If the value has another type, raises an exception.

Returns

`DateOnly`

#### [](#_Datetime_TypeDB_Driver_Api_IValue_GetDatetime_)method `GetDatetime`

```cs
Datetime GetDatetime()
```

Returns a datetime value of this value concept. If the value has another type, raises an exception.

Returns

`Datetime`

#### [](#_DatetimeTZ_TypeDB_Driver_Api_IValue_GetDatetimeTZ_)method `GetDatetimeTZ`

```cs
DatetimeTZ GetDatetimeTZ()
```

Returns a datetime with timezone value of this value concept. If the value has another type, raises an exception.

Returns

`DatetimeTZ`

#### [](#_decimal_TypeDB_Driver_Api_IValue_GetDecimal_)method `GetDecimal`

```cs
decimal GetDecimal()
```

Returns a decimal value of this value concept. If the value has another type, raises an exception.

Returns

`decimal`

#### [](#_double_TypeDB_Driver_Api_IValue_GetDouble_)method `GetDouble`

```cs
double GetDouble()
```

Returns a double value of this value concept. If the value has another type, raises an exception.

Returns

`double`

#### [](#_Duration_TypeDB_Driver_Api_IValue_GetDuration_)method `GetDuration`

```cs
Duration GetDuration()
```

Returns a duration value of this value concept. If the value has another type, raises an exception.

Returns

`Duration`

#### [](#_long_TypeDB_Driver_Api_IValue_GetInteger_)method `GetInteger`

```cs
long GetInteger()
```

Returns an integer (long) value of this value concept. If the value has another type, raises an exception.

Returns

`long`

#### [](#_string_TypeDB_Driver_Api_IValue_GetString_)method `GetString`

```cs
string GetString()
```

Returns a string value of this value concept. If the value has another type, raises an exception.

Returns

`string`

#### [](#_IReadOnlyDictionary_string_IValue_TypeDB_Driver_Api_IValue_GetStruct_)method `GetStruct`

```cs
IReadOnlyDictionary< string, IValue? > GetStruct()
```

Returns a struct value of this value concept represented as a dictionary from field names to values. If the value has another type, raises an exception.

Returns

`IReadOnlyDictionary< string, IValue? >`

#### [](#_string_TypeDB_Driver_Api_IValue_GetValueType_)method `GetValueType`

```cs
string GetValueType()
```

Retrieves the value type of this value concept as a string.

Returns

`string`

#### [](#_bool_IConcept_TypeDB_Driver_Api_IValue_IsValue_)method `IsValue`

```cs
bool IConcept. IsValue()
```

Checks if the concept is a IValue.

Implements TypeDB.Driver.Api.IConcept.

Returns

`bool IConcept.`

Code examples

```cs
concept.IsValue()
```

## [](#_value_header)Value

### [](#_Datetime)Datetime

`class`

**Package**: `TypeDB.Driver.Common`

Represents a datetime with nanosecond precision. C#'s System.DateTime only has tick precision (100ns, 7 fractional digits), losing the last 2 digits of TypeDB’s 9-digit nanosecond precision. This class stores the full-precision seconds and subsecond nanoseconds separately, similar to Java’s `Instant`.

#### [](#_DateTime_TypeDB_Driver_Common_Datetime_DateTime)method `DateTime`

```cs
DateTime TypeDB.Driver.Common.Datetime.DateTime
```

Gets a System.DateTime derived from this value. Note: this has only tick precision (100ns) and may lose the last 2 nanosecond digits.

Returns

`DateTime`

#### [](#_TypeDB_Driver_Common_Datetime_Datetime_long_seconds_uint_subsecNanos_)method `Datetime`

```cs
Datetime(long seconds, uint subsecNanos)
```

Creates a Datetime from Unix epoch seconds and subsecond nanoseconds.

Input parameters   

Name

Description

Type

`seconds`

Seconds since Unix epoch (1970-01-01T00:00:00Z).

`long`

`subsecNanos`

Nanoseconds within the second (0–999,999,999).

`uint`

Returns

`Datetime`

#### [](#_bool_TypeDB_Driver_Common_Datetime_Equals_Datetime_other_)method `Equals`

```cs
bool Equals(Datetime? other)
```

Returns

`bool`

#### [](#_override_bool_TypeDB_Driver_Common_Datetime_Equals_object_obj_)method `Equals`

```cs
override bool Equals(object? obj)
```

Returns

`override bool`

#### [](#_override_int_TypeDB_Driver_Common_Datetime_GetHashCode_)method `GetHashCode`

```cs
override int GetHashCode()
```

Returns

`override int`

#### [](#_static_Datetime_TypeDB_Driver_Common_Datetime_Parse_string_value_)method `Parse`

```cs
static Datetime Parse(string value)
```

Parses a datetime string in TypeDB format, preserving all 9 fractional digits. Example: "2024-09-20T16:40:05.123456789".

Returns

`Datetime`

#### [](#_long_TypeDB_Driver_Common_Datetime_Seconds)method `Seconds`

```cs
long TypeDB.Driver.Common.Datetime.Seconds
```

Gets the Unix epoch seconds component.

Returns

`long`

#### [](#_uint_TypeDB_Driver_Common_Datetime_SubsecNanos)method `SubsecNanos`

```cs
uint TypeDB.Driver.Common.Datetime.SubsecNanos
```

Gets the subsecond nanoseconds component (0–999,999,999).

Returns

`uint`

#### [](#_override_string_TypeDB_Driver_Common_Datetime_ToString_)method `ToString`

```cs
override string ToString()
```

Formats the datetime as an ISO-8601 string with nanosecond precision. Subsecond precision is omitted if zero, otherwise trailing zeros are trimmed.

Returns

`override string`

#### [](#_static_bool_TypeDB_Driver_Common_Datetime_operator!_Datetime_left_Datetime_right_)method `operator!=`

```cs
static bool operator!=(Datetime? left, Datetime? right)
```

Inequality operator.

Returns

`bool`

#### [](#_static_bool_TypeDB_Driver_Common_Datetime_operator_Datetime_left_Datetime_right_)method `operator==`

```cs
static bool operator==(Datetime? left, Datetime? right)
```

Equality operator.

Returns

`bool`

### [](#_DatetimeTZ)DatetimeTZ

`class`

**Package**: `TypeDB.Driver.Common`

Represents a datetime with timezone information and nanosecond precision. C#'s DateTimeOffset cannot carry IANA timezone names (e.g., "Europe/London"), so this class wraps a DateTimeOffset alongside the resolved TimeZoneInfo. Additionally, DateTimeOffset only has tick precision (100ns), so this class stores subsecond nanoseconds separately to preserve TypeDB’s full 9-digit precision. This mirrors Java’s `ZonedDateTime` which preserves both zone ID and nanosecond precision.

#### [](#_DateTimeOffset_TypeDB_Driver_Common_DatetimeTZ_DateTimeOffset)method `DateTimeOffset`

```cs
DateTimeOffset TypeDB.Driver.Common.DatetimeTZ.DateTimeOffset
```

Gets the local date and time with its UTC offset. For IANA zones, the offset is derived from the zone’s rules at the stored instant. Note: this has only tick precision (100ns) and may lose the last 2 nanosecond digits.

Returns

`DateTimeOffset`

#### [](#_TypeDB_Driver_Common_DatetimeTZ_DatetimeTZ_DateTime_utcDateTime_string_zoneName_uint_subsecNanos_0_)method `DatetimeTZ`

```cs
DatetimeTZ(DateTime utcDateTime, string zoneName, uint subsecNanos = 0)
```

Creates a DatetimeTZ with an IANA timezone from a UTC datetime. The local time and offset are computed from the zone’s rules at the given UTC instant. This mirrors Java’s `ZonedDateTime.ofInstant(Instant, ZoneId)`.

Input parameters   

Name

Description

Type

`utcDateTime`

The UTC datetime (Kind should be Utc or Unspecified).

`DateTime`

`zoneName`

The IANA timezone name (e.g., "Europe/London").

`string`

`subsecNanos`

Subsecond nanoseconds (0–999,999,999), preserving TypeDB’s full nanosecond precision. Defaults to 0.

Returns

`DatetimeTZ`

#### [](#_TypeDB_Driver_Common_DatetimeTZ_DatetimeTZ_DateTimeOffset_dateTimeOffset_uint_subsecNanos_0_)method `DatetimeTZ`

```cs
DatetimeTZ(DateTimeOffset dateTimeOffset, uint subsecNanos = 0)
```

Creates a DatetimeTZ with a fixed UTC offset (no IANA zone).

Input parameters   

Name

Description

Type

`dateTimeOffset`

The date, time, and UTC offset.

`DateTimeOffset`

`subsecNanos`

Subsecond nanoseconds (0–999,999,999), preserving TypeDB’s full nanosecond precision. Defaults to 0.

Returns

`DatetimeTZ`

#### [](#_bool_TypeDB_Driver_Common_DatetimeTZ_Equals_DatetimeTZ_other_)method `Equals`

```cs
bool Equals(DatetimeTZ? other)
```

Returns

`bool`

#### [](#_override_bool_TypeDB_Driver_Common_DatetimeTZ_Equals_object_obj_)method `Equals`

```cs
override bool Equals(object? obj)
```

Returns

`override bool`

#### [](#_override_int_TypeDB_Driver_Common_DatetimeTZ_GetHashCode_)method `GetHashCode`

```cs
override int GetHashCode()
```

Returns

`override int`

#### [](#_bool_TypeDB_Driver_Common_DatetimeTZ_IsFixedOffset)method `IsFixedOffset`

```cs
bool TypeDB.Driver.Common.DatetimeTZ.IsFixedOffset
```

Gets whether this datetime-tz uses a fixed UTC offset (true) or an IANA zone (false).

Returns

`bool`

#### [](#_static_DatetimeTZ_TypeDB_Driver_Common_DatetimeTZ_Parse_string_value_)method `Parse`

```cs
static DatetimeTZ Parse(string value)
```

Parses a datetime-tz string in TypeDB format, preserving all 9 fractional digits. IANA zones: "2024-09-20T16:40:05.000000001 Europe/London" (local time + zone name) Fixed offsets: "2024-09-20T16:40:05.000000001+0100" (local time + offset without colon) UTC shorthand: "2024-09-20T16:40:05Z".

Returns

`DatetimeTZ`

#### [](#_uint_TypeDB_Driver_Common_DatetimeTZ_SubsecNanos)method `SubsecNanos`

```cs
uint TypeDB.Driver.Common.DatetimeTZ.SubsecNanos
```

Gets the subsecond nanoseconds component (0–999,999,999). This preserves TypeDB’s full nanosecond precision beyond what DateTimeOffset can represent.

Returns

`uint`

#### [](#_override_string_TypeDB_Driver_Common_DatetimeTZ_ToString_)method `ToString`

```cs
override string ToString()
```

Formats the datetime-tz as an ISO-8601 string with nanosecond precision. Fixed offsets produce: "2024-09-20T16:40:05.123456789+01:00" IANA zones produce: "2024-09-20T16:40:05.123456789+01:00 Europe/London" Subsecond precision is omitted if zero, otherwise trailing zeros are trimmed.

Returns

`override string`

#### [](#_TimeZoneInfo_TypeDB_Driver_Common_DatetimeTZ_ZoneInfo)method `ZoneInfo`

```cs
TimeZoneInfo? TypeDB.Driver.Common.DatetimeTZ.ZoneInfo
```

Gets the resolved TimeZoneInfo, or null for fixed offsets.

Returns

`TimeZoneInfo?`

#### [](#_string_TypeDB_Driver_Common_DatetimeTZ_ZoneName)method `ZoneName`

```cs
string? TypeDB.Driver.Common.DatetimeTZ.ZoneName
```

Gets the IANA timezone name (e.g., "Europe/London"), or null for fixed offsets. This is the original name from the database, independent of platform timezone ID conventions.

Returns

`string?`

#### [](#_static_bool_TypeDB_Driver_Common_DatetimeTZ_operator!_DatetimeTZ_left_DatetimeTZ_right_)method `operator!=`

```cs
static bool operator!=(DatetimeTZ? left, DatetimeTZ? right)
```

Inequality operator.

Returns

`bool`

#### [](#_static_bool_TypeDB_Driver_Common_DatetimeTZ_operator_DatetimeTZ_left_DatetimeTZ_right_)method `operator==`

```cs
static bool operator==(DatetimeTZ? left, DatetimeTZ? right)
```

Equality operator.

Returns

`bool`

## [](#_analyze_header)Analyze

### [](#_IAnalyzedQuery)IAnalyzedQuery

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

An AnalyzedQuery contains the server’s representation of the query and preamble functions, as well as the result of types inferred for each variable by type-inference.

#### [](#_IFetch_TypeDB_Driver_Api_Analyze_IAnalyzedQuery_Fetch)method `Fetch`

```cs
IFetch? TypeDB.Driver.Api.Analyze.IAnalyzedQuery.Fetch
```

Gets a representation of the Fetch stage of the query, if it has one.

Returns

`IFetch?`

#### [](#_IGiven_TypeDB_Driver_Api_Analyze_IAnalyzedQuery_Given)method `Given`

```cs
IGiven? TypeDB.Driver.Api.Analyze.IAnalyzedQuery.Given
```

Gets a representation of the Given stage of the query, if it has one.

Returns

`IGiven?`

#### [](#_IPipeline_TypeDB_Driver_Api_Analyze_IAnalyzedQuery_Pipeline)method `Pipeline`

```cs
IPipeline TypeDB.Driver.Api.Analyze.IAnalyzedQuery.Pipeline
```

Gets a representation of the query as a Pipeline.

Returns

`IPipeline`

#### [](#_IEnumerable_IFunction_TypeDB_Driver_Api_Analyze_IAnalyzedQuery_Preamble)method `Preamble`

```cs
IEnumerable< IFunction > TypeDB.Driver.Api.Analyze.IAnalyzedQuery.Preamble
```

Gets a representation of the Functions in the preamble of the query.

Returns

`IEnumerable< IFunction >`

### [](#_IConjunction)IConjunction

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

A representation of the constraints involved in a query, and types inferred for each variable.

#### [](#_IEnumerable_IVariable_TypeDB_Driver_Api_Analyze_IConjunction_AnnotatedVariables)method `AnnotatedVariables`

```cs
IEnumerable< IVariable > TypeDB.Driver.Api.Analyze.IConjunction.AnnotatedVariables
```

Gets the variables that have annotations in this conjunction.

Returns

`IEnumerable< IVariable >`

#### [](#_IEnumerable_IConstraint_TypeDB_Driver_Api_Analyze_IConjunction_Constraints)method `Constraints`

```cs
IEnumerable< IConstraint > TypeDB.Driver.Api.Analyze.IConjunction.Constraints
```

Gets the constraints in the conjunction.

Returns

`IEnumerable< IConstraint >`

#### [](#_IVariableAnnotations_TypeDB_Driver_Api_Analyze_IConjunction_GetVariableAnnotations_IVariable_variable_)method `GetVariableAnnotations`

```cs
IVariableAnnotations GetVariableAnnotations(IVariable variable)
```

Gets the annotations for a specific variable in this conjunction.

Returns

`IVariableAnnotations`

### [](#_IConjunctionID)IConjunctionID

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

Identifies a conjunction within a query pipeline.

### [](#_IConstraint)IConstraint

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

A representation of a TypeQL constraint.

#### [](#_IComparison_TypeDB_Driver_Api_Analyze_IConstraint_AsComparison_)method `AsComparison`

```cs
IComparison AsComparison()
```

Casts this constraint to a comparison constraint.

Returns

`IComparison`

#### [](#_IExpression_TypeDB_Driver_Api_Analyze_IConstraint_AsExpression_)method `AsExpression`

```cs
IExpression AsExpression()
```

Casts this constraint to an expression constraint.

Returns

`IExpression`

#### [](#_IFunctionCall_TypeDB_Driver_Api_Analyze_IConstraint_AsFunctionCall_)method `AsFunctionCall`

```cs
IFunctionCall AsFunctionCall()
```

Casts this constraint to a function call constraint.

Returns

`IFunctionCall`

#### [](#_IHas_TypeDB_Driver_Api_Analyze_IConstraint_AsHas_)method `AsHas`

```cs
IHas AsHas()
```

Casts this constraint to a has constraint.

Returns

`IHas`

#### [](#_IIid_TypeDB_Driver_Api_Analyze_IConstraint_AsIid_)method `AsIid`

```cs
IIid AsIid()
```

Casts this constraint to an iid constraint.

Returns

`IIid`

#### [](#_IIs_TypeDB_Driver_Api_Analyze_IConstraint_AsIs_)method `AsIs`

```cs
IIs AsIs()
```

Casts this constraint to an is constraint.

Returns

`IIs`

#### [](#_IIsa_TypeDB_Driver_Api_Analyze_IConstraint_AsIsa_)method `AsIsa`

```cs
IIsa AsIsa()
```

Casts this constraint to an isa constraint.

Returns

`IIsa`

#### [](#_IKind_TypeDB_Driver_Api_Analyze_IConstraint_AsKind_)method `AsKind`

```cs
IKind AsKind()
```

Casts this constraint to a kind constraint.

Returns

`IKind`

#### [](#_ILabelConstraint_TypeDB_Driver_Api_Analyze_IConstraint_AsLabel_)method `AsLabel`

```cs
ILabelConstraint AsLabel()
```

Casts this constraint to a label constraint.

Returns

`ILabelConstraint`

#### [](#_ILinks_TypeDB_Driver_Api_Analyze_IConstraint_AsLinks_)method `AsLinks`

```cs
ILinks AsLinks()
```

Casts this constraint to a links constraint.

Returns

`ILinks`

#### [](#_INot_TypeDB_Driver_Api_Analyze_IConstraint_AsNot_)method `AsNot`

```cs
INot AsNot()
```

Casts this constraint to a not constraint.

Returns

`INot`

#### [](#_IOr_TypeDB_Driver_Api_Analyze_IConstraint_AsOr_)method `AsOr`

```cs
IOr AsOr()
```

Casts this constraint to an or constraint.

Returns

`IOr`

#### [](#_IOwns_TypeDB_Driver_Api_Analyze_IConstraint_AsOwns_)method `AsOwns`

```cs
IOwns AsOwns()
```

Casts this constraint to an owns constraint.

Returns

`IOwns`

#### [](#_IPlays_TypeDB_Driver_Api_Analyze_IConstraint_AsPlays_)method `AsPlays`

```cs
IPlays AsPlays()
```

Casts this constraint to a plays constraint.

Returns

`IPlays`

#### [](#_IRelates_TypeDB_Driver_Api_Analyze_IConstraint_AsRelates_)method `AsRelates`

```cs
IRelates AsRelates()
```

Casts this constraint to a relates constraint.

Returns

`IRelates`

#### [](#_ISub_TypeDB_Driver_Api_Analyze_IConstraint_AsSub_)method `AsSub`

```cs
ISub AsSub()
```

Casts this constraint to a sub constraint.

Returns

`ISub`

#### [](#_ITry_TypeDB_Driver_Api_Analyze_IConstraint_AsTry_)method `AsTry`

```cs
ITry AsTry()
```

Casts this constraint to a try constraint.

Returns

`ITry`

#### [](#_IValueConstraint_TypeDB_Driver_Api_Analyze_IConstraint_AsValue_)method `AsValue`

```cs
IValueConstraint AsValue()
```

Casts this constraint to a value constraint.

Returns

`IValueConstraint`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IConstraint_IsComparison)method `IsComparison`

```cs
bool TypeDB.Driver.Api.Analyze.IConstraint.IsComparison
```

Checks if this constraint is a comparison constraint.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IConstraint_IsExpression)method `IsExpression`

```cs
bool TypeDB.Driver.Api.Analyze.IConstraint.IsExpression
```

Checks if this constraint is an expression constraint.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IConstraint_IsFunctionCall)method `IsFunctionCall`

```cs
bool TypeDB.Driver.Api.Analyze.IConstraint.IsFunctionCall
```

Checks if this constraint is a function call constraint.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IConstraint_IsHas)method `IsHas`

```cs
bool TypeDB.Driver.Api.Analyze.IConstraint.IsHas
```

Checks if this constraint is a has constraint.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IConstraint_IsIid)method `IsIid`

```cs
bool TypeDB.Driver.Api.Analyze.IConstraint.IsIid
```

Checks if this constraint is an iid constraint.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IConstraint_IsIs)method `IsIs`

```cs
bool TypeDB.Driver.Api.Analyze.IConstraint.IsIs
```

Checks if this constraint is an is constraint.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IConstraint_IsIsa)method `IsIsa`

```cs
bool TypeDB.Driver.Api.Analyze.IConstraint.IsIsa
```

Checks if this constraint is an isa constraint.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IConstraint_IsKind)method `IsKind`

```cs
bool TypeDB.Driver.Api.Analyze.IConstraint.IsKind
```

Checks if this constraint is a kind constraint.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IConstraint_IsLabel)method `IsLabel`

```cs
bool TypeDB.Driver.Api.Analyze.IConstraint.IsLabel
```

Checks if this constraint is a label constraint.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IConstraint_IsLinks)method `IsLinks`

```cs
bool TypeDB.Driver.Api.Analyze.IConstraint.IsLinks
```

Checks if this constraint is a links constraint.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IConstraint_IsNot)method `IsNot`

```cs
bool TypeDB.Driver.Api.Analyze.IConstraint.IsNot
```

Checks if this constraint is a not constraint.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IConstraint_IsOr)method `IsOr`

```cs
bool TypeDB.Driver.Api.Analyze.IConstraint.IsOr
```

Checks if this constraint is an or constraint.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IConstraint_IsOwns)method `IsOwns`

```cs
bool TypeDB.Driver.Api.Analyze.IConstraint.IsOwns
```

Checks if this constraint is an owns constraint.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IConstraint_IsPlays)method `IsPlays`

```cs
bool TypeDB.Driver.Api.Analyze.IConstraint.IsPlays
```

Checks if this constraint is a plays constraint.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IConstraint_IsRelates)method `IsRelates`

```cs
bool TypeDB.Driver.Api.Analyze.IConstraint.IsRelates
```

Checks if this constraint is a relates constraint.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IConstraint_IsSub)method `IsSub`

```cs
bool TypeDB.Driver.Api.Analyze.IConstraint.IsSub
```

Checks if this constraint is a sub constraint.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IConstraint_IsTry)method `IsTry`

```cs
bool TypeDB.Driver.Api.Analyze.IConstraint.IsTry
```

Checks if this constraint is a try constraint.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IConstraint_IsValue)method `IsValue`

```cs
bool TypeDB.Driver.Api.Analyze.IConstraint.IsValue
```

Checks if this constraint is a value constraint.

Returns

`bool`

#### [](#_ISpan_TypeDB_Driver_Api_Analyze_IConstraint_Span)method `Span`

```cs
ISpan TypeDB.Driver.Api.Analyze.IConstraint.Span
```

Gets the span of this constraint in the source query.

Returns

`ISpan`

#### [](#_Pinvoke_ConstraintVariant_TypeDB_Driver_Api_Analyze_IConstraint_Variant)method `Variant`

```cs
Pinvoke.ConstraintVariant TypeDB.Driver.Api.Analyze.IConstraint.Variant
```

Gets the variant of this constraint.

Returns

`Pinvoke.ConstraintVariant`

### [](#_IComparison)IComparison

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IConstraint`
    

Represents a comparison: lhs comparator rhs.

#### [](#_Pinvoke_Comparator_TypeDB_Driver_Api_Analyze_IComparison_Comparator)method `Comparator`

```cs
Pinvoke.Comparator TypeDB.Driver.Api.Analyze.IComparison.Comparator
```

The comparator operator.

Returns

`Pinvoke.Comparator`

#### [](#_string_TypeDB_Driver_Api_Analyze_IComparison_ComparatorSymbol)method `ComparatorSymbol`

```cs
string TypeDB.Driver.Api.Analyze.IComparison.ComparatorSymbol
```

The symbol representation of the comparator.

Returns

`string`

#### [](#_IConstraintVertex_TypeDB_Driver_Api_Analyze_IComparison_Lhs)method `Lhs`

```cs
IConstraintVertex TypeDB.Driver.Api.Analyze.IComparison.Lhs
```

The left-hand side of the comparison.

Returns

`IConstraintVertex`

#### [](#_IConstraintVertex_TypeDB_Driver_Api_Analyze_IComparison_Rhs)method `Rhs`

```cs
IConstraintVertex TypeDB.Driver.Api.Analyze.IComparison.Rhs
```

The right-hand side of the comparison.

Returns

`IConstraintVertex`

### [](#_IExpression)IExpression

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IConstraint`
    

Represents an expression: let assigned = expression.

#### [](#_IEnumerable_IConstraintVertex_TypeDB_Driver_Api_Analyze_IExpression_Arguments)method `Arguments`

```cs
IEnumerable< IConstraintVertex > TypeDB.Driver.Api.Analyze.IExpression.Arguments
```

The arguments to the expression.

Returns

`IEnumerable< IConstraintVertex >`

#### [](#_IConstraintVertex_TypeDB_Driver_Api_Analyze_IExpression_Assigned)method `Assigned`

```cs
IConstraintVertex TypeDB.Driver.Api.Analyze.IExpression.Assigned
```

The variable being assigned to.

Returns

`IConstraintVertex`

#### [](#_string_TypeDB_Driver_Api_Analyze_IExpression_Text)method `Text`

```cs
string TypeDB.Driver.Api.Analyze.IExpression.Text
```

The text of the expression.

Returns

`string`

### [](#_IFunctionCall)IFunctionCall

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IConstraint`
    

Represents a function call: let assigned = name(arguments)

#### [](#_IEnumerable_IConstraintVertex_TypeDB_Driver_Api_Analyze_IFunctionCall_Arguments)method `Arguments`

```cs
IEnumerable< IConstraintVertex > TypeDB.Driver.Api.Analyze.IFunctionCall.Arguments
```

The arguments to the function call.

Returns

`IEnumerable< IConstraintVertex >`

#### [](#_IEnumerable_IConstraintVertex_TypeDB_Driver_Api_Analyze_IFunctionCall_Assigned)method `Assigned`

```cs
IEnumerable< IConstraintVertex > TypeDB.Driver.Api.Analyze.IFunctionCall.Assigned
```

The variables being assigned to.

Returns

`IEnumerable< IConstraintVertex >`

#### [](#_string_TypeDB_Driver_Api_Analyze_IFunctionCall_Name)method `Name`

```cs
string TypeDB.Driver.Api.Analyze.IFunctionCall.Name
```

The name of the function being called.

Returns

`string`

### [](#_IHas)IHas

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IConstraint`
    

Represents a "has" constraint: owner has attribute.

#### [](#_IConstraintVertex_TypeDB_Driver_Api_Analyze_IHas_Attribute)method `Attribute`

```cs
IConstraintVertex TypeDB.Driver.Api.Analyze.IHas.Attribute
```

The attribute vertex of the constraint.

Returns

`IConstraintVertex`

#### [](#_Pinvoke_ConstraintExactness_TypeDB_Driver_Api_Analyze_IHas_Exactness)method `Exactness`

```cs
Pinvoke.ConstraintExactness TypeDB.Driver.Api.Analyze.IHas.Exactness
```

The exactness of the constraint.

Returns

`Pinvoke.ConstraintExactness`

#### [](#_IConstraintVertex_TypeDB_Driver_Api_Analyze_IHas_Owner)method `Owner`

```cs
IConstraintVertex TypeDB.Driver.Api.Analyze.IHas.Owner
```

The owner vertex of the constraint.

Returns

`IConstraintVertex`

### [](#_IIid)IIid

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IConstraint`
    

Represents an IID constraint: concept iid iid\_value.

#### [](#_string_TypeDB_Driver_Api_Analyze_IIid_Iid)method `Iid`

```cs
string TypeDB.Driver.Api.Analyze.IIid.Iid
```

The internal identifier value.

Returns

`string`

#### [](#_IConstraintVertex_TypeDB_Driver_Api_Analyze_IIid_Variable)method `Variable`

```cs
IConstraintVertex TypeDB.Driver.Api.Analyze.IIid.Variable
```

The variable being constrained.

Returns

`IConstraintVertex`

### [](#_IIs)IIs

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IConstraint`
    

Represents an "is" constraint: lhs is rhs.

#### [](#_IConstraintVertex_TypeDB_Driver_Api_Analyze_IIs_Lhs)method `Lhs`

```cs
IConstraintVertex TypeDB.Driver.Api.Analyze.IIs.Lhs
```

The left-hand side of the constraint.

Returns

`IConstraintVertex`

#### [](#_IConstraintVertex_TypeDB_Driver_Api_Analyze_IIs_Rhs)method `Rhs`

```cs
IConstraintVertex TypeDB.Driver.Api.Analyze.IIs.Rhs
```

The right-hand side of the constraint.

Returns

`IConstraintVertex`

### [](#_IIsa)IIsa

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IConstraint`
    

Represents an "isa" constraint: instance isa(!) type.

#### [](#_Pinvoke_ConstraintExactness_TypeDB_Driver_Api_Analyze_IIsa_Exactness)method `Exactness`

```cs
Pinvoke.ConstraintExactness TypeDB.Driver.Api.Analyze.IIsa.Exactness
```

The exactness of the constraint.

Returns

`Pinvoke.ConstraintExactness`

#### [](#_IConstraintVertex_TypeDB_Driver_Api_Analyze_IIsa_Instance)method `Instance`

```cs
IConstraintVertex TypeDB.Driver.Api.Analyze.IIsa.Instance
```

The instance vertex of the constraint.

Returns

`IConstraintVertex`

#### [](#_IConstraintVertex_TypeDB_Driver_Api_Analyze_IIsa_Type)method `Type`

```cs
IConstraintVertex TypeDB.Driver.Api.Analyze.IIsa.Type
```

The type vertex of the constraint.

Returns

`IConstraintVertex`

### [](#_IKind)IKind

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IConstraint`
    

Represents a kind constraint: kind type.

#### [](#_Pinvoke_Kind_TypeDB_Driver_Api_Analyze_IKind_Kind)method `Kind`

```cs
Pinvoke.Kind TypeDB.Driver.Api.Analyze.IKind.Kind
```

The kind of the type.

Returns

`Pinvoke.Kind`

#### [](#_IConstraintVertex_TypeDB_Driver_Api_Analyze_IKind_Type)method `Type`

```cs
IConstraintVertex TypeDB.Driver.Api.Analyze.IKind.Type
```

The type vertex of the constraint.

Returns

`IConstraintVertex`

### [](#_ILabelConstraint)ILabelConstraint

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IConstraint`
    

Represents a label constraint: type label label\_value.

#### [](#_string_TypeDB_Driver_Api_Analyze_ILabelConstraint_LabelValue)method `LabelValue`

```cs
string TypeDB.Driver.Api.Analyze.ILabelConstraint.LabelValue
```

The label value.

Returns

`string`

#### [](#_IConstraintVertex_TypeDB_Driver_Api_Analyze_ILabelConstraint_Variable)method `Variable`

```cs
IConstraintVertex TypeDB.Driver.Api.Analyze.ILabelConstraint.Variable
```

The variable being constrained.

Returns

`IConstraintVertex`

### [](#_ILinks)ILinks

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IConstraint`
    

Represents a "links" constraint: relation links (role: player)

#### [](#_Pinvoke_ConstraintExactness_TypeDB_Driver_Api_Analyze_ILinks_Exactness)method `Exactness`

```cs
Pinvoke.ConstraintExactness TypeDB.Driver.Api.Analyze.ILinks.Exactness
```

The exactness of the constraint.

Returns

`Pinvoke.ConstraintExactness`

#### [](#_IConstraintVertex_TypeDB_Driver_Api_Analyze_ILinks_Player)method `Player`

```cs
IConstraintVertex TypeDB.Driver.Api.Analyze.ILinks.Player
```

The player vertex of the constraint.

Returns

`IConstraintVertex`

#### [](#_IConstraintVertex_TypeDB_Driver_Api_Analyze_ILinks_Relation)method `Relation`

```cs
IConstraintVertex TypeDB.Driver.Api.Analyze.ILinks.Relation
```

The relation vertex of the constraint.

Returns

`IConstraintVertex`

#### [](#_IConstraintVertex_TypeDB_Driver_Api_Analyze_ILinks_Role)method `Role`

```cs
IConstraintVertex TypeDB.Driver.Api.Analyze.ILinks.Role
```

The role vertex of the constraint.

Returns

`IConstraintVertex`

### [](#_INot)INot

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IConstraint`
    

Represents a "not" constraint: not { conjunction }.

#### [](#_IConjunctionID_TypeDB_Driver_Api_Analyze_INot_Conjunction)method `Conjunction`

```cs
IConjunctionID TypeDB.Driver.Api.Analyze.INot.Conjunction
```

The index into the pipeline’s conjunctions.

Returns

`IConjunctionID`

### [](#_IOr)IOr

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IConstraint`
    

Represents an "or" constraint: { branches\[0\] } or { branches\[1\] } \[or …​\].

#### [](#_IEnumerable_IConjunctionID_TypeDB_Driver_Api_Analyze_IOr_Branches)method `Branches`

```cs
IEnumerable< IConjunctionID > TypeDB.Driver.Api.Analyze.IOr.Branches
```

The conjunction branches, as indices into the pipeline’s conjunctions.

Returns

`IEnumerable< IConjunctionID >`

### [](#_IOwns)IOwns

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IConstraint`
    

Represents an "owns" constraint: owner owns attribute.

#### [](#_IConstraintVertex_TypeDB_Driver_Api_Analyze_IOwns_Attribute)method `Attribute`

```cs
IConstraintVertex TypeDB.Driver.Api.Analyze.IOwns.Attribute
```

The attribute vertex of the constraint.

Returns

`IConstraintVertex`

#### [](#_Pinvoke_ConstraintExactness_TypeDB_Driver_Api_Analyze_IOwns_Exactness)method `Exactness`

```cs
Pinvoke.ConstraintExactness TypeDB.Driver.Api.Analyze.IOwns.Exactness
```

The exactness of the constraint.

Returns

`Pinvoke.ConstraintExactness`

#### [](#_IConstraintVertex_TypeDB_Driver_Api_Analyze_IOwns_Owner)method `Owner`

```cs
IConstraintVertex TypeDB.Driver.Api.Analyze.IOwns.Owner
```

The owner vertex of the constraint.

Returns

`IConstraintVertex`

### [](#_IPlays)IPlays

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IConstraint`
    

Represents a "plays" constraint: player plays role.

#### [](#_Pinvoke_ConstraintExactness_TypeDB_Driver_Api_Analyze_IPlays_Exactness)method `Exactness`

```cs
Pinvoke.ConstraintExactness TypeDB.Driver.Api.Analyze.IPlays.Exactness
```

The exactness of the constraint.

Returns

`Pinvoke.ConstraintExactness`

#### [](#_IConstraintVertex_TypeDB_Driver_Api_Analyze_IPlays_Player)method `Player`

```cs
IConstraintVertex TypeDB.Driver.Api.Analyze.IPlays.Player
```

The player vertex of the constraint.

Returns

`IConstraintVertex`

#### [](#_IConstraintVertex_TypeDB_Driver_Api_Analyze_IPlays_Role)method `Role`

```cs
IConstraintVertex TypeDB.Driver.Api.Analyze.IPlays.Role
```

The role vertex of the constraint.

Returns

`IConstraintVertex`

### [](#_IRelates)IRelates

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IConstraint`
    

Represents a "relates" constraint: relation relates role.

#### [](#_Pinvoke_ConstraintExactness_TypeDB_Driver_Api_Analyze_IRelates_Exactness)method `Exactness`

```cs
Pinvoke.ConstraintExactness TypeDB.Driver.Api.Analyze.IRelates.Exactness
```

The exactness of the constraint.

Returns

`Pinvoke.ConstraintExactness`

#### [](#_IConstraintVertex_TypeDB_Driver_Api_Analyze_IRelates_Relation)method `Relation`

```cs
IConstraintVertex TypeDB.Driver.Api.Analyze.IRelates.Relation
```

The relation vertex of the constraint.

Returns

`IConstraintVertex`

#### [](#_IConstraintVertex_TypeDB_Driver_Api_Analyze_IRelates_Role)method `Role`

```cs
IConstraintVertex TypeDB.Driver.Api.Analyze.IRelates.Role
```

The role vertex of the constraint.

Returns

`IConstraintVertex`

### [](#_ISpan)ISpan

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

The span of a constraint in the source query.

#### [](#_long_TypeDB_Driver_Api_Analyze_ISpan_Begin)method `Begin`

```cs
long TypeDB.Driver.Api.Analyze.ISpan.Begin
```

Gets the offset of the first character.

Returns

`long`

#### [](#_long_TypeDB_Driver_Api_Analyze_ISpan_End)method `End`

```cs
long TypeDB.Driver.Api.Analyze.ISpan.End
```

Gets the offset after the last character.

Returns

`long`

### [](#_ISub)ISub

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IConstraint`
    

Represents a "sub" constraint: subtype sub(!) supertype.

#### [](#_Pinvoke_ConstraintExactness_TypeDB_Driver_Api_Analyze_ISub_Exactness)method `Exactness`

```cs
Pinvoke.ConstraintExactness TypeDB.Driver.Api.Analyze.ISub.Exactness
```

The exactness of the constraint.

Returns

`Pinvoke.ConstraintExactness`

#### [](#_IConstraintVertex_TypeDB_Driver_Api_Analyze_ISub_Subtype)method `Subtype`

```cs
IConstraintVertex TypeDB.Driver.Api.Analyze.ISub.Subtype
```

The subtype vertex of the constraint.

Returns

`IConstraintVertex`

#### [](#_IConstraintVertex_TypeDB_Driver_Api_Analyze_ISub_Supertype)method `Supertype`

```cs
IConstraintVertex TypeDB.Driver.Api.Analyze.ISub.Supertype
```

The supertype vertex of the constraint.

Returns

`IConstraintVertex`

### [](#_ITry)ITry

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IConstraint`
    

Represents a "try" constraint: try { conjunction }.

#### [](#_IConjunctionID_TypeDB_Driver_Api_Analyze_ITry_Conjunction)method `Conjunction`

```cs
IConjunctionID TypeDB.Driver.Api.Analyze.ITry.Conjunction
```

The index into the pipeline’s conjunctions.

Returns

`IConjunctionID`

### [](#_IValueConstraint)IValueConstraint

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IConstraint`
    

Represents a value constraint: attribute\_type value value\_type.

#### [](#_IConstraintVertex_TypeDB_Driver_Api_Analyze_IValueConstraint_AttributeType)method `AttributeType`

```cs
IConstraintVertex TypeDB.Driver.Api.Analyze.IValueConstraint.AttributeType
```

The attribute type vertex of the constraint.

Returns

`IConstraintVertex`

#### [](#_string_TypeDB_Driver_Api_Analyze_IValueConstraint_ValueType)method `ValueType`

```cs
string TypeDB.Driver.Api.Analyze.IValueConstraint.ValueType
```

The value type.

Returns

`string`

### [](#_IConstraintVertex)IConstraintVertex

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

The answer to a TypeDB query is a set of concepts which satisfy the constraints in the query. A ConstraintVertex is either a variable, or some identifier of the concept. A Variable is a vertex the query must match and return. A Label uniquely identifies a type. A Value represents a primitive value literal in TypeDB. A NamedRole vertex is used in links and relates constraints, as multiple relations may have roles with the same name.

#### [](#_IType_TypeDB_Driver_Api_Analyze_IConstraintVertex_AsLabel_)method `AsLabel`

```cs
IType AsLabel()
```

Down-casts this vertex to a type label.

Returns

`IType`

#### [](#_INamedRole_TypeDB_Driver_Api_Analyze_IConstraintVertex_AsNamedRole_)method `AsNamedRole`

```cs
INamedRole AsNamedRole()
```

Down-casts this vertex to a named role.

Returns

`INamedRole`

#### [](#_Api_IValue_TypeDB_Driver_Api_Analyze_IConstraintVertex_AsValue_)method `AsValue`

```cs
Api.IValue AsValue()
```

Down-casts this vertex to a value.

Returns

`Api.IValue`

#### [](#_IVariable_TypeDB_Driver_Api_Analyze_IConstraintVertex_AsVariable_)method `AsVariable`

```cs
IVariable AsVariable()
```

Down-casts this vertex to a variable.

Returns

`IVariable`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IConstraintVertex_IsLabel)method `IsLabel`

```cs
bool TypeDB.Driver.Api.Analyze.IConstraintVertex.IsLabel
```

Checks if this vertex is a label.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IConstraintVertex_IsNamedRole)method `IsNamedRole`

```cs
bool TypeDB.Driver.Api.Analyze.IConstraintVertex.IsNamedRole
```

Checks if this vertex is a named role.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IConstraintVertex_IsValue)method `IsValue`

```cs
bool TypeDB.Driver.Api.Analyze.IConstraintVertex.IsValue
```

Checks if this vertex is a value.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IConstraintVertex_IsVariable)method `IsVariable`

```cs
bool TypeDB.Driver.Api.Analyze.IConstraintVertex.IsVariable
```

Checks if this vertex is a variable.

Returns

`bool`

### [](#_IFetch)IFetch

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

A representation of the 'fetch' stage of a query.

#### [](#_IFetchLeaf_TypeDB_Driver_Api_Analyze_IFetch_AsLeaf_)method `AsLeaf`

```cs
IFetchLeaf AsLeaf()
```

Casts this fetch to a leaf.

Returns

`IFetchLeaf`

#### [](#_IFetchList_TypeDB_Driver_Api_Analyze_IFetch_AsList_)method `AsList`

```cs
IFetchList AsList()
```

Casts this fetch to a list.

Returns

`IFetchList`

#### [](#_IFetchObject_TypeDB_Driver_Api_Analyze_IFetch_AsObject_)method `AsObject`

```cs
IFetchObject AsObject()
```

Casts this fetch to an object.

Returns

`IFetchObject`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IFetch_IsLeaf)method `IsLeaf`

```cs
bool TypeDB.Driver.Api.Analyze.IFetch.IsLeaf
```

Checks if this fetch is a leaf.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IFetch_IsList)method `IsList`

```cs
bool TypeDB.Driver.Api.Analyze.IFetch.IsList
```

Checks if this fetch is a list.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IFetch_IsObject)method `IsObject`

```cs
bool TypeDB.Driver.Api.Analyze.IFetch.IsObject
```

Checks if this fetch is an object.

Returns

`bool`

#### [](#_Pinvoke_FetchVariant_TypeDB_Driver_Api_Analyze_IFetch_Variant)method `Variant`

```cs
Pinvoke.FetchVariant TypeDB.Driver.Api.Analyze.IFetch.Variant
```

Gets the variant. One of: Leaf, List, Object.

Returns

`Pinvoke.FetchVariant`

### [](#_IFetchLeaf)IFetchLeaf

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

The leaf of a Fetch object. Holds information on the value it can hold.

#### [](#_IEnumerable_string_TypeDB_Driver_Api_Analyze_IFetchLeaf_Annotations)method `Annotations`

```cs
IEnumerable< string > TypeDB.Driver.Api.Analyze.IFetchLeaf.Annotations
```

Gets the possible value types.

Returns

`IEnumerable< string >`

### [](#_IFetchList)IFetchList

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

A list of Fetch documents.

#### [](#_IFetch_TypeDB_Driver_Api_Analyze_IFetchList_Element)method `Element`

```cs
IFetch TypeDB.Driver.Api.Analyze.IFetchList.Element
```

Gets the element of the list.

Returns

`IFetch`

### [](#_IFetchObject)IFetchObject

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

A mapping of string keys to Fetch documents.

#### [](#_IFetch_TypeDB_Driver_Api_Analyze_IFetchObject_Get_string_key_)method `Get`

```cs
IFetch Get(string key)
```

Gets the Fetch object for the given key.

Returns

`IFetch`

#### [](#_IEnumerable_string_TypeDB_Driver_Api_Analyze_IFetchObject_Keys)method `Keys`

```cs
IEnumerable< string > TypeDB.Driver.Api.Analyze.IFetchObject.Keys
```

Gets the available keys of this Fetch document.

Returns

`IEnumerable< string >`

### [](#_IFunction)IFunction

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

Holds a representation of a function, and the result of type-inference for each variable.

#### [](#_IEnumerable_IVariableAnnotations_TypeDB_Driver_Api_Analyze_IFunction_ArgumentAnnotations)method `ArgumentAnnotations`

```cs
IEnumerable< IVariableAnnotations > TypeDB.Driver.Api.Analyze.IFunction.ArgumentAnnotations
```

Gets the type annotations for each argument of the function.

Returns

`IEnumerable< IVariableAnnotations >`

#### [](#_IEnumerable_IVariable_TypeDB_Driver_Api_Analyze_IFunction_ArgumentVariables)method `ArgumentVariables`

```cs
IEnumerable< IVariable > TypeDB.Driver.Api.Analyze.IFunction.ArgumentVariables
```

Gets the variables which are the arguments of the function.

Returns

`IEnumerable< IVariable >`

#### [](#_IPipeline_TypeDB_Driver_Api_Analyze_IFunction_Body)method `Body`

```cs
IPipeline TypeDB.Driver.Api.Analyze.IFunction.Body
```

Gets the pipeline which forms the body of the function.

Returns

`IPipeline`

#### [](#_IEnumerable_IVariableAnnotations_TypeDB_Driver_Api_Analyze_IFunction_ReturnAnnotations)method `ReturnAnnotations`

```cs
IEnumerable< IVariableAnnotations > TypeDB.Driver.Api.Analyze.IFunction.ReturnAnnotations
```

Gets the type annotations for each concept returned by the function.

Returns

`IEnumerable< IVariableAnnotations >`

#### [](#_IReturnOperation_TypeDB_Driver_Api_Analyze_IFunction_ReturnOperation)method `ReturnOperation`

```cs
IReturnOperation TypeDB.Driver.Api.Analyze.IFunction.ReturnOperation
```

Gets the return operation of the function.

Returns

`IReturnOperation`

### [](#_IReturnOperation)IReturnOperation

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

A representation of the return operation of a function.

#### [](#_ICheckReturn_TypeDB_Driver_Api_Analyze_IReturnOperation_AsCheck_)method `AsCheck`

```cs
ICheckReturn AsCheck()
```

Casts this return operation to a check return.

Returns

`ICheckReturn`

#### [](#_IReduceReturn_TypeDB_Driver_Api_Analyze_IReturnOperation_AsReduce_)method `AsReduce`

```cs
IReduceReturn AsReduce()
```

Casts this return operation to a reduce return.

Returns

`IReduceReturn`

#### [](#_ISingleReturn_TypeDB_Driver_Api_Analyze_IReturnOperation_AsSingle_)method `AsSingle`

```cs
ISingleReturn AsSingle()
```

Casts this return operation to a single return.

Returns

`ISingleReturn`

#### [](#_IStreamReturn_TypeDB_Driver_Api_Analyze_IReturnOperation_AsStream_)method `AsStream`

```cs
IStreamReturn AsStream()
```

Casts this return operation to a stream return.

Returns

`IStreamReturn`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IReturnOperation_IsCheck)method `IsCheck`

```cs
bool TypeDB.Driver.Api.Analyze.IReturnOperation.IsCheck
```

Checks if this is a check return.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IReturnOperation_IsReduce)method `IsReduce`

```cs
bool TypeDB.Driver.Api.Analyze.IReturnOperation.IsReduce
```

Checks if this is a reduce return.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IReturnOperation_IsSingle)method `IsSingle`

```cs
bool TypeDB.Driver.Api.Analyze.IReturnOperation.IsSingle
```

Checks if this is a single return.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IReturnOperation_IsStream)method `IsStream`

```cs
bool TypeDB.Driver.Api.Analyze.IReturnOperation.IsStream
```

Checks if this is a stream return.

Returns

`bool`

#### [](#_Pinvoke_ReturnOperationVariant_TypeDB_Driver_Api_Analyze_IReturnOperation_Variant)method `Variant`

```cs
Pinvoke.ReturnOperationVariant TypeDB.Driver.Api.Analyze.IReturnOperation.Variant
```

Gets the variant. One of: StreamReturn, SingleReturn, CheckReturn, ReduceReturn.

Returns

`Pinvoke.ReturnOperationVariant`

### [](#_ICheckReturn)ICheckReturn

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IReturnOperation`
    

Indicates the function returns a boolean.

### [](#_IReduceReturn)IReduceReturn

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IReturnOperation`
    

Indicates the function returns an aggregation over the rows in the body.

#### [](#_IEnumerable_IReducer_TypeDB_Driver_Api_Analyze_IReduceReturn_Reducers)method `Reducers`

```cs
IEnumerable< IReducer > TypeDB.Driver.Api.Analyze.IReduceReturn.Reducers
```

The reducers used to compute the aggregations.

Returns

`IEnumerable< IReducer >`

### [](#_ISingleReturn)ISingleReturn

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IReturnOperation`
    

Indicates the function returns a single row of the specified variables.

#### [](#_string_TypeDB_Driver_Api_Analyze_ISingleReturn_Selector)method `Selector`

```cs
string TypeDB.Driver.Api.Analyze.ISingleReturn.Selector
```

The selector that determines how the row is selected.

Returns

`string`

#### [](#_IEnumerable_IVariable_TypeDB_Driver_Api_Analyze_ISingleReturn_Variables)method `Variables`

```cs
IEnumerable< IVariable > TypeDB.Driver.Api.Analyze.ISingleReturn.Variables
```

The variables in the returned row.

Returns

`IEnumerable< IVariable >`

### [](#_IStreamReturn)IStreamReturn

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IReturnOperation`
    

Indicates the function returns a stream of concepts.

#### [](#_IEnumerable_IVariable_TypeDB_Driver_Api_Analyze_IStreamReturn_Variables)method `Variables`

```cs
IEnumerable< IVariable > TypeDB.Driver.Api.Analyze.IStreamReturn.Variables
```

The variables in the returned row.

Returns

`IEnumerable< IVariable >`

### [](#_INamedRole)INamedRole

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

'links' and 'relates' constraints accept unscoped role names. Since an unscoped role-name does not uniquely identify a role-type, (different role-types belonging to different relation types may share the same name) an internal variable is introduced to handle the ambiguity.

#### [](#_string_TypeDB_Driver_Api_Analyze_INamedRole_Name)method `Name`

```cs
string TypeDB.Driver.Api.Analyze.INamedRole.Name
```

Gets the unscoped role name specified in the query.

Returns

`string`

#### [](#_IVariable_TypeDB_Driver_Api_Analyze_INamedRole_Variable)method `Variable`

```cs
IVariable TypeDB.Driver.Api.Analyze.INamedRole.Variable
```

Gets the internal variable injected to handle ambiguity in unscoped role names.

Returns

`IVariable`

### [](#_IPipeline)IPipeline

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

A representation of a query pipeline.

#### [](#_IConjunction_TypeDB_Driver_Api_Analyze_IPipeline_GetConjunction_IConjunctionID_conjunctionID_)method `GetConjunction`

```cs
IConjunction? GetConjunction(IConjunctionID conjunctionID)
```

Gets the conjunction for the specified conjunction ID.

Returns

`IConjunction?`

#### [](#_string_TypeDB_Driver_Api_Analyze_IPipeline_GetVariableName_IVariable_variable_)method `GetVariableName`

```cs
string? GetVariableName(IVariable variable)
```

Gets the name of the specified variable, if it has one.

Returns

`string?`

#### [](#_IEnumerable_IPipelineStage_TypeDB_Driver_Api_Analyze_IPipeline_Stages)method `Stages`

```cs
IEnumerable< IPipelineStage > TypeDB.Driver.Api.Analyze.IPipeline.Stages
```

Gets the stages making up the pipeline.

Returns

`IEnumerable< IPipelineStage >`

### [](#_IPipelineStage)IPipelineStage

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

Representation of a stage in a pipeline.

#### [](#_IDeleteStage_TypeDB_Driver_Api_Analyze_IPipelineStage_AsDelete_)method `AsDelete`

```cs
IDeleteStage AsDelete()
```

Casts this stage to a delete stage.

Returns

`IDeleteStage`

#### [](#_IDistinctStage_TypeDB_Driver_Api_Analyze_IPipelineStage_AsDistinct_)method `AsDistinct`

```cs
IDistinctStage AsDistinct()
```

Casts this stage to a distinct stage.

Returns

`IDistinctStage`

#### [](#_IInsertStage_TypeDB_Driver_Api_Analyze_IPipelineStage_AsInsert_)method `AsInsert`

```cs
IInsertStage AsInsert()
```

Casts this stage to an insert stage.

Returns

`IInsertStage`

#### [](#_ILimitStage_TypeDB_Driver_Api_Analyze_IPipelineStage_AsLimit_)method `AsLimit`

```cs
ILimitStage AsLimit()
```

Casts this stage to a limit stage.

Returns

`ILimitStage`

#### [](#_IMatchStage_TypeDB_Driver_Api_Analyze_IPipelineStage_AsMatch_)method `AsMatch`

```cs
IMatchStage AsMatch()
```

Casts this stage to a match stage.

Returns

`IMatchStage`

#### [](#_IOffsetStage_TypeDB_Driver_Api_Analyze_IPipelineStage_AsOffset_)method `AsOffset`

```cs
IOffsetStage AsOffset()
```

Casts this stage to an offset stage.

Returns

`IOffsetStage`

#### [](#_IPutStage_TypeDB_Driver_Api_Analyze_IPipelineStage_AsPut_)method `AsPut`

```cs
IPutStage AsPut()
```

Casts this stage to a put stage.

Returns

`IPutStage`

#### [](#_IReduceStage_TypeDB_Driver_Api_Analyze_IPipelineStage_AsReduce_)method `AsReduce`

```cs
IReduceStage AsReduce()
```

Casts this stage to a reduce stage.

Returns

`IReduceStage`

#### [](#_IRequireStage_TypeDB_Driver_Api_Analyze_IPipelineStage_AsRequire_)method `AsRequire`

```cs
IRequireStage AsRequire()
```

Casts this stage to a require stage.

Returns

`IRequireStage`

#### [](#_ISelectStage_TypeDB_Driver_Api_Analyze_IPipelineStage_AsSelect_)method `AsSelect`

```cs
ISelectStage AsSelect()
```

Casts this stage to a select stage.

Returns

`ISelectStage`

#### [](#_ISortStage_TypeDB_Driver_Api_Analyze_IPipelineStage_AsSort_)method `AsSort`

```cs
ISortStage AsSort()
```

Casts this stage to a sort stage.

Returns

`ISortStage`

#### [](#_IUpdateStage_TypeDB_Driver_Api_Analyze_IPipelineStage_AsUpdate_)method `AsUpdate`

```cs
IUpdateStage AsUpdate()
```

Casts this stage to an update stage.

Returns

`IUpdateStage`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IPipelineStage_IsDelete)method `IsDelete`

```cs
bool TypeDB.Driver.Api.Analyze.IPipelineStage.IsDelete
```

Checks if this stage is a delete stage.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IPipelineStage_IsDistinct)method `IsDistinct`

```cs
bool TypeDB.Driver.Api.Analyze.IPipelineStage.IsDistinct
```

Checks if this stage is a distinct stage.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IPipelineStage_IsInsert)method `IsInsert`

```cs
bool TypeDB.Driver.Api.Analyze.IPipelineStage.IsInsert
```

Checks if this stage is an insert stage.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IPipelineStage_IsLimit)method `IsLimit`

```cs
bool TypeDB.Driver.Api.Analyze.IPipelineStage.IsLimit
```

Checks if this stage is a limit stage.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IPipelineStage_IsMatch)method `IsMatch`

```cs
bool TypeDB.Driver.Api.Analyze.IPipelineStage.IsMatch
```

Checks if this stage is a match stage.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IPipelineStage_IsOffset)method `IsOffset`

```cs
bool TypeDB.Driver.Api.Analyze.IPipelineStage.IsOffset
```

Checks if this stage is an offset stage.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IPipelineStage_IsPut)method `IsPut`

```cs
bool TypeDB.Driver.Api.Analyze.IPipelineStage.IsPut
```

Checks if this stage is a put stage.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IPipelineStage_IsReduce)method `IsReduce`

```cs
bool TypeDB.Driver.Api.Analyze.IPipelineStage.IsReduce
```

Checks if this stage is a reduce stage.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IPipelineStage_IsRequire)method `IsRequire`

```cs
bool TypeDB.Driver.Api.Analyze.IPipelineStage.IsRequire
```

Checks if this stage is a require stage.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IPipelineStage_IsSelect)method `IsSelect`

```cs
bool TypeDB.Driver.Api.Analyze.IPipelineStage.IsSelect
```

Checks if this stage is a select stage.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IPipelineStage_IsSort)method `IsSort`

```cs
bool TypeDB.Driver.Api.Analyze.IPipelineStage.IsSort
```

Checks if this stage is a sort stage.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IPipelineStage_IsUpdate)method `IsUpdate`

```cs
bool TypeDB.Driver.Api.Analyze.IPipelineStage.IsUpdate
```

Checks if this stage is an update stage.

Returns

`bool`

#### [](#_Pinvoke_PipelineStageVariant_TypeDB_Driver_Api_Analyze_IPipelineStage_Variant)method `Variant`

```cs
Pinvoke.PipelineStageVariant TypeDB.Driver.Api.Analyze.IPipelineStage.Variant
```

Gets the pipeline stage variant.

Returns

`Pinvoke.PipelineStageVariant`

### [](#_IDeleteStage)IDeleteStage

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IPipelineStage`
    

Represents a "delete" stage: delete block; deleted\_variables;.

#### [](#_IConjunctionID_TypeDB_Driver_Api_Analyze_IDeleteStage_Block)method `Block`

```cs
IConjunctionID TypeDB.Driver.Api.Analyze.IDeleteStage.Block
```

The index into the pipeline’s conjunctions.

Returns

`IConjunctionID`

#### [](#_IEnumerable_IVariable_TypeDB_Driver_Api_Analyze_IDeleteStage_DeletedVariables)method `DeletedVariables`

```cs
IEnumerable< IVariable > TypeDB.Driver.Api.Analyze.IDeleteStage.DeletedVariables
```

The variables for which the unified concepts are to be deleted.

Returns

`IEnumerable< IVariable >`

### [](#_IDistinctStage)IDistinctStage

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IPipelineStage`
    

Represents a "distinct" stage.

### [](#_IInsertStage)IInsertStage

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IPipelineStage`
    

Represents an "insert" stage: insert block.

#### [](#_IConjunctionID_TypeDB_Driver_Api_Analyze_IInsertStage_Block)method `Block`

```cs
IConjunctionID TypeDB.Driver.Api.Analyze.IInsertStage.Block
```

The index into the pipeline’s conjunctions.

Returns

`IConjunctionID`

### [](#_ILimitStage)ILimitStage

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IPipelineStage`
    

Represents a "limit" stage: limit n.

#### [](#_long_TypeDB_Driver_Api_Analyze_ILimitStage_Limit)method `Limit`

```cs
long TypeDB.Driver.Api.Analyze.ILimitStage.Limit
```

The maximum number of results to return.

Returns

`long`

### [](#_IMatchStage)IMatchStage

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IPipelineStage`
    

Represents a "match" stage: match block.

#### [](#_IConjunctionID_TypeDB_Driver_Api_Analyze_IMatchStage_Block)method `Block`

```cs
IConjunctionID TypeDB.Driver.Api.Analyze.IMatchStage.Block
```

The index into the pipeline’s conjunctions.

Returns

`IConjunctionID`

### [](#_IOffsetStage)IOffsetStage

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IPipelineStage`
    

Represents an "offset" stage: offset n.

#### [](#_long_TypeDB_Driver_Api_Analyze_IOffsetStage_Offset)method `Offset`

```cs
long TypeDB.Driver.Api.Analyze.IOffsetStage.Offset
```

The number of results to skip.

Returns

`long`

### [](#_IPutStage)IPutStage

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IPipelineStage`
    

Represents a "put" stage: put block.

#### [](#_IConjunctionID_TypeDB_Driver_Api_Analyze_IPutStage_Block)method `Block`

```cs
IConjunctionID TypeDB.Driver.Api.Analyze.IPutStage.Block
```

The index into the pipeline’s conjunctions.

Returns

`IConjunctionID`

### [](#_IReduceAssignment)IReduceAssignment

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

An assignment of a reducer to a variable.

#### [](#_IVariable_TypeDB_Driver_Api_Analyze_IReduceAssignment_Assigned)method `Assigned`

```cs
IVariable TypeDB.Driver.Api.Analyze.IReduceAssignment.Assigned
```

The variable being assigned to.

Returns

`IVariable`

#### [](#_IReducer_TypeDB_Driver_Api_Analyze_IReduceAssignment_Reducer)method `Reducer`

```cs
IReducer TypeDB.Driver.Api.Analyze.IReduceAssignment.Reducer
```

The reducer being applied.

Returns

`IReducer`

### [](#_IReduceStage)IReduceStage

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IPipelineStage`
    

Represents a "reduce" stage: reduce reducers groupby groupby.

#### [](#_IEnumerable_IVariable_TypeDB_Driver_Api_Analyze_IReduceStage_GroupBy)method `GroupBy`

```cs
IEnumerable< IVariable > TypeDB.Driver.Api.Analyze.IReduceStage.GroupBy
```

The variables to group by.

Returns

`IEnumerable< IVariable >`

#### [](#_IEnumerable_IReduceAssignment_TypeDB_Driver_Api_Analyze_IReduceStage_ReducerAssignments)method `ReducerAssignments`

```cs
IEnumerable< IReduceAssignment > TypeDB.Driver.Api.Analyze.IReduceStage.ReducerAssignments
```

The reducer assignments.

Returns

`IEnumerable< IReduceAssignment >`

### [](#_IRequireStage)IRequireStage

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IPipelineStage`
    

Represents a "require" stage: require variables.

#### [](#_IEnumerable_IVariable_TypeDB_Driver_Api_Analyze_IRequireStage_Variables)method `Variables`

```cs
IEnumerable< IVariable > TypeDB.Driver.Api.Analyze.IRequireStage.Variables
```

The variables that must be present in the result.

Returns

`IEnumerable< IVariable >`

### [](#_ISelectStage)ISelectStage

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IPipelineStage`
    

Represents a "select" stage: select variables.

#### [](#_IEnumerable_IVariable_TypeDB_Driver_Api_Analyze_ISelectStage_Variables)method `Variables`

```cs
IEnumerable< IVariable > TypeDB.Driver.Api.Analyze.ISelectStage.Variables
```

The variables being selected.

Returns

`IEnumerable< IVariable >`

### [](#_ISortVariable)ISortVariable

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

A variable and its sort order.

#### [](#_Pinvoke_SortOrder_TypeDB_Driver_Api_Analyze_ISortVariable_Order)method `Order`

```cs
Pinvoke.SortOrder TypeDB.Driver.Api.Analyze.ISortVariable.Order
```

The sort order (ascending or descending).

Returns

`Pinvoke.SortOrder`

#### [](#_IVariable_TypeDB_Driver_Api_Analyze_ISortVariable_Variable)method `Variable`

```cs
IVariable TypeDB.Driver.Api.Analyze.ISortVariable.Variable
```

The variable to sort by.

Returns

`IVariable`

### [](#_ISortStage)ISortStage

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IPipelineStage`
    

Represents a "sort" stage: sort variables-and-order.

#### [](#_IEnumerable_ISortVariable_TypeDB_Driver_Api_Analyze_ISortStage_Variables)method `Variables`

```cs
IEnumerable< ISortVariable > TypeDB.Driver.Api.Analyze.ISortStage.Variables
```

The sort variables and their sort orders.

Returns

`IEnumerable< ISortVariable >`

### [](#_IUpdateStage)IUpdateStage

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

**Supertypes:**

*   `TypeDB.Driver.Api.Analyze.IPipelineStage`
    

Represents an "update" stage: update block.

#### [](#_IConjunctionID_TypeDB_Driver_Api_Analyze_IUpdateStage_Block)method `Block`

```cs
IConjunctionID TypeDB.Driver.Api.Analyze.IUpdateStage.Block
```

The index into the pipeline’s conjunctions.

Returns

`IConjunctionID`

### [](#_IReducer)IReducer

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

Representation of a reducer used either in a reduce stage or in a function’s return operation.

#### [](#_IEnumerable_IVariable_TypeDB_Driver_Api_Analyze_IReducer_Arguments)method `Arguments`

```cs
IEnumerable< IVariable > TypeDB.Driver.Api.Analyze.IReducer.Arguments
```

Gets the arguments to the reducer.

Returns

`IEnumerable< IVariable >`

#### [](#_string_TypeDB_Driver_Api_Analyze_IReducer_Name)method `Name`

```cs
string TypeDB.Driver.Api.Analyze.IReducer.Name
```

Gets the name of the reduce operation.

Returns

`string`

### [](#_IVariable)IVariable

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

Represents a variable in a TypeQL query.

### [](#_IVariableAnnotations)IVariableAnnotations

`class`

**Package**: `TypeDB.Driver.Api.Analyze`

Represents the type annotations inferred for a variable.

#### [](#_IEnumerable_IType_TypeDB_Driver_Api_Analyze_IVariableAnnotations_AsInstance_)method `AsInstance`

```cs
IEnumerable< IType > AsInstance()
```

Gets the possible types of instances this variable can hold. Only valid if IsInstance is true.

Returns

`IEnumerable< IType >`

#### [](#_IEnumerable_IType_TypeDB_Driver_Api_Analyze_IVariableAnnotations_AsType_)method `AsType`

```cs
IEnumerable< IType > AsType()
```

Gets the possible types this variable can hold. Only valid if IsType is true.

Returns

`IEnumerable< IType >`

#### [](#_IEnumerable_string_TypeDB_Driver_Api_Analyze_IVariableAnnotations_AsValue_)method `AsValue`

```cs
IEnumerable< string > AsValue()
```

Gets the possible value types this variable can hold. Only valid if IsValue is true.

Returns

`IEnumerable< string >`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IVariableAnnotations_IsInstance)method `IsInstance`

```cs
bool TypeDB.Driver.Api.Analyze.IVariableAnnotations.IsInstance
```

Checks if this variable is an instance variable.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IVariableAnnotations_IsType)method `IsType`

```cs
bool TypeDB.Driver.Api.Analyze.IVariableAnnotations.IsType
```

Checks if this variable is a type variable.

Returns

`bool`

#### [](#_bool_TypeDB_Driver_Api_Analyze_IVariableAnnotations_IsValue)method `IsValue`

```cs
bool TypeDB.Driver.Api.Analyze.IVariableAnnotations.IsValue
```

Checks if this variable is a value variable.

Returns

`bool`

#### [](#_Pinvoke_VariableAnnotationsVariant_TypeDB_Driver_Api_Analyze_IVariableAnnotations_Variant)method `Variant`

```cs
Pinvoke.VariableAnnotationsVariant TypeDB.Driver.Api.Analyze.IVariableAnnotations.Variant
```

Gets the variant indicating whether this is an instance, type, or value variable.

Returns

`Pinvoke.VariableAnnotationsVariant`

## [](#_errors_header)Errors

### [](#_TypeDBDriverException)TypeDBDriverException

`class`

**Package**: `TypeDB.Driver.Common`

Exceptions raised by the driver.

#### [](#_bool_TypeDB_Driver_Common_TypeDBDriverException_Contains_string_subString_)method `Contains`

```cs
bool Contains(string subString)
```

Checks whether a substring is a part of this exception’s message.

Input parameters   

Name

Description

Type

`subString`

The substring to search for.

`string`

Returns

`bool`

Code examples

```cs
try { // ... } catch (TypeDBDriverException e) { if (e.Contains("CSCO01")) { // ... } } TypeDB.Driver.Common.TypeDBDriverException Exceptions raised by the driver. Definition TypeDBDriverException.cs:31 TypeDB.Driver.Common.TypeDBDriverException.Contains bool Contains(string subString) Checks whether a substring is a part of this exception's message. Definition TypeDBDriverException.cs:88
```

#### [](#_TypeDB_Driver_Common_TypeDBDriverException_TypeDBDriverException_ErrorMessage_error_params_object_errorParams_)method `TypeDBDriverException`

```cs
TypeDBDriverException(ErrorMessage error, params object?[] errorParams)
```

Creates a new exception from a structured error message.

Input parameters   

Name

Description

Type

`error`

The error message template.

`ErrorMessage`

`errorParams`

The parameters for the error message.

`params object?[]`

Returns

`TypeDBDriverException`

#### [](#_TypeDB_Driver_Common_TypeDBDriverException_TypeDBDriverException_string_message_)method `TypeDBDriverException`

```cs
TypeDBDriverException(string message)
```

Creates a new exception with the given message.

Input parameters   

Name

Description

Type

`message`

The exception message.

`string`

Returns

`TypeDBDriverException`

#### [](#_TypeDB_Driver_Common_TypeDBDriverException_TypeDBDriverException_SystemException_error_)method `TypeDBDriverException`

```cs
TypeDBDriverException(System::Exception error)
```

Creates a new exception wrapping an existing exception.

Input parameters   

Name

Description

Type

`error`

The exception to wrap.

`System::Exception`

Returns

`TypeDBDriverException`

#### [](#_TypeDB_Driver_Common_TypeDBDriverException_TypeDBDriverException_PinvokeError_nativeError_)method `TypeDBDriverException`

```cs
TypeDBDriverException(Pinvoke::Error nativeError)
```

Creates a new exception from a native error.

Input parameters   

Name

Description

Type

`nativeError`

The native error.

`Pinvoke::Error`

Returns

`TypeDBDriverException`

[C gRPC driver](../c/index.md) [TypeDB HTTP API](../../typedb-http-api/index.md)

[Edit on GitHub](https://github.com/typedb/typedb-docs/edit/3.x-development/reference/modules/ROOT/pages/typedb-grpc-drivers/csharp.adoc) Edit this page on GitHub.