Interface IClient
A client object for issuing commands to ksqlDB.
Namespace: Confluent.KsqlDb
Assembly: cs.temp.dll.dll
Syntax
public interface IClient
Methods
Close()
Closes the client and disposes of any resources that it uses, including the underlying HttpClient and its resources.
Declaration
void Close()
ExecuteQueryAsync(String, CancellationToken)
Executes a query. Note that this is limited to pull and push queries and does not cover other statement type commands.
Also, this is appropriate for queries which can run to completion in a batch, namely pull queries and push queries with limit statements. Push queries without limit statements will never complete.
Declaration
Task<IBatchedQueryResult> ExecuteQueryAsync(string sql, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | sql | The sql query to run |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<IBatchedQueryResult> | A task for the result |
StreamQueryAsync(String, CancellationToken)
Executes a query. Note that this is limited to pull and push queries and does not cover other statement type commands.
This is appropriate for queries which may not run to immediate completion, so this works well for both pull and push queries.
Declaration
Task<IStreamedQueryResult> StreamQueryAsync(string sql, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | sql | The sql query to run |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<IStreamedQueryResult> | A task for the result |